public final class ConfigurationHelper extends Object
ParameterStructure
Modifier and Type | Field and Description |
---|---|
static String |
UNKNOWN_VALUE |
static String |
UNSPECIFIED_VALUE |
Modifier and Type | Method and Description |
---|---|
static <T> Parameter<T> |
buildSimpleMultiValuedParam(String param,
Collection<T> values) |
static <T> Parameter<T> |
buildSimpleParam(String param,
T value) |
static <T> Collection<T> |
getMandatoryMultivaluedParameter(String paramName,
ParameterStructure parameters) |
static boolean |
getMandatoryParameterAsBoolean(String paramName,
ParameterStructure parameters) |
static byte[] |
getMandatoryParameterAsByteArray(String paramName,
ParameterStructure parameters) |
static int |
getMandatoryParameterAsInt(String paramName,
ParameterStructure parameters) |
static long |
getMandatoryParameterAsLong(String paramName,
ParameterStructure parameters) |
static String |
getMandatoryParameterAsString(String paramName,
ParameterStructure parameters) |
static <T> Collection<T> |
getOptionalMultivaluedParameter(String paramName,
ParameterStructure parameters) |
static boolean |
getOptionalParameterAsBoolean(String paramName,
boolean defaultValue,
ParameterStructure parameters) |
static Boolean |
getOptionalParameterAsBoolean(String paramName,
Boolean defaultValue,
ParameterStructure parameters) |
static byte |
getOptionalParameterAsByte(String paramName,
byte defaultValue,
ParameterStructure parameters) |
static byte[] |
getOptionalParameterAsByteArray(String paramName,
byte[] defaultValue,
ParameterStructure parameters) |
static char |
getOptionalParameterAsChar(String paramName,
char defaultValue,
ParameterStructure parameters) |
static int |
getOptionalParameterAsInt(String paramName,
int defaultValue,
ParameterStructure parameters) |
static long |
getOptionalParameterAsLong(String paramName,
long defaultValue,
ParameterStructure parameters) |
static float |
getOptionalParameterAsNonNegativeFloat(String paramName,
float defaultValue,
ParameterStructure parameters) |
static int |
getOptionalParameterAsNonNegativeInt(String paramName,
int defaultValue,
ParameterStructure parameters) |
static long |
getOptionalParameterAsNonNegativeLong(String paramName,
long defaultValue,
ParameterStructure parameters) |
static int |
getOptionalParameterAsPositiveInt(String paramName,
int defaultValue,
ParameterStructure parameters) |
static String |
getOptionalParameterAsString(String paramName,
String defaultValue,
ParameterStructure parameters) |
static <T> Collection<T> |
getValues(ParameterStructure params,
String pathExpressions)
Obtains the values of the parameters indicated in the pathExpression.
|
static boolean |
isParamEncrypted(ParameterStructure parameters,
String parameterName) |
static void |
postProcessConfiguration(Configuration config) |
static void |
postProcessConfiguration(Configuration config,
boolean legacy) |
static void |
postProcessConfiguration(MetadataManager manager,
Configuration config) |
static void |
postProcessConfiguration(MetadataManager manager,
Configuration config,
boolean legacy) |
static void |
replaceAll(ParameterStructure params,
String pathExpressions,
Map<String,?> paramValues)
Replaces each value of the parameters indicated in the pathExpression
with the given replacement in the map provided.
|
static void |
replaceAll(ParameterStructure params,
String pathExpressions,
Map<String,?> paramValues,
boolean keepCurrentIfNoReplacement) |
static void |
replaceAll(ParameterStructure params,
String pathExpressions,
UnaryOperator<String> getElementName) |
static Collection<String> |
replaceAllWithWarnings(ParameterStructure params,
String pathExpressions,
Map<String,?> paramValues) |
static Collection<String> |
replaceAllWithWarnings(ParameterStructure params,
String pathExpressions,
Map<String,?> paramValues,
boolean keepCurrentIfNoReplacement) |
static Collection<String> |
replaceAllWithWarnings(ParameterStructure params,
String pathExpressions,
UnaryOperator<String> getElementName) |
public static final String UNSPECIFIED_VALUE
public static final String UNKNOWN_VALUE
public static String getMandatoryParameterAsString(String paramName, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static String getOptionalParameterAsString(String paramName, String defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static char getOptionalParameterAsChar(String paramName, char defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static int getMandatoryParameterAsInt(String paramName, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static int getOptionalParameterAsNonNegativeInt(String paramName, int defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static int getOptionalParameterAsPositiveInt(String paramName, int defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static int getOptionalParameterAsInt(String paramName, int defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static byte getOptionalParameterAsByte(String paramName, byte defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static long getMandatoryParameterAsLong(String paramName, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static long getOptionalParameterAsNonNegativeLong(String paramName, long defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static long getOptionalParameterAsLong(String paramName, long defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static float getOptionalParameterAsNonNegativeFloat(String paramName, float defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static boolean getMandatoryParameterAsBoolean(String paramName, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static boolean getOptionalParameterAsBoolean(String paramName, boolean defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static Boolean getOptionalParameterAsBoolean(String paramName, Boolean defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static byte[] getMandatoryParameterAsByteArray(String paramName, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static byte[] getOptionalParameterAsByteArray(String paramName, byte[] defaultValue, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static <T> Collection<T> getMandatoryMultivaluedParameter(String paramName, ParameterStructure parameters) throws ConfigurationException
ConfigurationException
public static <T> Collection<T> getOptionalMultivaluedParameter(String paramName, ParameterStructure parameters)
public static void replaceAll(ParameterStructure params, String pathExpressions, Map<String,?> paramValues)
params
- pathExpressions
- A path expression describes the location of
a Parameter in the ParameterStructure. By starting at the root
parameter, select any parameter creating a chain of
children parameters. The last parameter of the expression should
be a SimpleParameter.Each parameter is separated by "::".
Each path expression is separated by ",".
For example: for replacing the values of parameters dataSource
and filterSequenceID the path expression should be:
"dataSource,processor::filterSequenceID".paramValues
- Map containing the replacements for the parameter
values. The key of the Map is parameter value to be replaced.
The value of the Map is the replacement.public static void replaceAll(ParameterStructure params, String pathExpressions, Map<String,?> paramValues, boolean keepCurrentIfNoReplacement)
public static void replaceAll(ParameterStructure params, String pathExpressions, UnaryOperator<String> getElementName)
public static Collection<String> replaceAllWithWarnings(ParameterStructure params, String pathExpressions, UnaryOperator<String> getElementName)
public static Collection<String> replaceAllWithWarnings(ParameterStructure params, String pathExpressions, Map<String,?> paramValues)
public static Collection<String> replaceAllWithWarnings(ParameterStructure params, String pathExpressions, Map<String,?> paramValues, boolean keepCurrentIfNoReplacement)
public static <T> Collection<T> getValues(ParameterStructure params, String pathExpressions)
T
- params
- pathExpressions
- A path expression describes the location of
a Parameter in the ParameterStructure. By starting at the root
parameter, select any parameter creating a chain of
children parameters. The last parameter of the expression should
be a SimpleParameter. Each parameter is separated by "::".
Each path expression is separated by ",".
For example: for obtaining the values of parameters type of
crawler and type of exporter the path expression should be:
"crawler::type,processor::exporter::type".public static boolean isParamEncrypted(ParameterStructure parameters, String parameterName) throws ConfigurationException
ConfigurationException
public static <T> Parameter<T> buildSimpleMultiValuedParam(String param, Collection<T> values)
public static void postProcessConfiguration(Configuration config) throws ConfigurationException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException
public static void postProcessConfiguration(MetadataManager manager, Configuration config) throws ConfigurationException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException
public static void postProcessConfiguration(Configuration config, boolean legacy) throws ConfigurationException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException
public static void postProcessConfiguration(MetadataManager manager, Configuration config, boolean legacy) throws ConfigurationException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException
Copyright © 2025 Denodo Technologies. All rights reserved.