Class DefaultFormulaContext
- java.lang.Object
-
- org.pentaho.reporting.libraries.formula.DefaultFormulaContext
-
- All Implemented Interfaces:
FormulaContext
public class DefaultFormulaContext extends Object implements FormulaContext
Creation-Date: 31.10.2006, 16:32:32- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description DefaultFormulaContext()DefaultFormulaContext(org.pentaho.reporting.libraries.base.config.Configuration config)DefaultFormulaContext(org.pentaho.reporting.libraries.base.config.Configuration config, Locale locale, TimeZone timeZone)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineReference(Object name, Object value)org.pentaho.reporting.libraries.base.config.ConfigurationgetConfiguration()Returns the local configuration of the formula.DategetCurrentDate()Returns the current date.FunctionRegistrygetFunctionRegistry()Returns the function registry.LocalizationContextgetLocalizationContext()Returns the localization context of this formula.OperatorFactorygetOperatorFactory()Returns the operator registry.TypeRegistrygetTypeRegistry()Returns the type registry.booleanisReferenceDirty(Object name)Checks whether the external object referenced bynamehas changed.ObjectresolveReference(Object name)Resolves the given reference.TyperesolveReferenceType(Object name)Queries the type of the given reference.
-
-
-
Method Detail
-
getOperatorFactory
public OperatorFactory getOperatorFactory()
Description copied from interface:FormulaContextReturns the operator registry. The Operator-registry contains all operator-implementations.- Specified by:
getOperatorFactoryin interfaceFormulaContext- Returns:
- the operator registry.
-
resolveReference
public Object resolveReference(Object name)
Description copied from interface:FormulaContextResolves the given reference. How the name is interpreted by the outside system is an implementation detail.- Specified by:
resolveReferencein interfaceFormulaContext- Parameters:
name- the name that identifies the reference.- Returns:
- the resolved object.
-
getConfiguration
public org.pentaho.reporting.libraries.base.config.Configuration getConfiguration()
Description copied from interface:FormulaContextReturns the local configuration of the formula.- Specified by:
getConfigurationin interfaceFormulaContext- Returns:
- the local configuration.
-
getFunctionRegistry
public FunctionRegistry getFunctionRegistry()
Description copied from interface:FormulaContextReturns the function registry. The function registry grants access to all formula-function implementations.- Specified by:
getFunctionRegistryin interfaceFormulaContext- Returns:
- the function registry.
-
resolveReferenceType
public Type resolveReferenceType(Object name)
Description copied from interface:FormulaContextQueries 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.- Specified by:
resolveReferenceTypein interfaceFormulaContext- Parameters:
name- the name that identifies the reference.- Returns:
- the type of the resolved object.
-
getTypeRegistry
public TypeRegistry getTypeRegistry()
Description copied from interface:FormulaContextReturns the type registry. The type registry contains all type information and allows to convert values between different types.- Specified by:
getTypeRegistryin interfaceFormulaContext- Returns:
- the function registry.
-
getLocalizationContext
public LocalizationContext getLocalizationContext()
Description copied from interface:FormulaContextReturns the localization context of this formula. The localization context can be used to query locale specific configuration settings.- Specified by:
getLocalizationContextin interfaceFormulaContext- Returns:
- the localization context.
-
isReferenceDirty
public boolean isReferenceDirty(Object name)
Description copied from interface:FormulaContextChecks whether the external object referenced bynamehas changed.- Specified by:
isReferenceDirtyin interfaceFormulaContext- Parameters:
name- the name that identifies the reference.- Returns:
- true, if the reference has changed, false otherwise.
-
getCurrentDate
public Date getCurrentDate()
Description copied from interface:FormulaContextReturns the current date.- Specified by:
getCurrentDatein interfaceFormulaContext- Returns:
- the date.
-
-