public ObjectFactory createObjectFactory(final SubSystem subSystem) { return new DefaultObjectFactory(subSystem.getGlobalConfig()); } }
/** * Configures the module by loading the configuration properties and adding them to the package configuration. * * @param subSystem the subsystem. */ public void configure( final SubSystem subSystem ) { final InputStream in = ObjectUtilities.getResourceRelativeAsStream( "configuration.properties", getClass() ); if ( in == null ) { return; } try { subSystem.getPackageManager().getPackageConfiguration().load( in ); } finally { try { in.close(); } catch ( IOException e ) { // can be ignored ... } } }
/** * 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 ( subSystem.getExtendedConfig().getBoolProperty( "org.pentaho.reporting.engine.classic.core.modules.gui.base.SwingDialogTranslation" ) ) { //$NON-NLS-1$ final ResourceBundle resources = ResourceBundle.getBundle( SwingCommonModule.BUNDLE_NAME ); final UIDefaults defaults = UIManager.getDefaults(); final Enumeration en = resources.getKeys(); while ( en.hasMoreElements() ) { try { final String keyName = (String) en.nextElement(); defaults.put( keyName, resources.getObject( keyName ) ); } catch ( Exception e ) { // Ignored; if it happens, we would not care that much .. } } } } }
/** * Configures the module by loading the configuration properties and * adding them to the package configuration. * * @param subSystem the subsystem. */ public void configure(final SubSystem subSystem) { final InputStream in = ObjectUtilities.getResourceRelativeAsStream("configuration.properties", getClass()); if (in == null) { return; } try { subSystem.getPackageManager().getPackageConfiguration().load(in); } finally { try { in.close(); } catch (IOException e) { // can be ignored ... } } }
public ObjectFactory createObjectFactory( final SubSystem subSystem ) { return new DefaultObjectFactory( subSystem.getGlobalConfig() ); } }
/** * 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 { final String value = subSystem.getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.ConfigStore", "<not defined>" ); //$NON-NLS-1$ //$NON-NLS-2$ if ( value.equals( FileConfigStorage.class.getName() ) ) { performExternalInitialize( FileConfigStoreModuleInitializer.class.getName(), FileConfigStoreModule.class ); } } }
/** * 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(); } } }