Class 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 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

      See Also:
      • Command.requiredPermission()