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

Fields
`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

All Methods Instance Methods Concrete Methods
`java.lang.String` `getName()` Always returns the "friendly" JSP name.
`java.security.Permission` `requiredPermission()`
`Command` `targetedCommand​(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, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### ADMIN

    public static final Command ADMIN

#### CREATE_GROUP

    public static final Command CREATE_GROUP

#### ERROR

    public static final Command ERROR

#### FIND

    public static final Command FIND

#### INSTALL

    public static final Command INSTALL

#### LOGIN

    public static final Command LOGIN

#### LOGOUT

    public static final Command LOGOUT

#### MESSAGE

    public static final Command MESSAGE

#### PREFS

    public static final Command PREFS

#### WORKFLOW

    public static final Command WORKFLOW

### Method Detail

#### targetedCommand

    public Command targetedCommand​(java.lang.Object target)

Creates and returns a targeted Command by combining a wiki (a String) with this Command. The supplied `target` object must be non-`null` and of type String.

Specified by:
  `targetedCommand` in interface `Command`
Specified by:
  `targetedCommand` in class `AbstractCommand`
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

    public java.lang.String getName()

Always returns the "friendly" JSP name.

Specified by:
  `getName` in interface `Command`
Specified by:
  `getName` in class `AbstractCommand`
See Also:
  `Command.getName()`

#### requiredPermission

    public java.security.Permission requiredPermission()

See Also:
  `Command.requiredPermission()`