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:
- During the lookup, so that they have a chance to check any access
rights,
- Before the request is actually processed by its target resource,
- And optionally, after the request has been processed (depending on
the return value of the second stage.).
- See Also:
- ResourceFilter
-
filterClass
- The special class of ResourceFrame we know of.
-
FilteredResource()
-
-
getFilters()
- Get our whole list of filters.
-
getFilters(Class)
- Get the list of filters of this class.
-
initialize(Object[])
- Initialize the filters of that filtered resource.
-
lookup(LookupState, LookupResult)
- Register our filters, if any in the lookup result object.
-
registerFilter(ResourceFilter, Hashtable)
- Register a new filter to this resource.
-
unregisterFilter(ResourceFilter)
- Unregister a filter to this target.
filterClass
protected static Class filterClass
- The special class of ResourceFrame we know of.
FilteredResource
public FilteredResource()
getFilters
public synchronized ResourceFilter[] getFilters()
- Get our whole list of filters.
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.
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.
unregisterFilter
public synchronized void unregisterFilter(ResourceFilter filter)
- Unregister a filter to this target.
- Parameters:
- filter - The filter to unregister.
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
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