|
||||||||||
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.WikiCommand
public final class WikiCommand
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.
This class is not final
; it may be extended in
the future.
WikiEngine.getApplicationName()
Field Summary | |
---|---|
static Command |
ADMIN
|
static Command |
CREATE_GROUP
|
static Command |
ERROR
|
static Command |
FIND
|
static Command |
INSTALL
|
static Command |
LOGIN
|
static Command |
LOGOUT
|
static Command |
MESSAGE
|
static Command |
PREFS
|
static Command |
WORKFLOW
|
Method Summary | |
---|---|
String |
getName()
Always returns the "friendly" JSP name. |
Permission |
requiredPermission()
Returns the Permission required to successfully execute this Command. |
Command |
targetedCommand(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 |
---|
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 CREATE_GROUP
public static final Command ERROR
public static final Command FIND
public static final Command INSTALL
public static final Command LOGIN
public static final Command LOGOUT
public static final Command MESSAGE
public static final Command PREFS
public static final Command WORKFLOW
public static final Command ADMIN
Method Detail |
---|
public Command targetedCommand(Object target)
target
object must be non-null
and of type String.
targetedCommand
in interface Command
targetedCommand
in class AbstractCommand
target
- the name of the wiki to combine into the current Command
IllegalArgumentException
- if the target is not of the correct typeCommand.targetedCommand(Object)
public String getName()
getName
in interface Command
getName
in class AbstractCommand
Command.getName()
public Permission requiredPermission()
Command
null
. For
example, the static command PageCommand.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
PageCommand.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 |