org.jlf.config
Class AppConfigProperties

java.lang.Object
  |
  +--org.jlf.config.AppConfigProperties

public class AppConfigProperties
extends java.lang.Object

AppConfigProperties is a concrete class which delivers container-specific configuration information about the Java Virtual Machine instance the application is running under. This is the default configuration class, which tries to pick up -D options on the java start command to locate the main application property file and the application configuration directory. The rest of the layered frameworks use this class to pick up configuration options in property files, either the main property file (application configuration directory + main application property file) or sub-property files (application configuration directory plus sub-property file name).

The defaults for application configuration directory is the current directory (.), that is, the directory where you invoked the java start command, and the main application property file is App.properties in that directory. You can override either of these by something like:

    java ... -Dorg.jlf.config.applicationConfigDir=/home/myApp -Dorg.jlf.config.applicationPropertyFile=MainApp.properties ...
 
Implementation note: This class is generally not exposed outside the package, it is wrapped by the AppInfo class. This class should have concrete subclasses which are container-specific (for example, WebLogicAppConfigProperties).

See Also:
AppInfo

Field Summary
static java.lang.String APPLICATION_CONFIGURATION_DIRECTORY_DEFAULT
          The default value for the application configuration directory (the current directory where you started the JVM).
static java.lang.String APPLICATION_CONFIGURATION_DIRECTORY_PROPERTY
          The System property name (one of the -D options on the java command line start directive) which contains the directory location of property files used throughout the framework.
static java.lang.String APPLICATION_PROPERTY_FILE_PROPERTY
          The System property name (one of the -D options on the java command line start directive) which contains the location of the main property file.
static java.lang.String DEFAULT_APPLICATION_NAME
           
static java.lang.String DEFAULT_APPLICATION_PROPERTY_FILE
          The default property file name if none can be found by using the above setting.
 
Constructor Summary
AppConfigProperties()
           
 
Method Summary
 java.lang.String getApplicationConfigurationDirectory()
          Retrieves the main application configuration directory.
 java.lang.String getApplicationName()
          Retrieves the name for the application to uniquely identify it from other Java virtual machine instances running on the network.
 java.lang.String getApplicationPropertyFileName()
          Retrieves the name of the main application property file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION_PROPERTY_FILE_PROPERTY

public static final java.lang.String APPLICATION_PROPERTY_FILE_PROPERTY
The System property name (one of the -D options on the java command line start directive) which contains the location of the main property file.

See Also:
Constant Field Values

DEFAULT_APPLICATION_NAME

public static final java.lang.String DEFAULT_APPLICATION_NAME
See Also:
Constant Field Values

DEFAULT_APPLICATION_PROPERTY_FILE

public static final java.lang.String DEFAULT_APPLICATION_PROPERTY_FILE
The default property file name if none can be found by using the above setting.

See Also:
Constant Field Values

APPLICATION_CONFIGURATION_DIRECTORY_PROPERTY

public static final java.lang.String APPLICATION_CONFIGURATION_DIRECTORY_PROPERTY
The System property name (one of the -D options on the java command line start directive) which contains the directory location of property files used throughout the framework.

See Also:
Constant Field Values

APPLICATION_CONFIGURATION_DIRECTORY_DEFAULT

public static final java.lang.String APPLICATION_CONFIGURATION_DIRECTORY_DEFAULT
The default value for the application configuration directory (the current directory where you started the JVM).

See Also:
Constant Field Values
Constructor Detail

AppConfigProperties

public AppConfigProperties()
Method Detail

getApplicationConfigurationDirectory

public java.lang.String getApplicationConfigurationDirectory()
Retrieves the main application configuration directory. This directory should be the same directory as where the fully-qualified main application property file is located.


getApplicationPropertyFileName

public java.lang.String getApplicationPropertyFileName()
Retrieves the name of the main application property file


getApplicationName

public java.lang.String getApplicationName()
Retrieves the name for the application to uniquely identify it from other Java virtual machine instances running on the network. The default implementation at this level is host name concatenated with