@Component public class ParameterHelper extends Object
| Constructor and Description |
|---|
ParameterHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
getParameterValue(Map<String,String> parameters,
ConfigurationValue configurationValue)
Gets the parameter value if found or defaults to the relative configuration setting value.
|
int |
getParameterValueAsInteger(Map<String,String> parameters,
ConfigurationValue configurationValue)
Gets the parameter value if found or defaults to the relative configuration setting value.
|
int |
getParameterValueAsInteger(Parameter parameter)
Parses the parameter value as a signed decimal integer.
|
void |
validateParameters(List<Parameter> parameters)
Validates that parameter names are there and that there are no duplicate parameter names in case insensitive manner.
|
public int getParameterValueAsInteger(Parameter parameter) throws IllegalArgumentException
parameter - the string value to be parsedIllegalArgumentException - if the parameter value does not contain a parsable integerpublic int getParameterValueAsInteger(Map<String,String> parameters, ConfigurationValue configurationValue) throws IllegalArgumentException
parameters - the map of parametersconfigurationValue - the configuration valueIllegalArgumentException - if the parameter value does not contain a parsable integerpublic void validateParameters(List<Parameter> parameters)
parameters - the list of parameters to be validatedpublic String getParameterValue(Map<String,String> parameters, ConfigurationValue configurationValue)
parameters - the map of parametersconfigurationValue - the configuration valueCopyright © 2019. All rights reserved.