Package org.apache.wiki.ui
Class RedirectCommand
- java.lang.Object
-
- org.apache.wiki.ui.AbstractCommand
-
- org.apache.wiki.ui.RedirectCommand
-
- All Implemented Interfaces:
Command
public final class RedirectCommand extends AbstractCommand
Defines Commands for redirections to off-site special pages. RedirectCommands do not have associated permissions; the
requiredPermission()method will always returnnull. When combined with a supplied String url, theAbstractCommand.getTarget()method will return a String, theAbstractCommand.getURLPattern()method will return the supplied target URL, andAbstractCommand.getJSP()method will return the "cleansed" URL.- Since:
- 2.4.22
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Returns the human-friendly name for this command.java.security.PermissionrequiredPermission()No-op; always returnsnull.CommandtargetedCommand(java.lang.Object target)Creates and returns a targeted Command by combining a URL (as String) with this Command.-
Methods inherited from class org.apache.wiki.ui.AbstractCommand
getContentTemplate, getJSP, getJSPFriendlyName, getRequestContext, getTarget, getURLPattern, toString
-
-
-
-
Method Detail
-
targetedCommand
public Command targetedCommand(java.lang.Object target)
Creates and returns a targeted Command by combining a URL (as String) with this Command. The suppliedtargetobject must be non-nulland of type String. The URL passed to the constructor is actually an URL pattern, but it will be converted to a JSP page if it is a partial URL. If it is a full URL (beginning withhttp://orhttps://), it will be "passed through" without conversion, and the URL pattern will benull.- Specified by:
targetedCommandin interfaceCommand- Specified by:
targetedCommandin classAbstractCommand- Parameters:
target- the object to combine- 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()
Description copied from interface:CommandReturns the human-friendly name for this command.- Specified by:
getNamein interfaceCommand- Specified by:
getNamein classAbstractCommand- Returns:
- the name
- See Also:
Command.getName()
-
requiredPermission
public java.security.Permission requiredPermission()
No-op; always returnsnull.- Returns:
- the required permission, or
nullif not required - See Also:
Command.requiredPermission()
-
-