Package org.pentaho.di.core.parameters
Interface NamedParams
- All Known Implementing Classes:
NamedParamsDefault
public interface NamedParams
Interface to implement named parameters.
- Author:
- Sven Boden
-
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 params) 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.default void
mergeParametersWith
(NamedParams params, boolean replace) Merge the given named parameters with current ones.void
setParameterValue
(String key, String value) Set the value of a parameter.
-
Method Details
-
addParameterDefinition
void addParameterDefinition(String key, String defValue, String description) throws DuplicateParamException Add a parameter definition to this set. TODO: default, throw exception- Parameters:
key
- Name of the parameter.defValue
- default value.description
- Description of the parameter.- Throws:
DuplicateParamException
- Upon duplicate parameter definitions
-
setParameterValue
Set the value of a parameter.- Parameters:
key
- key to set value ofvalue
- value to set it to.- Throws:
UnknownParamException
- Parameter 'key' is unknown.
-
getParameterValue
Get the value of a parameter.- Parameters:
key
- Key to get value for.- Returns:
- value of parameter key.
- Throws:
UnknownParamException
- Parameter 'key' is unknown.
-
getParameterDescription
Get the description of a parameter.- Parameters:
key
- Key to get value for.- Returns:
- description of parameter key.
- Throws:
UnknownParamException
- Parameter 'key' is unknown.
-
getParameterDefault
Get the default value of a parameter.- Parameters:
key
- Key to get value for.- Returns:
- default value for parameter key.
- Throws:
UnknownParamException
- Parameter 'key' is unknown.
-
listParameters
String[] listParameters()List the parameters.- Returns:
- Array of parameters.
-
eraseParameters
void eraseParameters()Clear the values. -
copyParametersFrom
Copy params to these named parameters (clearing out first).- Parameters:
params
- the parameters to copy from.
-
mergeParametersWith
Merge the given named parameters with current ones.- Parameters:
params
- the parameters to merge with.replace
- replace if exists
-
activateParameters
void activateParameters()Activate the currently set parameters -
clearParameters
void clearParameters()Clear all parameters
-