Package org.apache.wiki.ui
Class PageCommand
java.lang.Object
org.apache.wiki.ui.AbstractCommand
org.apache.wiki.ui.PageCommand
- All Implemented Interfaces:
Command
Defines Commands for editing, renaming, and viewing wiki pages. PageCommands can be combined with WikiPages to produce targeted Commands.
- Since:
- 2.4.22
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Command
static final Command
static final Command
static final Command
static final Command
static final Command
static final Command
static final Command
static final Command
static final Command
static final Command
static final Command
static final Command
static final Command
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the human-friendly name for this command.Returns the Permission required to successfully execute this Command.targetedCommand
(Object target) Creates and returns a targeted Command by combining a WikiPage with this Command.Methods inherited from class org.apache.wiki.ui.AbstractCommand
getContentTemplate, getJSP, getJSPFriendlyName, getRequestContext, getTarget, getURLPattern, toString
-
Field Details
-
ATTACH
-
COMMENT
-
CONFLICT
-
DELETE
-
DIFF
-
EDIT
-
INFO
-
PREVIEW
-
RENAME
-
RSS
-
UPLOAD
-
VIEW
-
NONE
-
OTHER
-
-
Method Details
-
targetedCommand
Creates and returns a targeted Command by combining a WikiPage with this Command. The suppliedtarget
object must be non-null
and of type WikiPage.- Specified by:
targetedCommand
in interfaceCommand
- Specified by:
targetedCommand
in classAbstractCommand
- Parameters:
target
- the WikiPage to combine into the current Command- Returns:
- the new targeted command
- Throws:
IllegalArgumentException
- if the target is not of the correct type- See Also:
-
getName
Description copied from interface:Command
Returns the human-friendly name for this command.- Specified by:
getName
in interfaceCommand
- Specified by:
getName
in classAbstractCommand
- Returns:
- the name
- See Also:
-
requiredPermission
Description copied from interface:Command
Returns the Permission required to successfully execute this Command. If no Permission is required, this method returnsnull
. For example, the static commandorg.apache.wiki.ui.PageCommand#VIEW
doesn't require a permission because it isn't referring to a particular WikiPage. However, if this command targets a WikiPage calledMain
(viaorg.apache.wiki.ui.PageCommand#targetedCommand(Object)
, the resulting Command would require the permissionPagePermission "yourWiki:Main", "view"
.- Returns:
- the required permission, or
null
if not required - See Also:
-