Package org.pentaho.di.core.parameters
Class NamedParamsDefault
- java.lang.Object
-
- org.pentaho.di.core.parameters.NamedParamsDefault
-
- All Implemented Interfaces:
NamedParams
public class NamedParamsDefault extends Object implements NamedParams
This class is an implementation of NamedParams.- Author:
- Sven Boden
-
-
Constructor Summary
Constructors Constructor Description NamedParamsDefault()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateParameters()
Activate the currently set parametersvoid
addParameterDefinition(String key, String defValue, String description)
Add a parameter definition to this set.void
clearParameters()
Clear all parametersvoid
copyParametersFrom(NamedParams aParam)
Copy params to these named parameters (clearing out first).void
eraseParameters()
Clear the values.String
getParameterDefault(String key)
Get the default value of a parameter.String
getParameterDescription(String key)
Get the description of a parameter.String
getParameterValue(String key)
Get the value of a parameter.String[]
listParameters()
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.
-
-
-
Method Detail
-
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
public String getParameterDescription(String key) throws UnknownParamException
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
public String getParameterValue(String key) throws UnknownParamException
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
public String getParameterDefault(String key) throws UnknownParamException
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
public String[] listParameters()
Description copied from interface:NamedParams
List the parameters.- Specified by:
listParameters
in interfaceNamedParams
- Returns:
- Array of parameters.
-
setParameterValue
public void setParameterValue(String key, String value)
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
public void copyParametersFrom(NamedParams aParam)
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
public void mergeParametersWith(NamedParams aParam, boolean replace)
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
-
-