/** * Creates a new package manager. * * @param booter the booter (<code>null</code> not permitted). */ public PackageManager(final AbstractBoot booter) { if (booter == null) { throw new NullPointerException(); } this.booter = booter; this.packageConfiguration = new PackageConfiguration(); this.modules = new ArrayList<PackageState>(); this.modulesByClass = new HashMap<String, PackageState>(); this.initSections = new ArrayList<String>(); }
/** * 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 ... } } }
/** * 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 ... } } }
/** * Creates a new package manager. * * @param booter the booter (<code>null</code> not permitted). */ public PackageManager( final AbstractBoot booter ) { if ( booter == null ) { throw new NullPointerException(); } this.booter = booter; this.packageConfiguration = new PackageConfiguration(); this.modules = new ArrayList<PackageState>(); this.modulesByClass = new HashMap<String, PackageState>(); this.initSections = new ArrayList<String>(); }