Package adams.env
Class Modules
- java.lang.Object
-
- adams.env.Modules
-
public class Modules extends Object
For managing module information.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModules.ModuleContainer class for module information.
-
Field Summary
Fields Modifier and Type Field Description static StringFILENAMEthe name of the props file.static StringKEY_AUTHORthe key for the Author of the module.static StringKEY_BUILDTIMESTAMPthe key for the BuildTimestamp of the module.static StringKEY_DESCRIPTIONthe key for the Description of the module.static StringKEY_LOGOthe key for the Logo of the module.static StringKEY_METAMODULEthe key for the MetaModule of the module.static StringKEY_NAMEthe key for the Name of the module.static StringKEY_ORGANIZATIONthe key for the Organization of the module.static StringKEY_VERSIONthe key for the Version of the module.protected List<Modules.Module>m_Modulesthe available modules.protected static Modulesm_Singletonthe singleton instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Modules.ModulegetModule(String name)Returns the module associated with the specified name.List<Modules.Module>getModules()Returns the available modules.static ModulesgetSingleton()Returns the singleton.protected voidinitialize()Initializes the modules.booleanisAvailable(String name)Checks whether the module with the specified name is present.static voidmain(String[] args)Just outputs the modules on the console, one per line.
-
-
-
Field Detail
-
FILENAME
public static final String FILENAME
the name of the props file.- See Also:
- Constant Field Values
-
KEY_NAME
public static final String KEY_NAME
the key for the Name of the module.- See Also:
- Constant Field Values
-
KEY_VERSION
public static final String KEY_VERSION
the key for the Version of the module.- See Also:
- Constant Field Values
-
KEY_BUILDTIMESTAMP
public static final String KEY_BUILDTIMESTAMP
the key for the BuildTimestamp of the module.- See Also:
- Constant Field Values
-
KEY_DESCRIPTION
public static final String KEY_DESCRIPTION
the key for the Description of the module.- See Also:
- Constant Field Values
-
KEY_AUTHOR
public static final String KEY_AUTHOR
the key for the Author of the module.- See Also:
- Constant Field Values
-
KEY_ORGANIZATION
public static final String KEY_ORGANIZATION
the key for the Organization of the module.- See Also:
- Constant Field Values
-
KEY_LOGO
public static final String KEY_LOGO
the key for the Logo of the module.- See Also:
- Constant Field Values
-
KEY_METAMODULE
public static final String KEY_METAMODULE
the key for the MetaModule of the module.- See Also:
- Constant Field Values
-
m_Singleton
protected static Modules m_Singleton
the singleton instance.
-
m_Modules
protected List<Modules.Module> m_Modules
the available modules.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the modules.
-
getModules
public List<Modules.Module> getModules()
Returns the available modules.- Returns:
- the modules
-
isAvailable
public boolean isAvailable(String name)
Checks whether the module with the specified name is present.- Parameters:
name- the name to check- Returns:
- true if module present
-
getModule
public Modules.Module getModule(String name)
Returns the module associated with the specified name.- Parameters:
name- the name to check- Returns:
- the module if present, otherwise null
-
getSingleton
public static Modules getSingleton()
Returns the singleton.- Returns:
- the singleton
-
-