| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.util.SettingsBase
Settings refers to configuration 'values' that need to be made available in the application. This class which should be extended, provided access to setting values that are defined in web.xml as environment parameters.
An example of an entry in web.xml
   <env-entry>
    <env-entry-name>myapp.email.smtpHost</env-entry-name>
    <env-entry-value>mail.yahoo.com</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
  </env-entry>
 
 An example of a method in a sub-class that access this setting
 public static String getEmailHost() {
     return (String) getProperty("myapp.email.smtpHost", String.class, null);
 }
 
| Field Summary | |
| protected static String | JNDIBase | 
| Constructor Summary | |
| SettingsBase() | |
| Method Summary | |
| protected static Object | getProperty(String name)Return the value of the property from the JNDI resource | 
| protected static Object | getProperty(String name,
                       Class type)Return the value of the property from the JNDI resource. | 
| protected static Object | getProperty(String name,
                       Class type,
                       Object defValue)Return the value of the property from the JNDI resource. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected static String JNDIBase
| Constructor Detail | 
public SettingsBase()
| Method Detail | 
protected static Object getProperty(String name)
name - Name of the property
protected static Object getProperty(String name,
                                    Class type)
name - Name of the property
protected static Object getProperty(String name,
                                    Class type,
                                    Object defValue)
name - Name of the propertydefValue - Specify the default laue to be returned if the property is not found or is Null
 specified type a runtime error is raised!| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||