Package org.apache.wiki.ui

## Class PageCommand

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

All Implemented Interfaces:
  `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
`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

All Methods Instance Methods Concrete Methods
`java.lang.String` `getName()`
`java.security.Permission` `requiredPermission()`
`Command` `targetedCommand​(java.lang.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 Detail

#### ATTACH

    public static final Command ATTACH

#### COMMENT

    public static final Command COMMENT

#### CONFLICT

    public static final Command CONFLICT

#### DELETE

    public static final Command DELETE

#### DIFF

    public static final Command DIFF

#### EDIT

    public static final Command EDIT

#### INFO

    public static final Command INFO

#### PREVIEW

    public static final Command PREVIEW

#### RENAME

    public static final Command RENAME

#### RSS

    public static final Command RSS

#### UPLOAD

    public static final Command UPLOAD

#### VIEW

    public static final Command VIEW

#### NONE

    public static final Command NONE

#### OTHER

    public static final Command OTHER

### Method Detail

#### targetedCommand

    public Command targetedCommand​(java.lang.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 `Command`
Specified by:
  `targetedCommand` in class `AbstractCommand`
Parameters:
  `target` - the WikiPage 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()

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