/** * 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 string representation of this module. * * @return the string representation of this module for debugging purposes. * @see Object#toString() */ public String toString() { final String lineSeparator = StringUtils.getLineSeparator(); final StringBuilder buffer = new StringBuilder( 120 ); buffer.append( "Module : " ); buffer.append( getName() ); buffer.append( lineSeparator ); buffer.append( "ModuleClass : " ); buffer.append( getModuleClass() ); buffer.append( lineSeparator ); buffer.append( "Version: " ); buffer.append( getMajorVersion() ); buffer.append( '.' ); buffer.append( getMinorVersion() ); buffer.append( '.' ); buffer.append( getPatchLevel() ); buffer.append( lineSeparator ); buffer.append( "Producer: " ); buffer.append( getProducer() ); buffer.append( lineSeparator ); buffer.append( "Description: " ); buffer.append( getDescription() ); buffer.append( lineSeparator ); return buffer.toString(); }
props.load( in ); readModuleInfo( props ); if ( key.endsWith( ".dependency-type" ) ) { final String moduleHandle = key.substring( 0, key.length() - ".dependency-type".length() ); final DefaultModuleInfo module = readExternalModule( props, moduleHandle ); if ( "optional".equals( props.getConfigProperty( key ) ) ) { optionalModules.add( module );
/** * 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 ); }
final StringBuilder buffer = new StringBuilder(120); buffer.append("Module : "); buffer.append(getName()); buffer.append(lineSeparator); buffer.append("ModuleClass : "); buffer.append(getModuleClass()); buffer.append(lineSeparator); buffer.append("Version: "); buffer.append(getMajorVersion()); buffer.append('.'); buffer.append(getMinorVersion()); buffer.append('.'); buffer.append(getPatchLevel()); buffer.append(lineSeparator); buffer.append("Producer: "); buffer.append(getProducer()); buffer.append(lineSeparator); buffer.append("Description: "); buffer.append(getDescription()); buffer.append(lineSeparator); return buffer.toString();
props.load(in); readModuleInfo(props); final DefaultModuleInfo module = readExternalModule(props, moduleHandle); if ("optional".equals(props.getConfigProperty(key)))
/** * 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); }
/** * 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; }