/** * Loads all modules mentioned in the report configuration starting with the given prefix. This method is used during * the boot process of JFreeReport. You should never need to call this method directly. * * @param modulePrefix the module prefix. */ public void load( final String modulePrefix ) { if ( modulePrefix == null ) { throw new NullPointerException(); } if ( this.initSections.contains( modulePrefix ) ) { return; } this.initSections.add( modulePrefix ); final Configuration config = this.booter.getGlobalConfig(); final Iterator it = config.findPropertyKeys( modulePrefix ); int count = 0; while ( it.hasNext() ) { final String key = (String) it.next(); if ( key.endsWith( ".Module" ) ) { final String moduleClass = config.getConfigProperty( key ); if ( moduleClass != null && moduleClass.length() > 0 ) { addModule( moduleClass ); count++; } } } LOGGER.debug( "Loaded a total of " + count + " modules under prefix: " + modulePrefix ); }
if (moduleClass != null && moduleClass.length() > 0) addModule(moduleClass); count++;
/** * Performs the actual boot process. */ protected void performBoot() { if ( ClassicEngineBoot.isStrictFP() == false ) { ClassicEngineBoot.logger.warn( "The used VM seems to use a non-strict floating point arithmetics" ); // NON-NLS ClassicEngineBoot.logger.warn( "Layouts computed with this Java Virtual Maschine may be invalid." ); // NON-NLS ClassicEngineBoot.logger.warn( "JFreeReport and the library 'iText' depend on the strict floating point rules" ); // NON-NLS ClassicEngineBoot.logger.warn( "of Java1.1 as implemented by the Sun Virtual Maschines." ); // NON-NLS ClassicEngineBoot.logger.warn( "If you are using the BEA JRockit VM, start the Java VM with the option" ); // NON-NLS ClassicEngineBoot.logger.warn( "'-Xstrictfp' to restore the default behaviour." ); // NON-NLS } final PackageManager mgr = getPackageManager(); mgr.addModule( ClassicEngineCoreModule.class.getName() ); mgr.load( "org.pentaho.reporting.engine.classic.core.modules." ); // NON-NLS mgr.load( "org.pentaho.reporting.engine.classic.extensions.modules." ); // NON-NLS mgr.load( "org.pentaho.reporting.engine.classic.extensions.datasources." ); // NON-NLS mgr.load( "org.pentaho.reporting.engine.classic.core.userdefined.modules." ); // NON-NLS bootAdditionalModules(); mgr.initializeModules(); if ( mgr.isModuleAvailable( ClassicEngineCoreModule.class.getName() ) == false ) { throw new IllegalStateException( "Booting the report-engine failed." ); } StyleKey.lock(); }