org.pentaho.reporting.engine.classic.core
Class ClassicEngineBoot

java.lang.Object
  extended by org.pentaho.reporting.libraries.base.boot.AbstractBoot
      extended by org.pentaho.reporting.engine.classic.core.ClassicEngineBoot
All Implemented Interfaces:
org.pentaho.reporting.libraries.base.boot.SubSystem

public class ClassicEngineBoot
extends org.pentaho.reporting.libraries.base.boot.AbstractBoot

An utility class to safely boot and initialize the Pentaho-Reporting library. This class should be called before using the Pentaho-Reporting classes, to make sure that all subsystems are initialized correctly and in the correct order.

Application developers should make sure, that the booting is done before any Pentaho-Reporting functions are used. If the system has not be initialized by booting this class, anything can happen and the results of all functionality of this reporting engine will be undefined.

Additional modules can be specified by defining the system property "org.pentaho.reporting.engine.classic.core.boot.Modules". The property expects a comma-separated list of Module implementations.

Booting should be done by aquirering a new boot instance using getInstance() and then starting the boot process with AbstractBoot.start().

Author:
Thomas Morgner

Nested Class Summary
static class ClassicEngineBoot.VersionValidity
           
 
Field Summary
static String BUNDLE_TYPE
           
static String DATASCHEMA_NAMESPACE
           
static String INDEX_COLUMN_PREFIX
           
static String METADATA_NAMESPACE
           
 
Method Summary
static int computeVersionId(int prptVersionMajorRaw, int prptVersionMinorRaw, int prptVersionPatchRaw)
           
 org.pentaho.reporting.libraries.base.config.ModifiableConfiguration getEditableConfig()
          Returns the current global configuration as modifiable instance.
static ClassicEngineBoot getInstance()
          Returns the singleton instance of the boot utility class.
static org.pentaho.reporting.libraries.base.config.Configuration getUserConfig()
          Returns the user supplied global configuration.
static boolean isEnforceCompatibilityFor(int level, int prptVersionMajorRaw, int prptVersionMinorRaw, int prptVersionPatchRaw)
           
 boolean isModuleAvailable(String moduleClass)
          A helper method that checks, whether a given module is available.
static ClassicEngineBoot.VersionValidity isValidVersion(int prptVersionMajorRaw, int prptVersionMinorRaw, int prptVersionPatchRaw)
           
static int parseVersionId(String text)
           
static void setUserConfig(org.pentaho.reporting.libraries.base.config.Configuration config)
          Defines the global user configuration.
 
Methods inherited from class org.pentaho.reporting.libraries.base.boot.AbstractBoot
getBootFailureReason, getExtendedConfig, getGlobalConfig, getPackageManager, isBootDone, isBootFailed, isBootInProgress, loadBooter, start
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEX_COLUMN_PREFIX

public static final String INDEX_COLUMN_PREFIX
See Also:
Constant Field Values

METADATA_NAMESPACE

public static final String METADATA_NAMESPACE
See Also:
Constant Field Values

DATASCHEMA_NAMESPACE

public static final String DATASCHEMA_NAMESPACE
See Also:
Constant Field Values

BUNDLE_TYPE

public static final String BUNDLE_TYPE
See Also:
Constant Field Values
Method Detail

getInstance

public static ClassicEngineBoot getInstance()
Returns the singleton instance of the boot utility class.

Returns:
the boot instance.

getEditableConfig

public org.pentaho.reporting.libraries.base.config.ModifiableConfiguration getEditableConfig()
Returns the current global configuration as modifiable instance. This is exactly the same as casting the global configuration into a ModifableConfiguration instance.

This is a convinience function, as all programmers are lazy.

Returns:
the global config as modifiable configuration.

getUserConfig

public static org.pentaho.reporting.libraries.base.config.Configuration getUserConfig()
Returns the user supplied global configuration.

Returns:
the user configuration, if any.

setUserConfig

public static void setUserConfig(org.pentaho.reporting.libraries.base.config.Configuration config)
Defines the global user configuration.

Parameters:
config - the user configuration.

isModuleAvailable

public boolean isModuleAvailable(String moduleClass)
A helper method that checks, whether a given module is available. The result of this method is undefined if the system has no been booted yet.

Parameters:
moduleClass - the class-name of the module that should be tested.
Returns:
true, if the module is available and has been initialized correctly, false otherwise.

computeVersionId

public static int computeVersionId(int prptVersionMajorRaw,
                                   int prptVersionMinorRaw,
                                   int prptVersionPatchRaw)

parseVersionId

public static int parseVersionId(String text)

isValidVersion

public static ClassicEngineBoot.VersionValidity isValidVersion(int prptVersionMajorRaw,
                                                               int prptVersionMinorRaw,
                                                               int prptVersionPatchRaw)

isEnforceCompatibilityFor

public static boolean isEnforceCompatibilityFor(int level,
                                                int prptVersionMajorRaw,
                                                int prptVersionMinorRaw,
                                                int prptVersionPatchRaw)