Package org.apache.wiki.ui
Class WikiCommand
java.lang.Object
org.apache.wiki.ui.AbstractCommand
org.apache.wiki.ui.WikiCommand
- All Implemented Interfaces:
Command
public final class WikiCommand extends AbstractCommand
Defines Commands for wiki-wide operations such as creating groups, editing preferences and profiles, and logging in/out. WikiCommands can be combined with Strings (representing the name of a wiki instance) to produce targeted Commands.
- Since:
- 2.4.22
- See Also:
Engine.getApplicationName()
-
Field Summary
-
Method Summary
Modifier and Type Method Description java.lang.StringgetName()Always returns the "friendly" JSP name.java.security.PermissionrequiredPermission()Returns the Permission required to successfully execute this Command.CommandtargetedCommand(java.lang.Object target)Creates and returns a targeted Command by combining a wiki (a String) with this Command.Methods inherited from class org.apache.wiki.ui.AbstractCommand
getContentTemplate, getJSP, getJSPFriendlyName, getRequestContext, getTarget, getURLPattern, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
ADMIN
-
CREATE_GROUP
-
ERROR
-
FIND
-
INSTALL
-
LOGIN
-
LOGOUT
-
MESSAGE
-
PREFS
-
WORKFLOW
-
-
Method Details
-
targetedCommand
Creates and returns a targeted Command by combining a wiki (a String) with this Command. The suppliedtargetobject must be non-nulland of type String.- Specified by:
targetedCommandin interfaceCommand- Specified by:
targetedCommandin classAbstractCommand- Parameters:
target- the name of the wiki to combine into the current Command- Returns:
- the new targeted command
- Throws:
java.lang.IllegalArgumentException- if the target is not of the correct type- See Also:
Command.targetedCommand(Object)
-
getName
Always returns the "friendly" JSP name.- Specified by:
getNamein interfaceCommand- Specified by:
getNamein classAbstractCommand- Returns:
- the name
- See Also:
Command.getName()
-
requiredPermission
Description copied from interface:CommandReturns the Permission required to successfully execute this Command. If no Permission is requred, this method returnsnull. For example, the static commandPageCommand.VIEWdoesn't require a permission because it isn't referring to a particular WikiPage. However, if this command targets a WikiPage calledMain(viaPageCommand.targetedCommand(Object), the resulting Command would require the permissionPagePermission "yourWiki:Main", "view".- Returns:
- the required permission, or
nullif not required - See Also:
Command.requiredPermission()
-