public class OpennetConnectionsToadlet extends ConnectionsToadlet implements LinkEnabledCallback
Modifier and Type | Class and Description |
---|---|
protected class |
OpennetConnectionsToadlet.OpennetComparator |
ConnectionsToadlet.ComparatorByStatus, ConnectionsToadlet.PeerAdditionReturnCodes
core, isReversed, node, peers, showTrivialFoafConnections, stats
HANDLE_METHOD_PREFIX
Modifier | Constructor and Description |
---|---|
protected |
OpennetConnectionsToadlet(Node n,
NodeClientCore core,
HighLevelSimpleClient client) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptRefPosts() |
protected java.util.Comparator<PeerNodeStatus> |
comparator(java.lang.String sortBy,
boolean reversed) |
protected java.lang.String |
defaultRedirectLocation()
Where to redirect to if there is an error
|
protected void |
drawNameColumn(HTMLNode peerRow,
PeerNodeStatus peerNodeStatus,
boolean advanced)
Draw the name column, if there is one.
|
protected void |
drawPeerActionSelectBox(HTMLNode peerForm,
boolean advancedModeEnabled)
If showPeerActionsBox() is true, this will be called directly after drawing the peers table.
|
protected void |
drawPrivateNoteColumn(HTMLNode peerRow,
PeerNodeStatus peerNodeStatus,
boolean fProxyJavascriptEnabled)
Draw the private note column.
|
protected SimpleFieldSet |
getNoderef() |
protected java.lang.String |
getPageTitle(java.lang.String titleCountString) |
protected java.lang.String |
getPeerListTitle()
What should the heading (before "(more detailed)") be on the peers table?
|
protected PeerNodeStatus[] |
getPeerNodeStatuses(boolean noHeavy) |
void |
handleMethodGET(java.net.URI uri,
HTTPRequest request,
ToadletContext ctx)
Handle a GET request.
|
void |
handleMethodPOST(java.net.URI uri,
HTTPRequest request,
ToadletContext ctx) |
protected boolean |
hasNameColumn()
Is there a name column?
|
protected boolean |
hasPrivateNoteColumn()
Is there a private note column?
|
boolean |
isEnabled(ToadletContext ctx)
Whether to show the link?
|
protected boolean |
isOpennet()
Adding a darknet node or an opennet node?
|
java.lang.String |
path() |
protected boolean |
shouldDrawNoderefBox(boolean advancedModeEnabled) |
protected boolean |
showPeerActionsBox()
Should there be a checkbox for each peer, and drawPeerActionSelectBox() be called directly
after drawing the peers list?
|
drawAddPeerBox, drawAddPeerBox, drawTrustColumn, drawVisibilityColumn, handleAltPost, hasTrustColumn, hasVisibilityColumn, sendErrorPage
addHomepageLink, allowPOSTWithoutPassword, findSupportedMethods, getClientImpl, sendErrorPage, sendErrorPage, sendErrorPage, showAsToadlet, showAsToadlet, writeHTMLReply, writeHTMLReply, writeHTMLReply, writeInternalError, writeReply, writeReply, writeReply, writeReply, writeReply, writeReply, writeTemporaryRedirect, writeTextReply, writeTextReply
protected OpennetConnectionsToadlet(Node n, NodeClientCore core, HighLevelSimpleClient client)
protected void drawNameColumn(HTMLNode peerRow, PeerNodeStatus peerNodeStatus, boolean advanced)
ConnectionsToadlet
drawNameColumn
in class ConnectionsToadlet
protected void drawPrivateNoteColumn(HTMLNode peerRow, PeerNodeStatus peerNodeStatus, boolean fProxyJavascriptEnabled)
ConnectionsToadlet
drawPrivateNoteColumn
in class ConnectionsToadlet
protected boolean hasNameColumn()
ConnectionsToadlet
hasNameColumn
in class ConnectionsToadlet
protected boolean hasPrivateNoteColumn()
ConnectionsToadlet
hasPrivateNoteColumn
in class ConnectionsToadlet
protected SimpleFieldSet getNoderef()
getNoderef
in class ConnectionsToadlet
protected PeerNodeStatus[] getPeerNodeStatuses(boolean noHeavy)
getPeerNodeStatuses
in class ConnectionsToadlet
public boolean isEnabled(ToadletContext ctx)
LinkEnabledCallback
isEnabled
in interface LinkEnabledCallback
ctx
- The request which is asking. Can be null.protected java.lang.String getPageTitle(java.lang.String titleCountString)
getPageTitle
in class ConnectionsToadlet
protected boolean shouldDrawNoderefBox(boolean advancedModeEnabled)
shouldDrawNoderefBox
in class ConnectionsToadlet
protected boolean showPeerActionsBox()
ConnectionsToadlet
showPeerActionsBox
in class ConnectionsToadlet
protected void drawPeerActionSelectBox(HTMLNode peerForm, boolean advancedModeEnabled)
ConnectionsToadlet
drawPeerActionSelectBox
in class ConnectionsToadlet
protected java.lang.String getPeerListTitle()
ConnectionsToadlet
getPeerListTitle
in class ConnectionsToadlet
protected boolean acceptRefPosts()
acceptRefPosts
in class ConnectionsToadlet
protected java.lang.String defaultRedirectLocation()
ConnectionsToadlet
defaultRedirectLocation
in class ConnectionsToadlet
protected boolean isOpennet()
ConnectionsToadlet
isOpennet
in class ConnectionsToadlet
protected java.util.Comparator<PeerNodeStatus> comparator(java.lang.String sortBy, boolean reversed)
comparator
in class ConnectionsToadlet
public void handleMethodGET(java.net.URI uri, HTTPRequest request, ToadletContext ctx) throws ToadletContextClosedException, java.io.IOException, RedirectException
Toadlet
handleMethodGET
in class ConnectionsToadlet
uri
- The URI being fetched.request
- The original HTTPRequest, convenient for e.g. fetching ?blah=blah parameters.ctx
- The request context. Mainly used for sending a reply; this identifies which
request we are replying to. Also gives access to lots of important objects e.g. PageMaker.ToadletContextClosedException
java.io.IOException
RedirectException
public void handleMethodPOST(java.net.URI uri, HTTPRequest request, ToadletContext ctx) throws ToadletContextClosedException, java.io.IOException, RedirectException, ConfigException
handleMethodPOST
in class ConnectionsToadlet
ToadletContextClosedException
java.io.IOException
RedirectException
ConfigException