Package io.higson.runtime.engine.core
Interface ParamEngine
- All Known Implementing Classes:
SmartParamEngine
public interface ParamEngine
Single point of entry to get all parameters and call functions managed by
parameter engine.
- Author:
- Adam Dubiel
-
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 parameterName, ParamContext context) 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.
-
Method Details
-
get
Return submatrix of parameter rows that match values from context. Remember, that to use dynamic context levels need to have defined levelCreators.- Parameters:
parameterName- name of parameter to searchcontext- evaluation context- Returns:
- resulting submatrix
-
get
Return submatrix of parameter rows that match provided query values. Input levels array should have length equal to parameters input levels count.- Parameters:
paramName- name of parameter to searchinputLevels- values to match against each input level- Returns:
- resulting submatrix
-
callFunction
Use function engine to call function registered under provided name, passing provided invocation arguments.- Parameters:
functionName- name of function to runargs- function invocation arguments- Returns:
- invocation result, null for void functions
-
callEvaluatedFunction
Evaluate parameter using provided context and use returned value retrieved usingParamValue.get()as name of function to call with provided arguments.- Parameters:
paramName- name of parameter to evaluatectx- evaluation contextargs- function invocation arguments- Returns:
- invocation result, null for void functions
-
runtimeConfiguration
ParamEngineRuntimeConfig runtimeConfiguration()Return runtime configuration of this instance of parameter engine.- Returns:
- runtime config
-
getDigest
Return digest of one of given Parameter/Funcion/Literal value- 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.
-