IT.CappuccinoNet  
StrutsCX v0.8.3
   

com.cappuccinonet.strutscx.util
Class StrutsCXPropertiesReader

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--com.oreilly.javaxml2.XMLProperties
                          |
                          +--com.cappuccinonet.strutscx.util.StrutsCXPropertiesReader
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class StrutsCXPropertiesReader
extends com.oreilly.javaxml2.XMLProperties

A helper class which reads in the properties.xml and writes a XMLProperties object into the ServletContext. Make sure the /WEB-INF/properties.xml is present!

Caching & Performance Tuning:
The properties are read once at first call to the StrutsCXBaseAction and saved there as a field parameter available to all Action classes.

NOTE: Changes to the properties.xml afford to reload the application!

Future Improvements: A future release should and will replace this mechanism with the new JDK 1.4 Preferences!

Version:
v0.4, 2002.10.15
Author:
Bernhard Woehrlin, IT.CappuccinoNet.com
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
private  ServletConfig config
          The ServletConfig
private static Logger logger
          The logger - it is visible to all subclasses.
private  java.lang.String THIS_CLASS
          A String with this Classname used for system messages
 
Fields inherited from class java.util.Properties
defaults
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
StrutsCXPropertiesReader()
           
 
Method Summary
 com.oreilly.javaxml2.XMLProperties getProperties(ServletConfig config)
          Reads in the properties out of the /WEB-INF/properties.xml.
 
Methods inherited from class com.oreilly.javaxml2.XMLProperties
load, load, load, save, store, store, store
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, propertyNames, setProperty
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

THIS_CLASS

private java.lang.String THIS_CLASS
A String with this Classname used for system messages


logger

private static Logger logger
The logger - it is visible to all subclasses.


config

private ServletConfig config
The ServletConfig

Constructor Detail

StrutsCXPropertiesReader

public StrutsCXPropertiesReader()
Method Detail

getProperties

public com.oreilly.javaxml2.XMLProperties getProperties(ServletConfig config)
Reads in the properties out of the /WEB-INF/properties.xml. Writes this in the Servlet context. Sets a flag if we did this job. If true, it won't do anything next time.

NOTE: Changes to the properties.xml afford to reload the application!

Parameters:
config - the ServletConfig.
Returns:
props the XMLProperties
See Also:
StrutsCXConstants

IT.CappuccinoNet  
StrutsCX v0.8.3
   

© 2002, IT.CappuccinoNet.com - compiled 20020207:2326