Package org.pentaho.reporting.libraries.formula

# 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(Configuration config)`
`DefaultFormulaContext(Configuration config, Locale locale, TimeZone timeZone)`

## Method Summary

Modifier and Type
Method
Description
`void`
`defineReference(Object name, Object value)`
`Configuration`
`getConfiguration()`
Returns the local configuration of the formula.
`FunctionRegistry`
`getFunctionRegistry()`
Returns the function registry.
`LocalizationContext`
`getLocalizationContext()`
Returns the localization context of this formula.
`OperatorFactory`
`getOperatorFactory()`
Returns the operator registry.
`TypeRegistry`
`getTypeRegistry()`
Returns the type registry.
`boolean`
`isReferenceDirty(Object name)`
Checks whether the external object referenced by `name` has changed.
`Object`
`resolveReference(Object name)`
Resolves the given reference.
`Type`
`resolveReferenceType(Object name)`
Queries the type of the given reference.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultFormulaContext

public DefaultFormulaContext()

### DefaultFormulaContext

public DefaultFormulaContext(Configuration config)

### DefaultFormulaContext

public DefaultFormulaContext(Configuration config, Locale locale, TimeZone timeZone)

## Method Details

### getOperatorFactory

public OperatorFactory getOperatorFactory()
Description copied from interface: `FormulaContext`
Returns the operator registry. The Operator-registry contains all operator-implementations.

Specified by:
  `getOperatorFactory` in interface `FormulaContext`
Returns:
  the operator registry.

### defineReference

public void defineReference(Object name, Object value)

### resolveReference

public Object resolveReference(Object name)
Description copied from interface: `FormulaContext`
Resolves the given reference. How the name is interpreted by the outside system is an implementation detail.

Specified by:
  `resolveReference` in interface `FormulaContext`
Parameters:
  `name` - the name that identifies the reference.
Returns:
  the resolved object.

### getConfiguration

public Configuration getConfiguration()
Description copied from interface: `FormulaContext`
Returns the local configuration of the formula.

Specified by:
  `getConfiguration` in interface `FormulaContext`
Returns:
  the local configuration.

### getFunctionRegistry

public FunctionRegistry getFunctionRegistry()
Description copied from interface: `FormulaContext`
Returns the function registry. The function registry grants access to all formula-function implementations.

Specified by:
  `getFunctionRegistry` in interface `FormulaContext`
Returns:
  the function registry.

### resolveReferenceType

public Type resolveReferenceType(Object name)
Description copied from interface: `FormulaContext`
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.

Specified by:
  `resolveReferenceType` in interface `FormulaContext`
Parameters:
  `name` - the name that identifies the reference.
Returns:
  the type of the resolved object.

### getTypeRegistry

public TypeRegistry getTypeRegistry()
Description copied from interface: `FormulaContext`
Returns the type registry. The type registry contains all type information and allows to convert values between different types.

Specified by:
  `getTypeRegistry` in interface `FormulaContext`
Returns:
  the function registry.

### getLocalizationContext

public LocalizationContext getLocalizationContext()
Description copied from interface: `FormulaContext`
Returns the localization context of this formula. The localization context can be used to query locale specific configuration settings.

Specified by:
  `getLocalizationContext` in interface `FormulaContext`
Returns:
  the localization context.

### isReferenceDirty

public boolean isReferenceDirty(Object name)
Description copied from interface: `FormulaContext`
Checks whether the external object referenced by `name` has changed.

Specified by:
  `isReferenceDirty` in interface `FormulaContext`
Parameters:
  `name` - the name that identifies the reference.
Returns:
  true, if the reference has changed, false otherwise.