Package org.apache.wiki.ui

# Class WikiCommand

java.lang.Object
org.apache.wiki.ui.AbstractCommand
org.apache.wiki.ui.WikiCommand

All Implemented Interfaces:
  `org.apache.wiki.api.core.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
Modifier and Type
Field
Description
`static final org.apache.wiki.api.core.Command`
`ADMIN`
`static final org.apache.wiki.api.core.Command`
`CREATE_GROUP`
`static final org.apache.wiki.api.core.Command`
`ERROR`
`static final org.apache.wiki.api.core.Command`
`FIND`
`static final org.apache.wiki.api.core.Command`
`INSTALL`
`static final org.apache.wiki.api.core.Command`
`LOGIN`
`static final org.apache.wiki.api.core.Command`
`LOGOUT`
`static final org.apache.wiki.api.core.Command`
`MESSAGE`
`static final org.apache.wiki.api.core.Command`
`PREFS`
`static final org.apache.wiki.api.core.Command`
`WORKFLOW`

## Method Summary

Modifier and Type
Method
Description
`String`
`getName()`
Always returns the "friendly" JSP name.
`Permission`
`requiredPermission()`
`org.apache.wiki.api.core.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

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

### ADMIN

public static final org.apache.wiki.api.core.Command ADMIN

### CREATE_GROUP

public static final org.apache.wiki.api.core.Command CREATE_GROUP

### ERROR

public static final org.apache.wiki.api.core.Command ERROR

### FIND

public static final org.apache.wiki.api.core.Command FIND

### INSTALL

public static final org.apache.wiki.api.core.Command INSTALL

### LOGIN

public static final org.apache.wiki.api.core.Command LOGIN

### LOGOUT

public static final org.apache.wiki.api.core.Command LOGOUT

### MESSAGE

public static final org.apache.wiki.api.core.Command MESSAGE

### PREFS

public static final org.apache.wiki.api.core.Command PREFS

### WORKFLOW

public static final org.apache.wiki.api.core.Command WORKFLOW

## Method Details

### targetedCommand

public org.apache.wiki.api.core.Command targetedCommand(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 `org.apache.wiki.api.core.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:
  `IllegalArgumentException` - if the target is not of the correct type
See Also:
  - `Command.targetedCommand(Object)`

### getName

public String getName()
Always returns the "friendly" JSP name.

Specified by:
  `getName` in interface `org.apache.wiki.api.core.Command`
Specified by:
  `getName` in class `AbstractCommand`
See Also:
  - `Command.getName()`

### requiredPermission

public Permission requiredPermission()

See Also:
  - `Command.requiredPermission()`