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
All Methods Instance Methods Abstract Methods Default 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 params)
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.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 Detail
-
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
void setParameterValue(String key, String value) throws UnknownParamException
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
String getParameterValue(String key) throws UnknownParamException
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
String getParameterDescription(String key) throws UnknownParamException
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
String getParameterDefault(String key) throws UnknownParamException
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
void copyParametersFrom(NamedParams params)
Copy params to these named parameters (clearing out first).- Parameters:
params
- the parameters to copy from.
-
mergeParametersWith
default void mergeParametersWith(NamedParams params, boolean replace)
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
-
-