org.eclipse.birt.report.engine.api
Class EngineConfig

java.lang.Object
  extended byorg.eclipse.birt.report.engine.api.EngineConfig

public class EngineConfig
extends java.lang.Object

Wraps around configuration settings for report engine. Allows developers to specify where to look for engine plugins, data drivers, and where to write image files. Allows users to customize data-related properties (i.e., data engine). Also allows engine to provide customized implementations for image handling, hyperlink handling and font handling, etc.


Field Summary
static java.lang.String CONFIG_VAR_ENGINE_HOME
           
protected  java.util.HashMap configObjects
          stores various configuration objects
protected  org.eclipse.birt.core.framework.IPlatformContext context
          the context that the platform is running.
protected  java.util.HashMap emitterConfigs
          store emitter configuration
protected static java.lang.String LOG_DESTINATION
           
protected static java.lang.String LOG_LEVEL
           
protected  java.util.HashMap scriptObjects
          stores app-wide, app-specific JS scriptable objects
protected  IStatusHandler statusHandler
          default status handler
protected static java.lang.String TEMP_DIR
           
 
Constructor Summary
EngineConfig()
          constructor
 
Method Summary
 void addScriptableJavaObject(java.lang.String jsName, java.lang.Object obj)
          defines an additional Java object that is exposed to BIRT scripting
 java.util.HashMap getConfigMap()
          returns a hash map that contains all the configuration objects
 java.util.HashMap getEmitterConfigs()
          gets a map for emitter configuration objects
 java.util.HashMap getScriptObjects()
          returns a hash map that contains all the app-specific, app-wide scriptable Java objects
 org.eclipse.birt.core.framework.IPlatformContext getServletContext()
           
 IStatusHandler getStatusHandler()
          returns the status handler
 java.lang.String getTempDir()
          returns engine temporary directory for temporary files
 void setConfigurationVariable(java.lang.String name, java.lang.String value)
          sets a configuration variable that is available through scripting in engine
 void setEmitterConfiguration(java.lang.String format, java.lang.Object emitterConfig)
          sets configuration for a specific extension to engine, i.e., an emitter extension
 void setEngineContext(org.eclipse.birt.core.framework.IPlatformContext context)
           
 void setEngineHome(java.lang.String birtHome)
          set the BIRT_HOME system property
 void setLogConfig(java.lang.String directoryName, java.util.logging.Level level)
          set log configuration, i.e., log file name prefix and log level
 void setStatusHandler(IStatusHandler handler)
          sets the handler for reporting report running status.
 void setTempDir(java.lang.String tmpDir)
          sets the directory for temporary files
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_VAR_ENGINE_HOME

public static final java.lang.String CONFIG_VAR_ENGINE_HOME
See Also:
Constant Field Values

LOG_DESTINATION

protected static final java.lang.String LOG_DESTINATION
See Also:
Constant Field Values

LOG_LEVEL

protected static final java.lang.String LOG_LEVEL
See Also:
Constant Field Values

TEMP_DIR

protected static final java.lang.String TEMP_DIR
See Also:
Constant Field Values

configObjects

protected java.util.HashMap configObjects
stores various configuration objects


scriptObjects

protected java.util.HashMap scriptObjects
stores app-wide, app-specific JS scriptable objects


emitterConfigs

protected java.util.HashMap emitterConfigs
store emitter configuration


statusHandler

protected IStatusHandler statusHandler
default status handler


context

protected org.eclipse.birt.core.framework.IPlatformContext context
the context that the platform is running. It could be a file based context or resource based context.

Constructor Detail

EngineConfig

public EngineConfig()
constructor

Method Detail

setEngineHome

public void setEngineHome(java.lang.String birtHome)
set the BIRT_HOME system property

Parameters:
birtHome - the value for the BIRT_HOMT configuration variable

setConfigurationVariable

public void setConfigurationVariable(java.lang.String name,
                                     java.lang.String value)
sets a configuration variable that is available through scripting in engine

Parameters:
name - configuration variable name
value - configuration variable value

getConfigMap

public java.util.HashMap getConfigMap()
returns a hash map that contains all the configuration objects

Returns:
the configuration object map

getScriptObjects

public java.util.HashMap getScriptObjects()
returns a hash map that contains all the app-specific, app-wide scriptable Java objects

Returns:
a hash map with all the app-specific, app-wide scriptable Java objects

addScriptableJavaObject

public void addScriptableJavaObject(java.lang.String jsName,
                                    java.lang.Object obj)
defines an additional Java object that is exposed to BIRT scripting

Parameters:
jsName - the name that the object is referenced in JavaScript
obj - the Java object that is wrapped and scripted

setEmitterConfiguration

public void setEmitterConfiguration(java.lang.String format,
                                    java.lang.Object emitterConfig)
sets configuration for a specific extension to engine, i.e., an emitter extension


setStatusHandler

public void setStatusHandler(IStatusHandler handler)
sets the handler for reporting report running status.

Parameters:
handler - status handler

getStatusHandler

public IStatusHandler getStatusHandler()
returns the status handler

Returns:
the status handler

setLogConfig

public void setLogConfig(java.lang.String directoryName,
                         java.util.logging.Level level)
set log configuration, i.e., log file name prefix and log level

Parameters:
directoryName - - the directory name of the log file(e.g C:\Log). Engine appends a file name with date and time to the directory name (e.g. C:\Log\BIRT_Engine_2005_02_26_11_26_56.log).
level - the engine log level

getEmitterConfigs

public java.util.HashMap getEmitterConfigs()
gets a map for emitter configuration objects

Returns:
emitter configuration

setTempDir

public void setTempDir(java.lang.String tmpDir)
sets the directory for temporary files

Parameters:
tmpDir - the directory for temporary files

getTempDir

public java.lang.String getTempDir()
returns engine temporary directory for temporary files

Returns:
Returns the Temp Directory for engine to write temp files

setEngineContext

public void setEngineContext(org.eclipse.birt.core.framework.IPlatformContext context)

getServletContext

public org.eclipse.birt.core.framework.IPlatformContext getServletContext()


Copyright © 2005 Actuate Corp. All rights reserved.