Package io.higson.runtime.engine.core
Class SmartParamEngine
java.lang.Object
io.higson.runtime.engine.core.SmartParamEngine
- All Implemented Interfaces:
PropertiesAware,ParamEngine
- Since:
- 1.0.0
- Version:
- 1.0.2
- Author:
- Przemek Hertel
-
Constructor Summary
ConstructorsConstructorDescriptionSmartParamEngine(ParamPreparer paramPreparer, FunctionManager functionManager, ParamEngineRuntimeConfigBuilder configBuilder, OutputLevelArraySeparator arraySeparator) -
Method Summary
Modifier and TypeMethodDescriptioncallEvaluatedFunction(String paramName, ParamContext ctx, Object... args) Evaluate parameter using provided context and use returned value retrieved usingParamValue.get()as name of function to call with provided arguments.callFunction(String functionName, Object... args) Use function engine to call function registered under provided name, passing provided invocation arguments.get(String paramName, ParamContext ctx) Return submatrix of parameter rows that match values from context.Return submatrix of parameter rows that match provided query values.Return digest of one of given Parameter/Funcion/Literal valueReturn runtime configuration of this instance of parameter engine.voidsetInvokerInterceptor(FunctionInvokerInterceptor invokerInterceptor) voidsetProperties(Properties properties)
-
Constructor Details
-
SmartParamEngine
public SmartParamEngine(ParamPreparer paramPreparer, FunctionManager functionManager, ParamEngineRuntimeConfigBuilder configBuilder, OutputLevelArraySeparator arraySeparator)
-
-
Method Details
-
setInvokerInterceptor
-
runtimeConfiguration
Description copied from interface:ParamEngineReturn runtime configuration of this instance of parameter engine.- Specified by:
runtimeConfigurationin interfaceParamEngine- Returns:
- runtime config
-
getDigest
Description copied from interface:ParamEngineReturn digest of one of given Parameter/Funcion/Literal value- Specified by:
getDigestin interfaceParamEngine- Parameters:
type- of Higson element to calculate its digestelementCode- code of parameter/function or literal value- Returns:
- digest as string of given element or null, if digest is not available.
-
get
Description copied from interface:ParamEngineReturn submatrix of parameter rows that match values from context. Remember, that to use dynamic context levels need to have defined levelCreators.- Specified by:
getin interfaceParamEngine- Parameters:
paramName- name of parameter to searchctx- evaluation context- Returns:
- resulting submatrix
-
get
Description copied from interface:ParamEngineReturn submatrix of parameter rows that match provided query values. Input levels array should have length equal to parameters input levels count.- Specified by:
getin interfaceParamEngine- Parameters:
paramName- name of parameter to searchinputLevels- values to match against each input level- Returns:
- resulting submatrix
-
callFunction
Description copied from interface:ParamEngineUse function engine to call function registered under provided name, passing provided invocation arguments.- Specified by:
callFunctionin interfaceParamEngine- Parameters:
functionName- name of function to runargs- function invocation arguments- Returns:
- invocation result, null for void functions
-
callEvaluatedFunction
Description copied from interface:ParamEngineEvaluate parameter using provided context and use returned value retrieved usingParamValue.get()as name of function to call with provided arguments.- Specified by:
callEvaluatedFunctionin interfaceParamEngine- Parameters:
paramName- name of parameter to evaluatectx- evaluation contextargs- function invocation arguments- Returns:
- invocation result, null for void functions
-
setProperties
- Specified by:
setPropertiesin interfacePropertiesAware
-