public ObjectFactory createObjectFactory(final SubSystem subSystem) { return new DefaultObjectFactory(subSystem.getGlobalConfig()); } }
/** * Returns the packageManager instance of the package manager. * * @return The package manager. */ public synchronized PackageManager getPackageManager() { if ( this.packageManager == null ) { this.packageManager = new PackageManager( this ); } return this.packageManager; }
/** * Returns the modules subsystem. If this module is not part of an subsystem then return the modules name, but never * null. * * @return the name of the subsystem. */ public String getSubSystem() { if ( this.subsystem == null ) { return getName(); } return this.subsystem; }
/** * Returns a basic string representation of this SortModule. This should be used for debugging purposes only. * * @return a string representation of this module. * @see Object#toString() */ public String toString() { final StringBuilder buffer = new StringBuilder( 100 ); buffer.append( "SortModule: " ); buffer.append( this.position ); buffer.append( ' ' ); buffer.append( this.state.getModule().getName() ); buffer.append( ' ' ); buffer.append( this.state.getModule().getModuleClass() ); return buffer.toString(); }
/** * 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. * * @param moduleClass * the class-name of the module that should be tested. * @return true, if the module is available and has been initialized correctly, false otherwise. */ public boolean isModuleAvailable( final String moduleClass ) { return getPackageManager().isModuleAvailable( new DefaultModuleInfo( moduleClass, null, null, null ) ); }
/** * Constructs a ConfigDescriptionEditor that is initially invisible. */ public ConfigDescriptionEditor( final AbstractBoot boot ) { if ( boot != null ) { boot.start(); this.configurationToEdit = boot.getGlobalConfig(); } init(); }
/** * Loads the default module description from the file "module.properties". This file must be in the same package as * the implementing class. * * @throws ModuleInitializeException if an error occurs. */ protected void loadModuleInfo() throws ModuleInitializeException { final InputStream in = ObjectUtilities.getResourceRelativeAsStream( "module.properties", getClass() ); if ( in == null ) { throw new ModuleInitializeException ( "File 'module.properties' not found in module package." ); } loadModuleInfo( in ); }
/** * 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" ); } }
/** * Performs the boot. */ protected void performBoot() { final PackageManager packageManager = getPackageManager(); packageManager.load( "org.pentaho.reporting.libraries.resourceloader.modules." ); packageManager.initializeModules(); } }
/** * Loads the specified booter implementation. * * @param classname the class name. * @return The boot class. */ protected AbstractBoot loadBooter( final String classname ) { return loadBooter( classname, getClass() ); }
/** * Returns the global configuration as extended configuration. * * @return the extended configuration. */ public synchronized ExtendedConfiguration getExtendedConfig() { if ( extWrapper == null ) { extWrapper = new ExtendedConfigurationWrapper( getGlobalConfig() ); } return extWrapper; }
private PerformanceMonitorContext getPerformanceMonitorContext() { if ( this.performanceMonitorContext == null ) { this.performanceMonitorContext = ClassicEngineBoot.getInstance().getObjectFactory().get( PerformanceMonitorContext.class ); } return performanceMonitorContext; }
/** * Returns the global configuration. * * @return The global configuration. */ public synchronized Configuration getGlobalConfig() { if ( this.globalConfig == null ) { this.globalConfig = loadConfiguration(); } return this.globalConfig; }
public <T> T get(final Class<T> interfaceClass) { return get(interfaceClass, interfaceClass.getName()); }
/** * Returns a basic string representation of this SortModule. This * should be used for debugging purposes only. * * @return a string representation of this module. * @see Object#toString() */ public String toString() { final StringBuilder buffer = new StringBuilder(100); buffer.append("SortModule: "); buffer.append(this.position); buffer.append(' '); buffer.append(this.state.getModule().getName()); buffer.append(' '); buffer.append(this.state.getModule().getModuleClass()); return buffer.toString(); }
public ObjectFactory createObjectFactory( final SubSystem subSystem ) { return new DefaultObjectFactory( subSystem.getGlobalConfig() ); } }
/** * Loads the specified booter implementation. * * @param classname the class name. * @return The boot class. */ protected AbstractBoot loadBooter(final String classname) { return loadBooter(classname, getClass()); }
/** * Returns the packageManager instance of the package manager. * * @return The package manager. */ public synchronized PackageManager getPackageManager() { if (this.packageManager == null) { this.packageManager = new PackageManager(this); } return this.packageManager; }
/** * Returns the modules subsystem. If this module is not part of an subsystem * then return the modules name, but never null. * * @return the name of the subsystem. */ public String getSubSystem() { if (this.subsystem == null) { return getName(); } return this.subsystem; }
/** * Returns the global configuration. * * @return The global configuration. */ public synchronized Configuration getGlobalConfig() { if (this.globalConfig == null) { this.globalConfig = loadConfiguration(); } return this.globalConfig; }