/** * Initializes the module. Use this method to perform all initial setup operations. This method is called only once in * a modules lifetime. If the initializing cannot be completed, throw a ModuleInitializeException to indicate the * error,. The module will not be available to the system. * * @param subSystem * the subSystem. * @throws ModuleInitializeException * if an error ocurred while initializing the module. */ public void initialize( final SubSystem subSystem ) throws ModuleInitializeException { if ( AbstractModule.isClassLoadable( "org.apache.poi.hssf.usermodel.HSSFWorkbook", ExcelTableModule.class ) == false ) { throw new ModuleInitializeException( "Unable to load POI classes." ); } ElementMetaDataParser .initializeOptionalReportProcessTaskMetaData( "org/pentaho/reporting/engine/classic/core/modules/output/table/xls/meta-report-process-tasks.xml" ); } }
/** * Initialialize the font factory when this class is loaded and the system property of * <code>"org.pentaho.reporting.engine.classic.core.modules.output.pageable.itext.PDFOutputTarget.AutoInit"</code> is * set to <code>true</code>. * * @throws ModuleInitializeException * if an error occured. */ public void initialize( final SubSystem subSystem ) throws ModuleInitializeException { if ( AbstractModule.isClassLoadable( "com.lowagie.text.Document", BaseFontModule.class ) == false ) { throw new ModuleInitializeException( "Unable to load iText classes. " + "Check your classpath configuration." ); } if ( "onInit".equals( subSystem.getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.output.support.itext.AutoInit" ) ) ) { BaseFontModule.getFontRegistry(); } } }
/** * Initalizes the module. This performs the external initialization and checks that an JAXP1.1 parser is available. * * @param subSystem * the subsystem for this module. * @throws ModuleInitializeException * if an error occured. */ public void initialize( final SubSystem subSystem ) throws ModuleInitializeException { if ( AbstractModule.isClassLoadable( "org.xml.sax.ext.LexicalHandler", ExtParserModule.class ) == false ) { throw new ModuleInitializeException( "Unable to load JAXP-1.1 classes. " + "Check your classpath and XML parser configuration." ); } SubReportReadHandlerFactory.getInstance() .setElementHandler( NAMESPACE, "sub-report", ExtSubReportReadHandler.class ); DataFactoryReadHandlerFactory.getInstance().setElementHandler( NAMESPACE, "data-factory", DataFactoryRefReadHandler.class ); SubReportXmlResourceFactory.register( ExtSubReportXmlFactoryModule.class ); MasterReportXmlResourceFactory.register( ExtReportXmlFactoryModule.class ); performExternalInitialize( ExtParserModuleInit.class.getName(), ExtParserModule.class ); }