public class NamespaceParameterValuesWrapper extends java.lang.Object implements ParameterValues
The main usage for this class is when a master plug-in needs to use other child plug-ins. By wrapping the parameter values with an instance of this class it makes it possible to store all parameters together without having to worry about name clashes among the children.
NamespacePluginParameter
,
NamespaceRequestWrapper
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
namespace |
private ParameterValues |
parent |
Constructor and Description |
---|
NamespaceParameterValuesWrapper(ParameterValues parent,
java.lang.String namespace)
Create a new namespace wrapper for the parent parameter
values.
|
Modifier and Type | Method and Description |
---|---|
int |
getId()
Get the ID of the job or configuration the parameters
comes from.
|
Job |
getJob()
Get the job that we are executing/configuring.
|
PluginConfiguration |
getPluginConfiguration()
Get the configuration that we are using/configuring.
|
PluginDefinition |
getPluginDefinition()
Get the plugin that we are executing/configuring.
|
java.lang.Object |
getValue(java.lang.String name)
Get a single value for a specific parameter.
|
java.util.List<?> |
getValues(java.lang.String name)
Get a
List of values for a specific parameter. |
<T> void |
setValue(java.lang.String name,
ParameterType<T> type,
T value)
Set a single value for a parameter.
|
<T> void |
setValues(java.lang.String name,
ParameterType<T> type,
java.util.List<T> values)
Set a list of values for a parameter.
|
private final java.lang.String namespace
private final ParameterValues parent
public NamespaceParameterValuesWrapper(ParameterValues parent, java.lang.String namespace)
parent
- The parent parameter values, null is not allowednamespace
- The namespace, null is not allowedpublic int getId()
ParameterValues
getId
in interface ParameterValues
public Job getJob()
ParameterValues
getJob
in interface ParameterValues
public PluginConfiguration getPluginConfiguration()
ParameterValues
getPluginConfiguration
in interface ParameterValues
public PluginDefinition getPluginDefinition()
ParameterValues
getPluginDefinition
in interface ParameterValues
public java.lang.Object getValue(java.lang.String name) throws PermissionDeniedException, BaseException
ParameterValues
ParameterValues.getValues(String)
to return
all values as a list.getValue
in interface ParameterValues
name
- the name of the parameterPermissionDeniedException
- If the logged in user doesn't
have permission to read the valueBaseException
- If there is another errorpublic java.util.List<?> getValues(java.lang.String name) throws PermissionDeniedException, BaseException
ParameterValues
List
of values for a specific parameter.getValues
in interface ParameterValues
name
- The name of the parameterPermissionDeniedException
- If the logged in user doesn't
have permission to read the valuesBaseException
- If there is another errorpublic <T> void setValue(java.lang.String name, ParameterType<T> type, T value) throws PermissionDeniedException, InvalidDataException, BaseException
ParameterValues
setValue
in interface ParameterValues
name
- The name of the parametertype
- The type of the valuevalue
- The value to be setPermissionDeniedException
- If the logged in user doesn't
have write permissionInvalidDataException
- If the value is invalid according
to the settings in the typeBaseException
- If there is another errorpublic <T> void setValues(java.lang.String name, ParameterType<T> type, java.util.List<T> values) throws PermissionDeniedException, InvalidDataException, BaseException
ParameterValues
setValues
in interface ParameterValues
name
- The name of the parametertype
- The type of the valuevalues
- A list containing the valuesPermissionDeniedException
- If the logged in user doesn't
have write permissionInvalidDataException
- If any of the values is invalid according
to the settings in the typeBaseException
- If there is another error