public abstract class AbstractCommand extends java.lang.Object implements Command
final. This class is thread-safe.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCommand(java.lang.String requestContext,
java.lang.String urlPattern,
java.lang.String contentTemplate,
java.lang.Object target)
Constructs a new Command with a specified wiki context, URL pattern, content template and target.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContentTemplate() |
java.lang.String |
getJSP() |
protected java.lang.String |
getJSPFriendlyName()
Returns the "friendly name" for this command's JSP, namely a beatified version of the JSP's name without the .jsp suffix.
|
abstract java.lang.String |
getName() |
java.lang.String |
getRequestContext() |
java.lang.Object |
getTarget() |
java.lang.String |
getURLPattern() |
abstract Command |
targetedCommand(java.lang.Object target) |
java.lang.String |
toString()
Returns a String representation of the Command.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitrequiredPermissionprotected AbstractCommand(java.lang.String requestContext, java.lang.String urlPattern, java.lang.String contentTemplate, java.lang.Object target)
http:// or https:// prefixes),
then the JSP will be a cleansed version of the URL pattern; symbols (such as %u) will be removed. If the supplied
URL pattern points to a non-local destination, the JSP will be set to the value supplied, unmodified.requestContext - the request contexturlPattern - the URL patterncontentTemplate - the content template; may be nulltarget - the target of the command, such as a WikiPage; may be nulljava.lang.IllegalArgumentException - if the request content or URL pattern is nullpublic abstract Command targetedCommand(java.lang.Object target)
targetedCommand in interface CommandCommand.targetedCommand(Object)public final java.lang.String getContentTemplate()
getContentTemplate in interface CommandCommand.getContentTemplate()public final java.lang.String getJSP()
getJSP in interface CommandCommand.getJSP()public abstract java.lang.String getName()
getName in interface CommandCommand.getName()public final java.lang.String getRequestContext()
getRequestContext in interface CommandCommand.getRequestContext()public final java.lang.Object getTarget()
getTarget in interface CommandCommand.getTarget()public final java.lang.String getURLPattern()
getURLPattern in interface CommandCommand.getURLPattern()protected final java.lang.String getJSPFriendlyName()
public final java.lang.String toString()
toString in class java.lang.ObjectObject.toString()Copyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.