public abstract class AbstractCommand extends Object implements Command
final. This class is thread-safe.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCommand(String requestContext,
String urlPattern,
String contentTemplate,
Object target)
Constructs a new Command with a specified wiki context, URL pattern, content template and target.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContentTemplate() |
String |
getJSP() |
protected 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 String |
getName() |
String |
getRequestContext() |
Object |
getTarget() |
String |
getURLPattern() |
abstract Command |
targetedCommand(Object target) |
String |
toString()
Returns a String representation of the Command.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitrequiredPermissionprotected AbstractCommand(String requestContext, String urlPattern, String contentTemplate, Object target)
http:// or https:// prefixes),
then the JSP will be a cleansed version of the URL pattern; symbols (such as %u) will removed. If it 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 nullIllegalArgumentException - if the request content or URL pattern is nullpublic abstract Command targetedCommand(Object target)
targetedCommand in interface CommandCommand.targetedCommand(Object)public final String getContentTemplate()
getContentTemplate in interface CommandCommand.getContentTemplate()public final String getJSP()
getJSP in interface CommandCommand.getJSP()public abstract String getName()
getName in interface CommandCommand.getName()public final String getRequestContext()
getRequestContext in interface CommandCommand.getRequestContext()public final Object getTarget()
getTarget in interface CommandCommand.getTarget()public final String getURLPattern()
getURLPattern in interface CommandCommand.getURLPattern()protected final String getJSPFriendlyName()
public final String toString()
toString in class ObjectObject.toString()Copyright © 2001-2020 The Apache Software Foundation. All rights reserved.