com.oroad.stxx.util
Class StxxProperties

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended bycom.oroad.stxx.util.StxxProperties
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class StxxProperties
extends java.util.Properties

Extends java.util.Properties to provide easier access methods and public static key constants.

Author:
Don Brown, Jeff Pennal
See Also:
Serialized Form

Field Summary
static java.lang.String ALLOW_URL_DEBUG_KEY
          Allows the use of "debug=true" on the querystring to trigger xml debugging
static java.lang.String CACHE_CLASS_KEY
          The name of the implementing class for a cache
static java.lang.String CACHE_EXPIRY_TIME_KEY
          The expiration time of the cache
static java.lang.String CACHE_NAME_KEY
          The name of the cache
static java.lang.String CACHE_SIZE_KEY
          The size of the cache
static java.lang.String DEBUG_XML_PATH_KEY
          Sets the path for written xml debug information
static java.lang.String DEFAULT_PREFIX
          The prefix for default cache values
protected  boolean isStrutsPlugin
          Holds whether stxx is currently being used with Struts 1.1+
static java.lang.String TRANSFORM_SELECTOR_PREFIX
          The implementation of the class that chooses what transform to use
static java.lang.String TRANSFORMER_CLASS_KEY
          The name of the implementing class for a transformer
static java.lang.String TRANSFORMER_PREFIX
          The prefix for transformer configurations
static java.lang.String WRITE_XML_DEBUG_KEY
          Determines whether xml debugging information will be written to disk as well as screen
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
StxxProperties()
           
 
Method Summary
 boolean getBoolean(java.lang.String key, boolean def)
          Gets a property as a boolean.
 int getInt(java.lang.String key, int def)
          Gets a property as a int.
 long getLong(java.lang.String key, long def)
          Gets a property as a long.
 java.lang.String[] getStringArray(java.lang.String prop)
          Gets a property as a String array.
 boolean isStrutsPlugin()
          Returns true of stxx is currently being used with Struts 1.1+
 void setStrutsPlugin(boolean val)
          Sets whether stxx is currently being used with Struts 1.1+
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store
 
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

ALLOW_URL_DEBUG_KEY

public static final java.lang.String ALLOW_URL_DEBUG_KEY
Allows the use of "debug=true" on the querystring to trigger xml debugging

See Also:
Constant Field Values

WRITE_XML_DEBUG_KEY

public static final java.lang.String WRITE_XML_DEBUG_KEY
Determines whether xml debugging information will be written to disk as well as screen

See Also:
Constant Field Values

DEBUG_XML_PATH_KEY

public static final java.lang.String DEBUG_XML_PATH_KEY
Sets the path for written xml debug information

See Also:
Constant Field Values

TRANSFORMER_PREFIX

public static final java.lang.String TRANSFORMER_PREFIX
The prefix for transformer configurations

See Also:
Constant Field Values

TRANSFORM_SELECTOR_PREFIX

public static final java.lang.String TRANSFORM_SELECTOR_PREFIX
The implementation of the class that chooses what transform to use

See Also:
Constant Field Values

TRANSFORMER_CLASS_KEY

public static final java.lang.String TRANSFORMER_CLASS_KEY
The name of the implementing class for a transformer

See Also:
Constant Field Values

CACHE_CLASS_KEY

public static final java.lang.String CACHE_CLASS_KEY
The name of the implementing class for a cache

See Also:
Constant Field Values

CACHE_NAME_KEY

public static final java.lang.String CACHE_NAME_KEY
The name of the cache

See Also:
Constant Field Values

CACHE_SIZE_KEY

public static final java.lang.String CACHE_SIZE_KEY
The size of the cache

See Also:
Constant Field Values

CACHE_EXPIRY_TIME_KEY

public static final java.lang.String CACHE_EXPIRY_TIME_KEY
The expiration time of the cache

See Also:
Constant Field Values

DEFAULT_PREFIX

public static final java.lang.String DEFAULT_PREFIX
The prefix for default cache values

See Also:
Constant Field Values

isStrutsPlugin

protected boolean isStrutsPlugin
Holds whether stxx is currently being used with Struts 1.1+

Constructor Detail

StxxProperties

public StxxProperties()
Method Detail

getBoolean

public boolean getBoolean(java.lang.String key,
                          boolean def)
Gets a property as a boolean.

Parameters:
key - The key to find the property
def - The value to return if the key is not found
Returns:
The boolean value

getInt

public int getInt(java.lang.String key,
                  int def)
Gets a property as a int.

Parameters:
key - The key to find the property
def - The value to return if the key is not found
Returns:
The int value

getLong

public long getLong(java.lang.String key,
                    long def)
Gets a property as a long.

Parameters:
key - The key to find the property
def - The value to return if the key is not found
Returns:
The long value

getStringArray

public java.lang.String[] getStringArray(java.lang.String prop)
Gets a property as a String array. The property's values should be comma-delimited with each value optionally surrounded by double quotes if the value contains a comma.

Parameters:
prop - The key to find the property
Returns:
A String array of found elements

isStrutsPlugin

public boolean isStrutsPlugin()
Returns true of stxx is currently being used with Struts 1.1+

Returns:
True if used as a Struts plugin

setStrutsPlugin

public void setStrutsPlugin(boolean val)
Sets whether stxx is currently being used with Struts 1.1+

Parameters:
val - True if used as a Struts plugin