public class DataFlowParameterResolution extends Object
Constructor and Description |
---|
DataFlowParameterResolution() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
resolveMap(String name,
Map<String,Object> evals,
DataFlowOpInitializeContext context)
Resolve all entries in the map by first looking at the parameter value provider and by using the evaluator if one was provided
or returning the provided value if no evaluator was found.
|
static Number |
resolveNumber(String name,
ExprEvaluator optionalEvaluator,
Number defaultValue,
DataFlowOpInitializeContext context)
Resolve a number value by first looking at the parameter value provider and by using the evaluator if one was provided,
returning the default value if no value was found and no evaluator was provided.
|
static <T> T |
resolveOptionalInstance(String name,
Map<String,Object> configuration,
Class<T> clazz,
DataFlowOpInitializeContext context)
Resolve an instance from a class-name map.
|
static String |
resolveStringOptional(String name,
ExprEvaluator optionalEvaluator,
DataFlowOpInitializeContext context)
Resolve a string value by first looking at the parameter value provider and by using the evaluator if one was provided
or returning null if no value was found.
|
static String |
resolveStringRequired(String name,
ExprEvaluator optionalEvaluator,
DataFlowOpInitializeContext context)
Resolve a string value by first looking at the parameter value provider and by using the evaluator if one was provided,
throwing an exception if no value was provided.
|
static <T> T |
resolveWithDefault(String name,
ExprEvaluator optionalEvaluator,
T defaultValue,
Class<T> clazz,
DataFlowOpInitializeContext context)
Resolve a typed value by first looking at the parameter value provider and by using the evaluator if one was provided
or returning the provided default value if no value was found.
|
public static Number resolveNumber(String name, ExprEvaluator optionalEvaluator, Number defaultValue, DataFlowOpInitializeContext context)
name
- parameter nameoptionalEvaluator
- evaluatordefaultValue
- defaultcontext
- initialization contextpublic static String resolveStringRequired(String name, ExprEvaluator optionalEvaluator, DataFlowOpInitializeContext context)
name
- parameter nameoptionalEvaluator
- evaluatorcontext
- initialization contextEPException
- if no value was foundpublic static String resolveStringOptional(String name, ExprEvaluator optionalEvaluator, DataFlowOpInitializeContext context)
name
- parameter nameoptionalEvaluator
- evaluatorcontext
- initialization contextEPException
- if no value was foundpublic static <T> T resolveWithDefault(String name, ExprEvaluator optionalEvaluator, T defaultValue, Class<T> clazz, DataFlowOpInitializeContext context)
T
- the type of valuename
- parameter nameoptionalEvaluator
- evaluatorcontext
- initialization contextclazz
- type of valuedefaultValue
- default valuepublic static <T> T resolveOptionalInstance(String name, Map<String,Object> configuration, Class<T> clazz, DataFlowOpInitializeContext context)
T
- type of value returnedname
- parameter nameconfiguration
- map with key 'class' for the class nameclazz
- expected interface or supertypecontext
- initialization contextpublic static Map<String,Object> resolveMap(String name, Map<String,Object> evals, DataFlowOpInitializeContext context)
name
- parameter nameevals
- map of properties with either evaluator or constant typecontext
- initialization contextCopyright © 2005–2018. All rights reserved.