public abstract class WebInterfaceToadlet extends Toadlet implements LinkEnabledCallback
| Modifier and Type | Field and Description |
|---|---|
protected PluginContext |
pluginContext |
HANDLE_METHOD_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
WebInterfaceToadlet(PluginContext pluginContext2,
java.lang.String pluginURL,
java.lang.String pageName) |
| Modifier and Type | Method and Description |
|---|---|
HTMLNode |
createErrorBox(java.util.List<java.lang.String> errors) |
HTMLNode |
createErrorBox(java.util.List<java.lang.String> errors,
java.lang.String path,
FreenetURI retryUri,
java.lang.String extraParams) |
boolean |
isEnabled(ToadletContext ctx)
Whether to show the link?
|
protected boolean |
isFormPassword(HTTPRequest req)
Validates whether the request contains a formPassword which matches
NodeClientCore.formPassword. |
protected java.lang.String |
normalizePath(java.lang.String path)
returns allways at min a "/", but "/path" is allways without trailing '/'
so "/path/to/toadlet/blah" and "/path/to/toadlet/blah/" cant be distinguished
|
java.lang.String |
path() |
addHomepageLink, allowPOSTWithoutPassword, findSupportedMethods, getClientImpl, handleMethodGET, sendErrorPage, sendErrorPage, sendErrorPage, showAsToadlet, showAsToadlet, writeHTMLReply, writeHTMLReply, writeHTMLReply, writeInternalError, writeReply, writeReply, writeReply, writeReply, writeReply, writeReply, writeTemporaryRedirect, writeTextReply, writeTextReplyprotected final PluginContext pluginContext
protected WebInterfaceToadlet(PluginContext pluginContext2, java.lang.String pluginURL, java.lang.String pageName)
public boolean isEnabled(ToadletContext ctx)
LinkEnabledCallbackisEnabled in interface LinkEnabledCallbackctx - The request which is asking. Can be null.protected java.lang.String normalizePath(java.lang.String path)
path - protected boolean isFormPassword(HTTPRequest req)
NodeClientCore.formPassword. See the JavaDoc there for an explanation
of the purpose of this mechanism.
ATTENTION: It is critically important to use this function when processing requests which "change the server state". Other words for this would be requests which change your database or "write" requests. Requests which only read values from the server don't have to validate the form password.
To produce a form which already contains the password, use PluginRespirator.addFormChild(freenet.support.HTMLNode, String, String).
public HTMLNode createErrorBox(java.util.List<java.lang.String> errors)
public HTMLNode createErrorBox(java.util.List<java.lang.String> errors, java.lang.String path, FreenetURI retryUri, java.lang.String extraParams)