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 class
Modules.Module
Container class for module information.
-
Field Summary
Fields Modifier and Type Field Description static String
FILENAME
the name of the props file.static String
KEY_AUTHOR
the key for the Author of the module.static String
KEY_BUILDTIMESTAMP
the key for the BuildTimestamp of the module.static String
KEY_DESCRIPTION
the key for the Description of the module.static String
KEY_LOGO
the key for the Logo of the module.static String
KEY_METAMODULE
the key for the MetaModule of the module.static String
KEY_NAME
the key for the Name of the module.static String
KEY_ORGANIZATION
the key for the Organization of the module.static String
KEY_VERSION
the key for the Version of the module.protected List<Modules.Module>
m_Modules
the available modules.protected static Modules
m_Singleton
the singleton instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Modules.Module
getModule(String name)
Returns the module associated with the specified name.List<Modules.Module>
getModules()
Returns the available modules.static Modules
getSingleton()
Returns the singleton.protected void
initialize()
Initializes the modules.boolean
isAvailable(String name)
Checks whether the module with the specified name is present.static void
main(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
-
-