Package org.pentaho.di.core.parameters
Class NamedParamsDefault
java.lang.Object
org.pentaho.di.core.parameters.NamedParamsDefault
- All Implemented Interfaces:
NamedParams
This class is an implementation of NamedParams.
- Author:
- Sven Boden
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Activate the currently set parametersvoid
addParameterDefinition
(String key, String defValue, String description) Add a parameter definition to this set.void
Clear all parametersvoid
copyParametersFrom
(NamedParams aParam) Copy params to these named parameters (clearing out first).void
Clear the values.Get the default value of a parameter.Get the description of a parameter.getParameterValue
(String key) Get the value of a parameter.String[]
List the parameters.void
mergeParametersWith
(NamedParams aParam, boolean replace) Merge the given named parameters with current ones.void
setParameterValue
(String key, String value) Set the value of a parameter.
-
Field Details
-
params
Map to store named parameters in.
-
-
Constructor Details
-
NamedParamsDefault
public NamedParamsDefault()Default constructor.
-
-
Method Details
-
addParameterDefinition
public void addParameterDefinition(String key, String defValue, String description) throws DuplicateParamException Description copied from interface:NamedParams
Add a parameter definition to this set. TODO: default, throw exception- Specified by:
addParameterDefinition
in interfaceNamedParams
- Parameters:
key
- Name of the parameter.defValue
- default value.description
- Description of the parameter.- Throws:
DuplicateParamException
- Upon duplicate parameter definitions
-
getParameterDescription
Description copied from interface:NamedParams
Get the description of a parameter.- Specified by:
getParameterDescription
in interfaceNamedParams
- Parameters:
key
- Key to get value for.- Returns:
- description of parameter key.
- Throws:
UnknownParamException
- Parameter 'key' is unknown.
-
getParameterValue
Description copied from interface:NamedParams
Get the value of a parameter.- Specified by:
getParameterValue
in interfaceNamedParams
- Parameters:
key
- Key to get value for.- Returns:
- value of parameter key.
- Throws:
UnknownParamException
- Parameter 'key' is unknown.
-
getParameterDefault
Description copied from interface:NamedParams
Get the default value of a parameter.- Specified by:
getParameterDefault
in interfaceNamedParams
- Parameters:
key
- Key to get value for.- Returns:
- default value for parameter key.
- Throws:
UnknownParamException
- Parameter 'key' is unknown.
-
listParameters
Description copied from interface:NamedParams
List the parameters.- Specified by:
listParameters
in interfaceNamedParams
- Returns:
- Array of parameters.
-
setParameterValue
Description copied from interface:NamedParams
Set the value of a parameter.- Specified by:
setParameterValue
in interfaceNamedParams
- Parameters:
key
- key to set value ofvalue
- value to set it to.
-
eraseParameters
public void eraseParameters()Description copied from interface:NamedParams
Clear the values.- Specified by:
eraseParameters
in interfaceNamedParams
-
clearParameters
public void clearParameters()Description copied from interface:NamedParams
Clear all parameters- Specified by:
clearParameters
in interfaceNamedParams
-
activateParameters
public void activateParameters()Description copied from interface:NamedParams
Activate the currently set parameters- Specified by:
activateParameters
in interfaceNamedParams
-
copyParametersFrom
Description copied from interface:NamedParams
Copy params to these named parameters (clearing out first).- Specified by:
copyParametersFrom
in interfaceNamedParams
- Parameters:
aParam
- the parameters to copy from.
-
mergeParametersWith
Description copied from interface:NamedParams
Merge the given named parameters with current ones.- Specified by:
mergeParametersWith
in interfaceNamedParams
- Parameters:
aParam
- the parameters to merge with.replace
- replace if exists
-