public class NamespaceRequestWrapper extends java.lang.Object implements Request
The main usage for this class is when a master plug-in needs to use other child plug-ins. By wrapping the request with an instance of this class it makes it possible to forward the request to the child plug-in without having to worry about name clashes among the children.
NamespaceParameterValuesWrapper
,
NamespacePluginParameter
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
namespace |
private Request |
parent |
COMMAND_CONFIGURE_JOB, COMMAND_CONFIGURE_PLUGIN, COMMAND_EXECUTE
Constructor and Description |
---|
NamespaceRequestWrapper(Request parent,
java.lang.String namespace)
Create a new namespace wrapper for the parent request.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCommand()
The command the plugin should execute.
|
java.lang.Object |
getParameterValue(java.lang.String name)
Get the value for the parameter with the specified name.
|
java.util.List<?> |
getParameterValues(java.lang.String name)
Get the values for the parameter with the specified name.
|
java.io.Serializable |
getState()
Get state information that was previously saved by
Response.setPause(String, String, java.io.Serializable)
or Response.setContinue(String, java.io.Serializable) . |
boolean |
isAllowedImmediateExecution()
If this plugin has been allowed immediate execution or not.
|
private final Request parent
private final java.lang.String namespace
public NamespaceRequestWrapper(Request parent, java.lang.String namespace)
parent
- The parent request values, null is not allowednamespace
- The namespace, null is not allowedpublic java.lang.String getCommand()
Request
getCommand
in interface Request
public java.io.Serializable getState()
Request
Response.setPause(String, String, java.io.Serializable)
or Response.setContinue(String, java.io.Serializable)
.public java.lang.Object getParameterValue(java.lang.String name) throws ParameterException
Request
getParameterValue
in interface Request
name
- The name of the parameterParameterException
- If getting the value fails.public java.util.List<?> getParameterValues(java.lang.String name)
Request
getParameterValues
in interface Request
name
- The name of the parameterpublic boolean isAllowedImmediateExecution()
Request
Response.setExecuteImmediately(String, Job.ExecutionTime, boolean)
or, if the plugin is a ImmediateDownloadExporter
,
Response.setDownloadImmediately(String, Job.ExecutionTime, boolean)
.isAllowedImmediateExecution
in interface Request