Package pl.decerto.hyperon.runtime.core
Interface HyperonEngine
- All Known Implementing Classes:
HyperonEngineImpl
Deprecated.
This is access point to core functionalities of higson (engine). Possible actions:
1. Fetching parameters values based on context.
2. Calling functions with context and optional arguments.
3. Accessing domain object for profiles using full path.
4. Setting and removing effective dates and version of regions.
1. Fetching parameters values based on context.
2. Calling functions with context and optional arguments.
3. Accessing domain object for profiles using full path.
4. Setting and removing effective dates and version of regions.
- Author:
- przemek hertel
-
Method Summary
Modifier and TypeMethodDescriptioncall(@NotNull String functionName, @NotNull ParamContext ctx, Object... args) Deprecated.This method calls function defined within higson, with context and optional arguments.voidDeprecated.Removes effective date, that was once set.voidDeprecated.Removes both effective date and effective versions for all regions.voidclearEffectiveVersion(String region) Deprecated.Removes effective version for given region, if there was any.voidclearEffectiveVersion(String profileCode, String regionCode) Deprecated.Removes effective version for given region, if there was any.voidDeprecated.Removes all effective versions that were once set, even for multiple regions.get(@NotNull String parameterName, @NotNull ParamContext ctx) Deprecated.This method tries to fetch parameter's value for givenparameterNameand contextctx.Deprecated.Return digest of one of given Parameter/Funcion/Literal valueDeprecated.Get domain object based on given profile andobjectPath.Deprecated.Returns codes of profiles with at least one domain element.Deprecated.this method will be removed in future, please usegetExistingProfiles()Deprecated.Return runtime configuration of this instance of parameter/function engine.voidsetEffectiveDate(Date date) Deprecated.Enables to change effective date that will alter work of a schedule (if there is any).voidsetEffectiveVersion(String region, String version) Deprecated.Enables to change version for given region, so it will acts as effective version.voidsetEffectiveVersion(String profileCode, String regionCode, String version) Deprecated.Enables to change version for given region in given profile, so it will acts as effective version.
-
Method Details
-
get
Deprecated.This method tries to fetch parameter's value for givenparameterNameand contextctx. If parameter requires context for proper working(context is defined parameter's metadata), then it must be provided, so values could be fetched for matched context.Example:
HyperonEngine engine = .. // might be injected or created from HyperonEngineFactory ParamValue paramValue = engine.get("parameter.code", new HyperonContext());- Parameters:
parameterName- parameter namectx- context that is required for proper parameter fetching- Returns:
- parameter value if found, or might be null
- See Also:
-
call
Object call(@NotNull @NotNull String functionName, @NotNull @NotNull ParamContext ctx, Object... args) Deprecated.This method calls function defined within higson, with context and optional arguments. Function might return value asObject.Example:
HyperonEngine engine = .. // might be injected or created from HyperonEngineFactory Object result = engine.call("function.name", new HyperonContext(), 1, 2, 3);- Parameters:
functionName- function namectx- context used by functionargs- optional argument, if function requires them- Returns:
- possible result of function call
- See Also:
-
runtimeConfiguration
ParamEngineRuntimeConfig runtimeConfiguration()Deprecated.Return runtime configuration of this instance of parameter/function engine.- Returns:
- runtime config
-
setEffectiveVersion
Deprecated.Enables to change version for given region, so it will acts as effective version. System version based on schedule will not be altered. If given region is attached to more than one profile,AmbiguousProfileExceptionis thrown. UsesetEffectiveVersion(String, String, String)in such situation.- Parameters:
region- region codeversion- effective version- See Also:
-
setEffectiveVersion
Deprecated.Enables to change version for given region in given profile, so it will acts as effective version. System version based on schedule will not be altered.- Parameters:
profileCode- profile coderegionCode- region codeversion- effective version- See Also:
-
setEffectiveDate
Deprecated.Enables to change effective date that will alter work of a schedule (if there is any). After proper schedule was fetched, then version of parameters and functions is changed according to new schedule(based on given date).
Warning Current implementation doesn't affect fetching domain objects from engine. It might be changed in the future.- Parameters:
date- effective date to be used for schedule- See Also:
-
clearEffectiveVersion
Deprecated.Removes effective version for given region, if there was any. If given region is attached to more than one profile,AmbiguousProfileExceptionis thrown. UseclearEffectiveVersion(String, String)in such situation.- Parameters:
region- region code to reset- See Also:
-
clearEffectiveVersion
Deprecated.Removes effective version for given region, if there was any.- Parameters:
profileCode- profile coderegionCode- region code to reset- See Also:
-
clearEffectiveVersions
void clearEffectiveVersions()Deprecated.Removes all effective versions that were once set, even for multiple regions.- See Also:
-
clearEffectiveDate
void clearEffectiveDate()Deprecated.Removes effective date, that was once set. If there was no date, nothing happens.- See Also:
-
clearEffectiveSetup
void clearEffectiveSetup()Deprecated.Removes both effective date and effective versions for all regions.- See Also:
-
getProfiles
Deprecated.this method will be removed in future, please usegetExistingProfiles()Returns codes of profiles with at least one domain element.- Returns:
Listof profile codes for all profiles with at least one domain element, or empty list if there are no such profiles.
-
getExistingProfiles
Deprecated.Returns codes of profiles with at least one domain element.- Returns:
Setof profile codes for all profiles with at least one domain element, or empty list if there are no such profiles.- Since:
- 1.6.52
-
getDomain
Deprecated.Get domain object based on given profile andobjectPath. It will be either head object or from user's session.
How objectPath is defined: "/PLANS[LIAB]/OPTIONS[OPT1]" - where- /PLANS[LIAB] - LIAB code element within PLANS collection
- / - acts as separator between child and parent
- /OPTIONS[OPT1] - OPT1 code element within OPTIONS collection, that is child of PLANS[LIAB]
Example:
HyperonEngine engine = .. // might be injected or created from HyperonEngineFactory HyperonDomainObject root = engine.getDomain("PROFILE1", "/"); // root domain object for PROFILE1 HyperonDomainObject adminElement = engine.getDomain("PROFILE1", "/USERS[ADMIN]"); // domain object with code "ADMIN" within collection "USERS"- Parameters:
profile- profile codeobjectPath- full path to domain object- Returns:
- domain object if found, or null
- See Also:
-
getDigest
Deprecated.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.
-
HigsonEngine