javawebparts.filter
Class DependencyConfig

java.lang.Object
  |
  +--javawebparts.filter.DependencyConfig

public class DependencyConfig
extends java.lang.Object

This class is a bean that represents a <dependency> element in the config file for the DependencyFilter.

Author:
Frank W. Zammetti.

Field Summary
private  java.lang.String className
          Name of the class of the configured dependency.
private  java.lang.String createForPaths
          This is the collection of paths for which the dependency will be created.
private  java.util.ArrayList createForPathsAL
          This is the collection of paths for which the dependency will be created.
private  java.util.ArrayList initArrays
          List of Array properties that will be configured on the object.
private  java.util.ArrayList initArraysTemp
          List of Array properties that will be configured on the object.
private  java.lang.String initClass
          Name of the class that will be used to initialize the object upon creation.
private  java.util.ArrayList initLists
          List of List properties that will be configured on the object.
private  java.util.ArrayList initListsTemp
          List of List properties that will be configured on the object.
private  java.util.ArrayList initMaps
          List of Map properties that will be configured on the object.
private  java.util.ArrayList initMapsTemp
          List of Map properties that will be configured on the object.
private  java.lang.String initMethod
          Method of the initClass that will be called to initialize the object.
private  java.util.ArrayList initProps
          List of simple properties that will be configured on the object.
private static org.apache.commons.logging.Log log
          Log instance.
private  long maxAge
          The maximum age in seconds for a session-scoped dependency.
private  java.util.ArrayList methodCalls
          List of methods that will be called on the object after creation.
private  java.lang.String name
          Name the configured dependency will be under.
private  java.lang.String scope
          Scope the configured dependency will be under (request or session).
 
Constructor Summary
DependencyConfig()
           
 
Method Summary
 void addInitArray(java.lang.String inName)
          Used to add a new Array property initialization to the collection.
 void addInitArrayTemp(java.lang.String inValue)
          Used to add a new Array property initialization to the collection.
 void addInitList(java.lang.String inMethod, java.lang.String inName)
          Used to add a new List property initialization to the collection.
 void addInitListTemp(java.lang.String inValue)
          Used to add a new List property initialization to the collection.
 void addInitMap(java.lang.String inMethod, java.lang.String inName)
          Used to add a new Map property initialization to the collection.
 void addInitMapTemp(java.lang.String inKey, java.lang.String inValue)
          Used to add a new Map property initialization to the collection.
 void addInitProp(java.lang.String inName, java.lang.String inValue)
          Used to add a new simple property initialization to the collection.
 void addMethodCall(java.lang.String inName, java.lang.String inArguments)
          Used to add a new method call to the collection.
 java.lang.String getClassName()
          Class Name accessor.
 java.lang.String getCreateForPaths()
          createForPaths accessor.
 java.util.ArrayList getCreateForPathsAL()
          createForPathsAL accessor.
 java.util.ArrayList getInitArrays()
          Returns the collection of Array property initializations.
 java.lang.String getInitClass()
          Init Class accessor.
 java.util.ArrayList getInitLists()
          Returns the collection of List property initializations.
 java.util.ArrayList getInitMaps()
          Returns the collection of Map property initializations.
 java.lang.String getInitMethod()
          Init Method accessor.
 java.util.ArrayList getInitProps()
          Returns the collection of simple property initializations.
 long getMaxAge()
          Max Age accessor.
 java.util.ArrayList getMethodCalls()
          Returns the collection of method calls.
 java.lang.String getName()
          Name accessor.
 java.lang.String getScope()
          Scope accessor.
 void setClassName(java.lang.String inClassName)
          Class Name mutator.
 void setCreateForPaths(java.lang.String inCreateForPaths)
          createForPaths mutator.
 void setInitClass(java.lang.String inInitClass)
          Init Class mutator.
 void setInitMethod(java.lang.String inInitMethod)
          Init Method mutator.
 void setMaxAge(long inMaxAge)
          Max Age mutator.
 void setName(java.lang.String inName)
          Name mutator.
 void setScope(java.lang.String inScope)
          Scope mutator.
 java.lang.String toString()
          Overridden toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log
Log instance.


scope

private java.lang.String scope
Scope the configured dependency will be under (request or session).


name

private java.lang.String name
Name the configured dependency will be under.


className

private java.lang.String className
Name of the class of the configured dependency.


initClass

private java.lang.String initClass
Name of the class that will be used to initialize the object upon creation.


initMethod

private java.lang.String initMethod
Method of the initClass that will be called to initialize the object.


createForPathsAL

private java.util.ArrayList createForPathsAL
This is the collection of paths for which the dependency will be created.


createForPaths

private java.lang.String createForPaths
This is the collection of paths for which the dependency will be created. THIS IS ONLY NEEDED TO ALLOW DIGESTER TO HAVE SOMETHING TO SET. It should probably not be needed after initial population, createForPathsAL should be all that is needed.


maxAge

private long maxAge
The maximum age in seconds for a session-scoped dependency. If a created object is older than this value, it will be re-created.


initProps

private java.util.ArrayList initProps
List of simple properties that will be configured on the object.


methodCalls

private java.util.ArrayList methodCalls
List of methods that will be called on the object after creation.


initListsTemp

private java.util.ArrayList initListsTemp
List of List properties that will be configured on the object. This is the version used during parsing of the config file.


initLists

private java.util.ArrayList initLists
List of List properties that will be configured on the object.


initMapsTemp

private java.util.ArrayList initMapsTemp
List of Map properties that will be configured on the object. This is the version used during parsing of the config file.


initMaps

private java.util.ArrayList initMaps
List of Map properties that will be configured on the object.


initArraysTemp

private java.util.ArrayList initArraysTemp
List of Array properties that will be configured on the object. This is the version used during parsing of the config file.


initArrays

private java.util.ArrayList initArrays
List of Array properties that will be configured on the object.

Constructor Detail

DependencyConfig

public DependencyConfig()
Method Detail

setCreateForPaths

public void setCreateForPaths(java.lang.String inCreateForPaths)
createForPaths mutator.

Parameters:
inCreateForPaths - The comma-separeted list of paths for which the dependency will be created. Note that this string will be parsed and an ArrayList created from it, which will become the value of createForPathsAL.

getCreateForPaths

public java.lang.String getCreateForPaths()
createForPaths accessor.

Returns:
The collection of paths for which the dependency will be created in comma-separated String form. THIS METHOD SHOULD NOT BE NEEDED, EXCEPT TO MAKE DIGESTER POPULATE THIS PROPERTY (without out, Digester sees that it's a read-only property and does not set it).

getCreateForPathsAL

public java.util.ArrayList getCreateForPathsAL()
createForPathsAL accessor.

Returns:
The collection of paths for which the dependency will be created. THIS IS THE ONE CLIENT CODE SHOULD USE!

setMaxAge

public void setMaxAge(long inMaxAge)
Max Age mutator.

Parameters:
inMaxAge - Max age for session-scoped object to be considered "fresh".

getMaxAge

public long getMaxAge()
Max Age accessor.

Returns:
Max age for session-scoped object to be considered "fresh".

setScope

public void setScope(java.lang.String inScope)
Scope mutator.

Parameters:
inScope - Scope of the dependency.

getScope

public java.lang.String getScope()
Scope accessor.

Returns:
The scope of the dependency.

setName

public void setName(java.lang.String inName)
Name mutator.

Parameters:
inName - Name the dependency will be stored under.

getName

public java.lang.String getName()
Name accessor.

Returns:
Name the dependency will be stored under.

setClassName

public void setClassName(java.lang.String inClassName)
Class Name mutator.

Parameters:
inClassName - The name of the class for this dependency.

getClassName

public java.lang.String getClassName()
Class Name accessor.

Returns:
The name of the class for this dependency.

setInitClass

public void setInitClass(java.lang.String inInitClass)
Init Class mutator.

Parameters:
inInitClass - Name of the class used to initialize the object.

getInitClass

public java.lang.String getInitClass()
Init Class accessor.

Returns:
Name of the class used to initialize the object.

setInitMethod

public void setInitMethod(java.lang.String inInitMethod)
Init Method mutator.

Parameters:
inInitMethod - Method of initClass that will be called.

getInitMethod

public java.lang.String getInitMethod()
Init Method accessor.

Returns:
Method of initClass that will be called

addInitProp

public void addInitProp(java.lang.String inName,
                        java.lang.String inValue)
Used to add a new simple property initialization to the collection.

Parameters:
inName - The name fo the property to set.
inValue - The value to set the property to.

getInitProps

public java.util.ArrayList getInitProps()
Returns the collection of simple property initializations.

Returns:
List of simple property initializations.

addMethodCall

public void addMethodCall(java.lang.String inName,
                          java.lang.String inArguments)
Used to add a new method call to the collection.

Parameters:
inName - The name fo the method call.
inArguments - Comma-separated list of arguments (Strings only!) to be passed to the method.

getMethodCalls

public java.util.ArrayList getMethodCalls()
Returns the collection of method calls.

Returns:
List of method calls.

addInitListTemp

public void addInitListTemp(java.lang.String inValue)
Used to add a new List property initialization to the collection. This is the version called during config file parsing to build up the temporary collection before the real one is constructed.

Parameters:
inValue - The value that will be added to the object's property.

addInitList

public void addInitList(java.lang.String inMethod,
                        java.lang.String inName)
Used to add a new List property initialization to the collection.

Parameters:
inMethod - Name of the method used to set the property.
inName - The name of the List property to set.

getInitLists

public java.util.ArrayList getInitLists()
Returns the collection of List property initializations.

Returns:
List of List property initializations.

addInitArrayTemp

public void addInitArrayTemp(java.lang.String inValue)
Used to add a new Array property initialization to the collection. This is the version called during config file parsing to build up the temporary collection before the real one is constructed.

Parameters:
inValue - The value to be added to the object's property.

addInitArray

public void addInitArray(java.lang.String inName)
Used to add a new Array property initialization to the collection.

Parameters:
inName - The name of the Array property to set.

getInitArrays

public java.util.ArrayList getInitArrays()
Returns the collection of Array property initializations.

Returns:
List of Array property initializations.

addInitMapTemp

public void addInitMapTemp(java.lang.String inKey,
                           java.lang.String inValue)
Used to add a new Map property initialization to the collection. This is the version called during config file parsing to build up the temporary collection before the real one is constructed.

Parameters:
inKey - The key to be added to the collection.
inValue - The value to be added to the collection.

addInitMap

public void addInitMap(java.lang.String inMethod,
                       java.lang.String inName)
Used to add a new Map property initialization to the collection.

Parameters:
inMethod - Name of the method used to set the property.
inName - The name fo the Map property to set.

getInitMaps

public java.util.ArrayList getInitMaps()
Returns the collection of Map property initializations.

Returns:
List of Map property initializations.

toString

public java.lang.String toString()
Overridden toString method.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this bean.


Copyright 2005 Frank W. Zammetti