class DefaultConfigurationValues extends Object implements ParameterValues
Modifier and Type | Field and Description |
---|---|
private ParameterValues |
configuration |
private Map<String,Object> |
defaultValues |
Constructor and Description |
---|
DefaultConfigurationValues(ParameterValues configuration) |
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.
|
Object |
getValue(String name)
Get a single value for a specific parameter.
|
List<?> |
getValues(String name)
Get a
List of values for a specific parameter. |
<T> void |
setValue(String name,
ParameterType<T> type,
T value)
Set a single value for a parameter.
|
<T> void |
setValues(String name,
ParameterType<T> type,
List<T> values)
Set a list of values for a parameter.
|
private final ParameterValues configuration
DefaultConfigurationValues(ParameterValues configuration)
public PluginDefinition getPluginDefinition()
ParameterValues
getPluginDefinition
in interface ParameterValues
public Job getJob()
ParameterValues
getJob
in interface ParameterValues
public PluginConfiguration getPluginConfiguration()
ParameterValues
getPluginConfiguration
in interface ParameterValues
public int getId()
ParameterValues
getId
in interface ParameterValues
public Object getValue(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 List<?> getValues(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(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(String name, ParameterType<T> type, 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