All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.resources.FilteredResource

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.jigsaw.resources.HTTPResource
                           |
                           +----w3c.jigsaw.resources.FilteredResource

public class FilteredResource
extends HTTPResource
Filtered resources. A filtered resource is a resource that can be filtered through any filters. Filters are trigered at three points during request processing:

See Also:
ResourceFilter

Variable Index

 o filterClass
The special class of ResourceFrame we know of.

Constructor Index

 o FilteredResource()

Method Index

 o getFilters()
Get our whole list of filters.
 o getFilters(Class)
Get the list of filters of this class.
 o initialize(Object[])
Initialize the filters of that filtered resource.
 o lookup(LookupState, LookupResult)
Register our filters, if any in the lookup result object.
 o registerFilter(ResourceFilter, Hashtable)
Register a new filter to this resource.
 o unregisterFilter(ResourceFilter)
Unregister a filter to this target.

Variables

 o filterClass
 protected static Class filterClass
The special class of ResourceFrame we know of.

Constructors

 o FilteredResource
 public FilteredResource()

Methods

 o getFilters
 public synchronized ResourceFilter[] getFilters()
Get our whole list of filters.

 o getFilters
 public synchronized ResourceFilter[] getFilters(Class cls)
Get the list of filters of this class.

Parameters:
cls - The class of filters requested.
Returns:
An array of filters, which are instances of the given class.
 o registerFilter
 public synchronized void registerFilter(ResourceFilter filter,
                                         Hashtable defs)
Register a new filter to this resource. This method register a new filter to the this filtered resource. The provided filter should be an uninitialized ResourceFilter instance.

Parameters:
The - uninitialized filter.
 o unregisterFilter
 public synchronized void unregisterFilter(ResourceFilter filter)
Unregister a filter to this target.

Parameters:
filter - The filter to unregister.
 o lookup
 public boolean lookup(LookupState ls,
                       LookupResult lr) throws HTTPException
Register our filters, if any in the lookup result object. Sub-classes of the FilteredResource class should either register their filters themselves, or call their super method. The latest way is prefered, of course.

Parameters:
ls - The current lookup state.
lr - The lookup result, being constructed.
Returns:
A boolean, true if lookup has found a terminal node, false otherwise. In the latter case, the caller should make sure to continue the lookup process.
Throws: HTTPException
If something went wrong.
Overrides:
lookup in class HTTPResource
 o initialize
 public void initialize(Object values[])
Initialize the filters of that filtered resource.

Parameters:
values - Default attribute values.
Overrides:
initialize in class AttributeHolder

All Packages  Class Hierarchy  This Package  Previous  Next  Index