Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enhydra.servlet.filter
Class FilterManager  view FilterManager download FilterManager.java

java.lang.Object
  extended byorg.enhydra.servlet.filter.FilterManager

public class FilterManager
extends java.lang.Object

This class maintains a set of Filters. Each filter is associated with an identification string (symbolic name). This ID string is used to retrieve a filter.

This class does not monitor the creation of filters. If you create one, you are responsible for adding it to this class. These public methods are the only things that modify the set of filters managed by this class.


Field Summary
private  java.util.Hashtable descriptions
           
private  java.util.Hashtable filters
           
 
Constructor Summary
FilterManager()
          Create a new, empty, FilterManager.
 
Method Summary
 void add(java.lang.String filterID, Filter filter, java.lang.String description)
          Add a Filter to the set.
 void delete(java.lang.String filterID)
          Remove a Filter from the set.
 Filter get(java.lang.String filterID)
          Look up a Filter by its identifier string.
 java.lang.String getDescription(java.lang.String filterID)
          Look up a filter's description by its identifier string.
 java.lang.String[] getIDs()
          Get all the names of the Filters currently being stored.
 java.lang.String getUniqueID(java.lang.String baseName)
          Generate a unique filter id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filters

private java.util.Hashtable filters

descriptions

private java.util.Hashtable descriptions
Constructor Detail

FilterManager

public FilterManager()
Create a new, empty, FilterManager.

Method Detail

add

public void add(java.lang.String filterID,
                Filter filter,
                java.lang.String description)
Add a Filter to the set. It will be referred to by the given identifier string. If a filter already being stored has the same filterID, the new filter will replace the old filter.


get

public Filter get(java.lang.String filterID)
Look up a Filter by its identifier string.


getDescription

public java.lang.String getDescription(java.lang.String filterID)
Look up a filter's description by its identifier string.


getIDs

public java.lang.String[] getIDs()
Get all the names of the Filters currently being stored.


delete

public void delete(java.lang.String filterID)
Remove a Filter from the set. Silently ignores errors.


getUniqueID

public java.lang.String getUniqueID(java.lang.String baseName)
Generate a unique filter id. Given the base name, a number is appended onto the end. The resulting string is guarenteed to not currently exist as a filter id. If the base name is not already being used, it is returned unchanged.