|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.ParameterValuesImpl
class ParameterValuesImpl
An implementation of the ParameterValues interface that
lets a plugin write the job's configuration.
| Field Summary | |
|---|---|
private PluginConfiguration |
configuration
|
private int |
id
The id of the job or configuration. |
private Job |
job
|
private Map<String,List<?>> |
parameters
Preloaded parameter values, if the write protected flag is set. |
private Map<String,ParameterType> |
parameterTypes
|
private PluginDefinition |
plugin
|
private boolean |
writeProtected
The configuration should only be writeable when configuring the job, not while executing a job. |
| Constructor Summary | |
|---|---|
ParameterValuesImpl(Job job,
boolean writeProtected)
|
|
ParameterValuesImpl(PluginConfiguration config,
int version,
boolean writeProtected)
|
|
ParameterValuesImpl(PluginDefinition plugin)
Empty parameter values |
|
| Method Summary | ||
|---|---|---|
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. |
|
(package private) boolean |
isWriteProtected()
|
|
(package private) void |
saveParameters(Job job,
Map<String,PluginParameter<?>> moreInfo)
|
|
(package private) void |
saveParameters(PluginConfiguration config,
Map<String,PluginParameter<?>> moreInfo)
|
|
|
setValue(String name,
ParameterType<T> type,
T value)
Set a single value for a parameter. |
|
|
setValues(String name,
ParameterType<T> type,
List<T> values)
Set a list of values for a parameter. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final int id
private final Job job
private final PluginConfiguration configuration
private final PluginDefinition plugin
private final boolean writeProtected
private final Map<String,List<?>> parameters
private final Map<String,ParameterType> parameterTypes
| Constructor Detail |
|---|
ParameterValuesImpl(PluginDefinition plugin)
ParameterValuesImpl(Job job,
boolean writeProtected)
throws BaseException
BaseException
ParameterValuesImpl(PluginConfiguration config,
int version,
boolean writeProtected)
throws BaseException
BaseException| Method Detail |
|---|
public Job getJob()
ParameterValues
getJob in interface ParameterValuespublic PluginDefinition getPluginDefinition()
ParameterValues
getPluginDefinition in interface ParameterValuespublic PluginConfiguration getPluginConfiguration()
ParameterValues
getPluginConfiguration in interface ParameterValuespublic int getId()
ParameterValues
getId in interface ParameterValues
public Object getValue(String name)
throws PermissionDeniedException,
BaseException
ParameterValuesParameterValues.getValues(String) to return
all values as a list.
getValue in interface ParameterValuesname - the name of the parameter
PermissionDeniedException - If the logged in user doesn't
have permission to read the value
BaseException - If there is another error
public List<?> getValues(String name)
throws PermissionDeniedException,
BaseException
ParameterValuesList of values for a specific parameter.
getValues in interface ParameterValuesname - The name of the parameter
PermissionDeniedException - If the logged in user doesn't
have permission to read the values
BaseException - If there is another error
public <T> void setValue(String name,
ParameterType<T> type,
T value)
throws PermissionDeniedException,
InvalidDataException,
BaseException
ParameterValues
setValue in interface ParameterValuesname - The name of the parametertype - The type of the valuevalue - The value to be set
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If the value is invalid according
to the settings in the type
BaseException - If there is another error
public <T> void setValues(String name,
ParameterType<T> type,
List<T> values)
throws PermissionDeniedException,
InvalidDataException,
BaseException
ParameterValues
setValues in interface ParameterValuesname - The name of the parametertype - The type of the valuevalues - A list containing the values
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If any of the values is invalid according
to the settings in the type
BaseException - If there is another errorboolean isWriteProtected()
void saveParameters(Job job,
Map<String,PluginParameter<?>> moreInfo)
void saveParameters(PluginConfiguration config,
Map<String,PluginParameter<?>> moreInfo)
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||