Interface FormulaContext
-
- All Known Implementing Classes:
DefaultFormulaContext
public interface FormulaContextThe formula-context connects the formula functions with the outside world. The context can be used to resolve external references, to query the configuration or to retrieve information about the formula-evaluation system.- Author:
- Thomas Morgner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.pentaho.reporting.libraries.base.config.ConfigurationgetConfiguration()Returns the local configuration of the formula.FunctionRegistrygetFunctionRegistry()Returns the function registry.LocalizationContextgetLocalizationContext()Returns the localization context of this formula.OperatorFactorygetOperatorFactory()Returns the operator registry.TypeRegistrygetTypeRegistry()Returns the type registry.booleanisReferenceDirty(java.lang.Object name)Checks whether the external object referenced bynamehas changed.java.lang.ObjectresolveReference(java.lang.Object name)Resolves the given reference.TyperesolveReferenceType(java.lang.Object name)Queries the type of the given reference.
-
-
-
Method Detail
-
isReferenceDirty
boolean isReferenceDirty(java.lang.Object name) throws ContextEvaluationExceptionChecks whether the external object referenced bynamehas changed.- Parameters:
name- the name that identifies the reference.- Returns:
- true, if the reference has changed, false otherwise.
- Throws:
ContextEvaluationException- if an error occurs.
-
resolveReference
java.lang.Object resolveReference(java.lang.Object name) throws ContextEvaluationExceptionResolves the given reference. How the name is interpreted by the outside system is an implementation detail.- Parameters:
name- the name that identifies the reference.- Returns:
- the resolved object.
- Throws:
ContextEvaluationException- if an error occurs.
-
resolveReferenceType
Type resolveReferenceType(java.lang.Object name) throws ContextEvaluationException
Queries the type of the given reference. How the name is interpreted by the outside system is an implementation detail. This return a LibFormula type object matching the type of the object that would be returned by resolveReference.- Parameters:
name- the name that identifies the reference.- Returns:
- the type of the resolved object.
- Throws:
ContextEvaluationException- if an error occurs.
-
getLocalizationContext
LocalizationContext getLocalizationContext()
Returns the localization context of this formula. The localization context can be used to query locale specific configuration settings.- Returns:
- the localization context.
-
getConfiguration
org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
Returns the local configuration of the formula.- Returns:
- the local configuration.
-
getFunctionRegistry
FunctionRegistry getFunctionRegistry()
Returns the function registry. The function registry grants access to all formula-function implementations.- Returns:
- the function registry.
-
getTypeRegistry
TypeRegistry getTypeRegistry()
Returns the type registry. The type registry contains all type information and allows to convert values between different types.- Returns:
- the function registry.
-
getOperatorFactory
OperatorFactory getOperatorFactory()
Returns the operator registry. The Operator-registry contains all operator-implementations.- Returns:
- the operator registry.
-
-