|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wiki.ui.AbstractCommand org.apache.wiki.ui.PageCommand
public final class PageCommand
Defines Commands for editing, renaming, and viewing wiki pages. PageCommands can be combined with WikiPages to produce targeted Commands.
This class is not final
; it may be extended in
the future.
Field Summary | |
---|---|
static Command |
ATTACH
|
static Command |
COMMENT
|
static Command |
CONFLICT
|
static Command |
DELETE
|
static Command |
DIFF
|
static Command |
EDIT
|
static Command |
INFO
|
static Command |
NONE
|
static Command |
OTHER
|
static Command |
PREVIEW
|
static Command |
RENAME
|
static Command |
RSS
|
static Command |
UPLOAD
|
static Command |
VIEW
|
Method Summary | |
---|---|
String |
getName()
Returns the human-friendly name for this command. |
Permission |
requiredPermission()
Returns the Permission required to successfully execute this Command. |
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 |
---|
allCommands, getContentTemplate, getJSP, getJSPFriendlyName, getRequestContext, getTarget, getURLPattern, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Command ATTACH
public static final Command COMMENT
public static final Command CONFLICT
public static final Command DELETE
public static final Command DIFF
public static final Command EDIT
public static final Command INFO
public static final Command PREVIEW
public static final Command RENAME
public static final Command RSS
public static final Command UPLOAD
public static final Command VIEW
public static final Command NONE
public static final Command OTHER
Method Detail |
---|
public Command targetedCommand(Object target)
target
object
must be non-null
and of type WikiPage.
targetedCommand
in interface Command
targetedCommand
in class AbstractCommand
target
- the WikiPage to combine into the current Command
IllegalArgumentException
- if the target is not of the correct typeCommand.targetedCommand(Object)
public String getName()
Command
getName
in interface Command
getName
in class AbstractCommand
Command.getName()
public Permission requiredPermission()
Command
null
. For
example, the static command VIEW
doesn't require a
permission because it isn't referring to a particular WikiPage. However,
if this command targets a WikiPage called Main
(via
targetedCommand(Object)
, the resulting Command
would require the permission
PagePermission "yourWiki:Main", "view"
.
null
if not requiredCommand.requiredPermission()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |