|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.plugin.NamespaceRequestWrapper
public class NamespaceRequestWrapper
A helper class that wraps a request object with a namespace. All parameter reading operations will be made to the specified namespace. Eg, the 'name' parameter is replaced with the namespace + dot + the original name. For example, if namespace="export" and name="toDir", the resulting name is "export.toDir". If the parameter doesn't exists, the global namespace is checked. (eg. toDir). All other methods simply forward to the same method of the parent object.
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
Field Summary | |
---|---|
private String |
namespace
|
private Request |
parent
|
Fields inherited from interface net.sf.basedb.core.plugin.Request |
---|
COMMAND_CONFIGURE_JOB, COMMAND_CONFIGURE_PLUGIN, COMMAND_EXECUTE |
Constructor Summary | |
---|---|
NamespaceRequestWrapper(Request parent,
String namespace)
Create a new namespace wrapper for the parent request. |
Method Summary | |
---|---|
String |
getCommand()
The command the plugin should execute. |
Object |
getParameterValue(String name)
Get the value for the parameter with the specified name. |
List<?> |
getParameterValues(String name)
Get the values for the parameter with the specified name. |
boolean |
isAllowedImmediateExecution()
If this plugin has been allowed immediate execution or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Request parent
private final String namespace
Constructor Detail |
---|
public NamespaceRequestWrapper(Request parent, String namespace)
parent
- The parent request values, null is not allowednamespace
- The namespace, null is not allowedMethod Detail |
---|
public String getCommand()
Request
getCommand
in interface Request
public Object getParameterValue(String name) throws ParameterException
Request
getParameterValue
in interface Request
name
- The name of the parameter
ParameterException
- If getting the value fails.public List<?> getParameterValues(String name)
Request
getParameterValues
in interface Request
name
- The name of the parameter
public 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
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |