com.astroshare.astroonline.core
Class Configuration

java.lang.Object
  extended by com.astroshare.astroonline.core.Configuration

public class Configuration
extends java.lang.Object

Astro-Online Configuration.

The Astro-Online Configuration gets it's configuration data from two sources. The first source is the web.xml configuration file. The second source is the database. The web.xml must be read to accomplish access to the database. All application specific data is stored in the database and can be administered with the online web administrator tool or directly in the database.


Constructor Summary
Configuration()
           
 
Method Summary
static java.lang.String getConfigurationParameter(java.lang.String parameter)
           Get configuration parameter.
static java.util.HashMap<java.lang.String,java.lang.Object> getMap()
           Convert configuration settings to hashmap.
static boolean isConfigurationLoaded()
           Check if configuration is loaded.
static void loadConfiguration(boolean refresh)
           Loads Astro-Online Configuration.
static boolean readConfigFile()
           This method reads the web.xml file which holds the database configuration parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Method Detail

loadConfiguration

public static void loadConfiguration(boolean refresh)

Loads Astro-Online Configuration. First the configuration is read from the web.xml file. Next the application specific data is retrieved from the database. All configuration information is stored in the Configuration class for fast access.

Parameters:
refresh - TRUE means refresh configuration when it was already loaded. Otherwise load configuration. FALSE means, if the configuration was already loaded, do not reload.
See Also:
readConfigFile()

readConfigFile

public static boolean readConfigFile()

This method reads the web.xml file which holds the database configuration parameters.

Returns:
TRUE on success, FALSE on failure
See Also:
loadConfiguration(boolean)

isConfigurationLoaded

public static boolean isConfigurationLoaded()

Check if configuration is loaded.

Returns:
Is configuration loaded?

getConfigurationParameter

public static java.lang.String getConfigurationParameter(java.lang.String parameter)

Get configuration parameter.

Returns:
Is online web administration enabled?

getMap

public static java.util.HashMap<java.lang.String,java.lang.Object> getMap()

Convert configuration settings to hashmap.

Returns:
Configuration settings as a hashmap.


Astro-Online © 2001 − 2008 Astro Share
Documentation generated on: Thursday August 12th 2008 (PS)