Class EngineConfig
java.lang.Object
org.eclipse.birt.core.framework.PlatformConfig
org.eclipse.birt.report.engine.api.EngineConfig
- All Implemented Interfaces:
org.eclipse.birt.core.framework.IPlatformConfig,IEngineConfig
public class EngineConfig
extends org.eclipse.birt.core.framework.PlatformConfig
implements IEngineConfig
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
Fields inherited from class org.eclipse.birt.core.framework.PlatformConfig
propertiesFields inherited from interface org.eclipse.birt.report.engine.api.IEngineConfig
DEFAULT_RENDER_OPTION, EMITTER_CONFIGS, ENGINE_LOGGER, FONT_CONFIG, LOG_DESTINATION, LOG_FILE, LOG_LEVEL, LOG_MAX_BACKUP_INDEX, LOG_ROLLING_SIZE, MAX_ROWS_PER_QUERY, REPORT_DOCUMENT_LOCK_MANAGER, RESOURCE_LOCATOR, RESOURCE_PATH, SCRIPT_OBJECTS, STATUS_HANDLERFields inherited from interface org.eclipse.birt.core.framework.IPlatformConfig
BIRT_HOME, OSGI_ARGUMENTS, OSGI_CONFIGURATION, PLATFORM_CONTEXT, TEMP_DIR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddScriptableJavaObject(String jsName, Object obj) Deprecated.the user need add the object to the appContext directly.returns a hash map that contains appContextDeprecated.use getProperties() instead.getDefaultEmitter(String format) Gets default emitter id of an output format.gets a map for emitter configuration objectsGet directory of the log fileGet the name of the log file.return the user's logger set through setLogger.Get the level of the log fileintReturns the value of the MaxBackupIndex option.intGet the maximum number of bytes that the output file is allowed to reach before being rolled over to backup files.intDeprecated.return a lock manager.org.eclipse.birt.report.model.api.IResourceLocatorDeprecated.use getAppContext() instead.org.eclipse.birt.core.framework.IPlatformContextDeprecated.use getPlatformContext insteadreturns the status handlervoidsetAppContext(HashMap appContext) Set appContextvoidsetConfigurationVariable(String name, String value) Deprecated.use setProperty() instead.voidsetDefaultEmitter(String format, String emitterId) Sets default emitter for an output format.voidsetEmitterConfiguration(String format, Object emitterConfig) sets configuration for a specific extension to engine, i.e., an emitter extensionvoidsetEngineContext(org.eclipse.birt.core.framework.IPlatformContext context) Deprecated.use setPlatformContext instead.voidsetEngineHome(String birtHome) set the BIRT_HOME system propertyvoidsetFontConfig(URL fontConfig) voidsetLogConfig(String directoryName, Level level) set log configuration, i.e., log file name prefix and log levelvoidsetLogFile(String filename) Set the name of the log file.voidset the logger used by the report engine.voidsetLogMaxBackupIndex(int maxBackupIndex) Set the maximum number of backup files to keep around.voidsetLogRollingSize(int size) Set the maximum number of bytes that the output file is allowed to reach before being rolled over to backup files.voidsetMaxRowsPerQuery(int maxRows) Deprecated.voidSet report document lock managervoidsetResourceLocator(org.eclipse.birt.report.model.api.IResourceLocator resourceLocator) voidsetResourcePath(String resourcePath) voidsetStatusHandler(IStatusHandler handler) sets the handler for reporting report running status.toString()Output properties for debug tracingMethods inherited from class org.eclipse.birt.core.framework.PlatformConfig
getBIRTHome, getOSGiArguments, getOSGiConfig, getPlatformContext, getProperties, getProperty, getTempDir, setBIRTHome, setOSGiArguments, setOSGiConfig, setPlatformContext, setProperty, setTempDir
-
Constructor Details
-
EngineConfig
public EngineConfig()constructor
-
-
Method Details
-
setEngineHome
set the BIRT_HOME system property- Parameters:
birtHome- the value for the BIRT_HOMT configuration variable @deprecated, use setBIRTHome instead.
-
setConfigurationVariable
Deprecated.use setProperty() instead.sets a configuration variable that is available through scripting in engine- Parameters:
name- configuration variable namevalue- configuration variable value
-
getConfigMap
Deprecated.use getProperties() instead.returns a hash map that contains all the configuration objects- Returns:
- the configuration object map
-
setLogConfig
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
-
setLogger
set the logger used by the report engine. the logger will overides the setLogConfig().- Parameters:
logger-
-
getLogger
return the user's logger set through setLogger.- Returns:
- the logger setted by user. NULL if the user doesn't set it.
-
getScriptObjects
Deprecated.use getAppContext() instead.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
Deprecated.the user need add the object to the appContext directly.defines an additional Java object that is exposed to BIRT scripting- Parameters:
jsName- the name that the object is referenced in JavaScriptobj- the Java object that is wrapped and scripted
-
getAppContext
returns a hash map that contains appContext- Returns:
-
setAppContext
Set appContext- Parameters:
appContext-
-
setEmitterConfiguration
sets configuration for a specific extension to engine, i.e., an emitter extension- Parameters:
extensionID- identifier for the emitterextensionConfig- configuration object for the emitter, which must be an instance of HashMap or IRenderOption
-
getEmitterConfigs
gets a map for emitter configuration objects- Returns:
- emitter configuration
-
getStatusHandler
returns the status handler- Returns:
- the status handler
-
setStatusHandler
sets the handler for reporting report running status.- Parameters:
handler- status handler
-
getLogLevel
Get the level of the log file- Returns:
- level
-
getLogDirectory
Get directory of the log file- Returns:
- log directory
-
getLogFile
Get the name of the log file.- Returns:
- log file name
-
setLogFile
Set the name of the log file.- Parameters:
filename-
-
getLogRollingSize
public int getLogRollingSize()Get the maximum number of bytes that the output file is allowed to reach before being rolled over to backup files.- Returns:
-
setLogRollingSize
public void setLogRollingSize(int size) Set the maximum number of bytes that the output file is allowed to reach before being rolled over to backup files.- Parameters:
size-
-
getLogMaxBackupIndex
public int getLogMaxBackupIndex()Returns the value of the MaxBackupIndex option.- Returns:
-
setLogMaxBackupIndex
public void setLogMaxBackupIndex(int maxBackupIndex) Set the maximum number of backup files to keep around.- Parameters:
maxBackupIndex-
-
getReportDocumentLockManager
return a lock manager. The lock manager is used to lock the report document opened by this engine.- Returns:
- lock manager, NULL if not set.
-
setReportDocumentLockManager
Set report document lock manager- Parameters:
manager- lock manager
-
setEngineContext
Deprecated.use setPlatformContext instead.set the framework context- Parameters:
context- the platform context
-
getServletContext
Deprecated.use getPlatformContext insteadset the framework context- Returns:
- context, the framework context
-
getResourceLocator
public org.eclipse.birt.report.model.api.IResourceLocator getResourceLocator()- Returns:
- the resourceLocator
-
setResourceLocator
public void setResourceLocator(org.eclipse.birt.report.model.api.IResourceLocator resourceLocator) - Parameters:
resourceLocator- the resourceLocator to set
-
getResourcePath
- Returns:
- the resourcePath
-
setResourcePath
- Parameters:
resourcePath- the resourcePath to set
-
getFontConfig
- Returns:
- the custom font configuration file path.
-
setFontConfig
- Parameters:
fontConfig- the font configuration file path.
-
setMaxRowsPerQuery
Deprecated.Set the max rows per query- Parameters:
maxRows- : max rows
-
getMaxRowsPerQuery
Deprecated.Get the max rows per query- Returns:
- the max rows per query
-
setDefaultEmitter
Sets default emitter for an output format.- Parameters:
format- the format.emitterId- the id of the default emitter.
-
getDefaultEmitter
Gets default emitter id of an output format.- Parameters:
format- the format.- Returns:
- the id of the default emitter of this output format, "null" is returned if default emitter is not set for this format.
-
toString
Output properties for debug tracing
-