Package org.eclipse.birt.chart.script
Class AbstractScriptContext
- java.lang.Object
-
- org.eclipse.birt.chart.script.AbstractScriptContext
-
- All Implemented Interfaces:
java.io.Serializable
,IScriptContext
- Direct Known Subclasses:
ChartScriptContext
public abstract class AbstractScriptContext extends java.lang.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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IExternalContext
getExternalContext()
java.util.Locale
getLocale()
Deprecated.UsegetULocale()
instead.ILogger
getLogger()
java.lang.Object
getProperty(java.lang.Object key)
Returns property value.com.ibm.icu.util.ULocale
getULocale()
void
setExternalContext(IExternalContext externalContext)
void
setLogger(ILogger logger)
Sets associated logger.void
setProperty(java.lang.Object key, java.lang.Object value)
Saves property value.void
setULocale(com.ibm.icu.util.ULocale locale)
Sets associated locale.
-
-
-
Method Detail
-
getExternalContext
public IExternalContext getExternalContext()
- Specified by:
getExternalContext
in interfaceIScriptContext
- Returns:
- Returns the external context.
-
setExternalContext
public void setExternalContext(IExternalContext externalContext)
- Parameters:
externalContext
- the context of script
-
getLocale
@Deprecated public java.util.Locale getLocale()
Deprecated.UsegetULocale()
instead.(non-Javadoc)- Specified by:
getLocale
in interfaceIScriptContext
- Returns:
- Returns the locale of current context.
- See Also:
IScriptContext.getLocale()
-
getLogger
public ILogger getLogger()
- Specified by:
getLogger
in interfaceIScriptContext
- 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 interfaceIScriptContext
- 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 java.lang.Object getProperty(java.lang.Object key)
Description copied from interface:IScriptContext
Returns property value.- Specified by:
getProperty
in interfaceIScriptContext
- Returns:
-
setProperty
public void setProperty(java.lang.Object key, java.lang.Object value)
Description copied from interface:IScriptContext
Saves property value.- Specified by:
setProperty
in interfaceIScriptContext
-
-