Package org.apache.wiki.ui

# Class PageCommand

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

All Implemented Interfaces:
  `org.apache.wiki.api.core.Command`

public final class PageCommand extends AbstractCommand

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

Fields
Modifier and Type
Field
Description
`static final org.apache.wiki.api.core.Command`
`ATTACH`
`static final org.apache.wiki.api.core.Command`
`COMMENT`
`static final org.apache.wiki.api.core.Command`
`CONFLICT`
`static final org.apache.wiki.api.core.Command`
`DELETE`
`static final org.apache.wiki.api.core.Command`
`DIFF`
`static final org.apache.wiki.api.core.Command`
`EDIT`
`static final org.apache.wiki.api.core.Command`
`INFO`
`static final org.apache.wiki.api.core.Command`
`NONE`
`static final org.apache.wiki.api.core.Command`
`OTHER`
`static final org.apache.wiki.api.core.Command`
`PREVIEW`
`static final org.apache.wiki.api.core.Command`
`RENAME`
`static final org.apache.wiki.api.core.Command`
`RSS`
`static final org.apache.wiki.api.core.Command`
`UPLOAD`
`static final org.apache.wiki.api.core.Command`
`VIEW`

## Method Summary

Modifier and Type
Method
Description
`String`
`getName()`
`Permission`
`requiredPermission()`
`org.apache.wiki.api.core.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`

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

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

## Field Details

### ATTACH

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

### COMMENT

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

### CONFLICT

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

### DELETE

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

### DIFF

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

### EDIT

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

### INFO

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

### PREVIEW

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

### RENAME

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

### RSS

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

### UPLOAD

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

### VIEW

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

### NONE

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

### OTHER

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

## Method Details

### targetedCommand

public org.apache.wiki.api.core.Command targetedCommand(Object target)
Creates and returns a targeted Command by combining a WikiPage with this Command. The supplied `target` object must be non-`null` and of type WikiPage.

Specified by:
  `targetedCommand` in interface `org.apache.wiki.api.core.Command`
Specified by:
  `targetedCommand` in class `AbstractCommand`
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:
  - `Command.targetedCommand(Object)`

### getName

public String getName()

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()`