Package org.eclipse.birt.chart.script

# Class AbstractScriptContext

java.lang.Object
org.eclipse.birt.chart.script.AbstractScriptContext

All Implemented Interfaces:
  `Serializable`, `IScriptContext`

Direct Known Subclasses:
  `ChartScriptContext`

public abstract class AbstractScriptContext extends Object implements IScriptContext
The abstract class implements common methods to store script contexts.

Since:
  2.5
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`AbstractScriptContext()`

## Method Summary

Modifier and Type
Method
Description
`IExternalContext`
`getExternalContext()`
`Locale`
`getLocale()`
Deprecated.
Use `getULocale()` instead.
`ILogger`
`getLogger()`
`Object`
`getProperty(Object key)`
Returns property value.
`com.ibm.icu.util.ULocale`
`getULocale()`
`void`
`setExternalContext(IExternalContext externalContext)`
`void`
`setLogger(ILogger logger)`
Sets associated logger.
`void`
`setProperty(Object key, Object value)`
Saves property value.
`void`
`setULocale(com.ibm.icu.util.ULocale locale)`
Sets associated locale.

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

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

## Constructor Details

### AbstractScriptContext

public AbstractScriptContext()

## Method Details

### getExternalContext

public IExternalContext getExternalContext()

Specified by:
  `getExternalContext` in interface `IScriptContext`
Returns:
  Returns the external context.

### setExternalContext

public void setExternalContext(IExternalContext externalContext)

Parameters:
  `externalContext` - the context of script

### getLocale

@Deprecated public Locale getLocale()
Deprecated.
Use `getULocale()` instead.
(non-Javadoc)

Specified by:
  `getLocale` in interface `IScriptContext`
Returns:
  Returns the locale of current context.
See Also:
  - `IScriptContext.getLocale()`

### getLogger

public ILogger getLogger()

Specified by:
  `getLogger` in interface `IScriptContext`
Returns:
  Returns an ILogger instance, to allow logging from script.
See Also:
  - `ILogger`

### setLogger

public void setLogger(ILogger logger)
Sets associated logger.

Parameters:
  `logger` - Logger

### getULocale

public com.ibm.icu.util.ULocale getULocale()

Specified by:
  `getULocale` in interface `IScriptContext`
Returns:
  Returns the locale of current context.

### setULocale

public void setULocale(com.ibm.icu.util.ULocale locale)
Sets associated locale.

Parameters:
  `locale` - Locale

### getProperty

public Object getProperty(Object key)
Description copied from interface: `IScriptContext`
Returns property value.

Specified by:
  `getProperty` in interface `IScriptContext`
Returns:

### setProperty

public void setProperty(Object key, Object value)
Description copied from interface: `IScriptContext`
Saves property value.

Specified by:
  `setProperty` in interface `IScriptContext`