apputil
Class AppConfig

java.lang.Object
  |
  +--apputil.AppConfig

public class AppConfig
extends java.lang.Object
implements Testable

The AppConfig class provides a single point of obtaining application configuration information. The data is stored in a Properties file, whose name is specified in the constructor. The data is stored in a class member, so once it has been instantiated for the application, it can be accessed by other methods without having to know the location of the configuration properties file.


Field Summary
static java.lang.String AGENTEMAIL
           
protected static java.util.Properties applicationProperties
           
static java.lang.String JDBCDRIVER
           
static java.lang.String JDBCPASS
           
static java.lang.String JDBCURL
           
static java.lang.String JDBCUSER
           
static java.lang.String SERVICENAME
           
static java.lang.String SMTPHOST
           
 
Constructor Summary
AppConfig()
          default constructor provided for test harness
AppConfig(java.lang.String configfilename)
          Constructor, populuates the application properties from the configuration file identified in the parameter.
 
Method Summary
 java.lang.String getBugServerServiceName()
          Gets the registration name for the DefectServer orb service as it is/will be registered with the ORB Naming Service.
 java.lang.String getBugTrackerAgentEmail()
          Get the email address for the bug tracker agent.
 java.lang.String getDatasourceDriver()
          Get the name of the JDBC database driver for the application.
 java.lang.String getDatasourcePass()
          Get the username's for the data source
 java.lang.String getDatasourceURL()
          Get the name of the datasource for the application.
 java.lang.String getDatasourceUser()
          Get the username for the data source
 java.lang.String getSMTPHost()
          Gets the host name of the SMTP server
 boolean TestUnit()
          Supports test harness for unit testing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applicationProperties

protected static java.util.Properties applicationProperties

JDBCDRIVER

public static final java.lang.String JDBCDRIVER

JDBCURL

public static final java.lang.String JDBCURL

JDBCUSER

public static final java.lang.String JDBCUSER

JDBCPASS

public static final java.lang.String JDBCPASS

SERVICENAME

public static final java.lang.String SERVICENAME

SMTPHOST

public static final java.lang.String SMTPHOST

AGENTEMAIL

public static final java.lang.String AGENTEMAIL
Constructor Detail

AppConfig

public AppConfig(java.lang.String configfilename)
          throws java.io.IOException
Constructor, populuates the application properties from the configuration file identified in the parameter.
Parameters:
configilename - specifies the file that contains the application properties

AppConfig

public AppConfig()
default constructor provided for test harness
Method Detail

getBugTrackerAgentEmail

public java.lang.String getBugTrackerAgentEmail()
Get the email address for the bug tracker agent. This is the email address from which automated defect reports will be sent, and the recipients of these updates will see as the "from" address on the email.
Returns:
returns a string containing the agent email address

getDatasourceDriver

public java.lang.String getDatasourceDriver()
Get the name of the JDBC database driver for the application. Returns an empty string if the driver hasn't been set in the configuration file.
Returns:
returns a string containing the driver name

getDatasourceURL

public java.lang.String getDatasourceURL()
Get the name of the datasource for the application. Returns an empty string if the driver hasn't been set int the configuration file.

getDatasourceUser

public java.lang.String getDatasourceUser()
Get the username for the data source

getDatasourcePass

public java.lang.String getDatasourcePass()
Get the username's for the data source

getBugServerServiceName

public java.lang.String getBugServerServiceName()
Gets the registration name for the DefectServer orb service as it is/will be registered with the ORB Naming Service.

getSMTPHost

public java.lang.String getSMTPHost()
Gets the host name of the SMTP server

TestUnit

public boolean TestUnit()
Supports test harness for unit testing
Specified by:
TestUnit in interface Testable
Returns:
returns true for success, false for failure.