Class DesignEngine
- All Implemented Interfaces:
IDesignEngine
The design engine uses meta-data defined in an external file. This
file is defined by BIRT and should both be available and valid. However, if
an application wants to catch and handle errors associated with this file, it
can create and register an instance of IMetaLogger
before
creating or opening the first report design. The logger is most useful for
test suites.
This is a wrapper class for the IDesignEngine. The new user should use the IDesignEngineFactory to create the IDesignEngine instead of use this class directly.
- See Also:
-
IMetaLogger
MetaLogManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static IDesignEngineFactory
protected IDesignEngine
The implementation of the design engine.protected static final Logger
The logger for errors. -
Constructor Summary
ConstructorsConstructorDescriptionDesignEngine
(DesignConfig config) Constructs a DesignEngine with the given platform config. -
Method Summary
Modifier and TypeMethodDescriptionGets the meta-data of the design engine.static IMetaDataDictionary
Deprecated.static SessionHandle
newSession
(com.ibm.icu.util.ULocale locale) Deprecated.newSessionHandle
(com.ibm.icu.util.ULocale locale) Creates a new design session handle.openDesign
(String fileName, InputStream ins, IModuleOption options) Opens the report design.void
registerMetaLogger
(IMetaLogger newLogger) Registers aIMetaLogger
to record initialization errors.boolean
removeMetaLogger
(IMetaLogger logger) Removes aIMetaLogger
.
-
Field Details
-
errorLogger
The logger for errors. -
cachedFactory
-
engine
The implementation of the design engine.
-
-
Constructor Details
-
DesignEngine
Constructs a DesignEngine with the given platform config.- Parameters:
config
- the platform config.
-
-
Method Details
-
newSessionHandle
Creates a new design session handle. The application uses the handle to open, create and manage designs. The session also represents the user and maintains the user's locale information.- Specified by:
newSessionHandle
in interfaceIDesignEngine
- Parameters:
locale
- the user's locale. Ifnull
, uses the system locale.- Returns:
- the design session handle
- See Also:
-
newSession
Deprecated.Creates a new design session handle. The application uses the handle to open, create and manage designs. The session also represents the user and maintains the user's locale information.This method is not suggested to use. The user should use new DesignEngine(config).newSessionHandle() to create the session.
- Parameters:
locale
- the user's locale. Ifnull
, uses the system locale.- Returns:
- the design session handle
- See Also:
-
getMetaData
Gets the meta-data of the design engine.- Specified by:
getMetaData
in interfaceIDesignEngine
- Returns:
- the meta-data of the design engine.
-
getMetaDataDictionary
Deprecated.Gets the meta-data dictionary of the design engine.This method is not suggested to use. The user should use new DesignEngine(config).getMetaData() to get the metadata dictionary.
- Returns:
- the meta-data dictionary of the design engine
-
registerMetaLogger
Registers aIMetaLogger
to record initialization errors. The logger will be notified of the errors during meta-data initialization. The meta-data system will be initialized once (and only once). Loggers should be registered before the first time a session is created so that it can be notified of the logging actions.- Specified by:
registerMetaLogger
in interfaceIDesignEngine
- Parameters:
newLogger
- theMetaLogger
to be registered.- See Also:
-
removeMetaLogger
Removes aIMetaLogger
. This method will remove the logger from the list and close the logger if it has already been registered. The logger will no longer be notified of the errors during metadata initialization. Returnstrue
if this logger manager contained the specified logger.- Specified by:
removeMetaLogger
in interfaceIDesignEngine
- Parameters:
logger
- theMetaLogger
to be removed.- Returns:
true
if this logger manager contained the specified logger.- See Also:
-
openDesign
public IReportDesign openDesign(String fileName, InputStream ins, IModuleOption options) throws DesignFileException Opens the report design.- Specified by:
openDesign
in interfaceIDesignEngine
- Parameters:
fileName
- the report file nameins
- the input stream. Can benull
.options
- options to control the way to open the design- Returns:
- the report design instance
- Throws:
DesignFileException
- if the report file cannot be found or the file is invalid.
-