All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.resources.ResourceFilter

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.tools.store.ResourceFrame
                           |
                           +----w3c.jigsaw.resources.ResourceFilter

public class ResourceFilter
extends ResourceFrame
implements HTTPFilter

Variable Index

 o ATTR_TARGET
Attribute index - Our target attribute.

Constructor Index

 o ResourceFilter()

Method Index

 o exceptionFilter(Request, HTTPException, HTTPFilter[], int)
 o getHelpURL()
Get this resource's help url.
 o getHelpURL(String)
Get the help URL for that resource's attribute.
 o getTargetResource()
Get our target resource.
 o ingoingFilter(Request)
Simplified ingoingFilter API.
 o ingoingFilter(Request, HTTPFilter[], int)
The ingoingFilter method.
 o initialize(Object[])
Initialize the filter.
 o lookup(LookupState, LookupResult)
Lookup time filtering.
 o markModified()
Mark this filter as modified.
 o outgoingFilter(Request, Reply)
Simplified API to the outgoing filter metho.
 o outgoingFilter(Request, Reply, HTTPFilter[], int)
The outgoingFilter method.
 o outputFilter(Request, Reply, OutputStream)

Variables

 o ATTR_TARGET
 protected static int ATTR_TARGET
Attribute index - Our target attribute.

Constructors

 o ResourceFilter
 public ResourceFilter()

Methods

 o getHelpURL
 public String getHelpURL()
Get this resource's help url.

Returns:
An URL, encoded as a String, or null if not available.
Overrides:
getHelpURL in class Resource
 o getHelpURL
 public String getHelpURL(String topic)
Get the help URL for that resource's attribute.

Parameters:
topic - The topic (can be an attribute name, or a property, etc).
Returns:
A String encoded URL, or null.
Overrides:
getHelpURL in class Resource
 o getTargetResource
 public Resource getTargetResource()
Get our target resource.

 o markModified
 public void markModified()
Mark this filter as modified. Delegate the dirty bit to our target.

Overrides:
markModified in class Resource
 o lookup
 public boolean lookup(LookupState ls,
                       LookupResult lr) throws HTTPException
Lookup time filtering. This method is called while Jigsaw performs resource lookup. Each time a lookup end up on the target resource of that filter, this method will be called.

Parameters:
ls - The current lookup state.
lr - The current lookup result.
Returns:
A boolean, true if this filter has performed the whole lookup, and side-effect the lookup result appropriatelly, false otherwise.
 o ingoingFilter
 public Reply ingoingFilter(Request request) throws HTTPException
Simplified ingoingFilter API. This is a default, simplified API to the ingoing filter method.

Parameters:
request - The request to filter.
Returns:
A Reply instance, or null if processing should continue normally.
Throws: HTTPException
If processing should be interrupted, because an abnormal situation occured.
 o ingoingFilter
 public Reply ingoingFilter(Request request,
                            HTTPFilter filters[],
                            int i) throws HTTPException
The ingoingFilter method. This is the method that really gets called by Jigsaw core. By default it will invoke the simpler ingoingFilter method, taking only the request has a parameter.

Parameters:
request - The request that is about to be handled.
filters - The whole filter list to be applied to the resource.
i - A pointer into the above array, indicating which filters have already been triggered (the one whose index are lower than i), and what filters have to be triggered (the one whose index are greater or equal to i+1).
Returns:
A Reply instance, if the filter did know how to answer the request without further processing, null otherwise.
 o outgoingFilter
 public Reply outgoingFilter(Request request,
                             Reply reply) throws HTTPException
Simplified API to the outgoing filter metho. This is a simplified API to the ougoing filter method, you can either overide this method, or the more powerfull one.

Parameters:
request - The original request.
reply - It's original reply.
Returns:
A Reply instance, or null if processing should continue normally.
Throws: HTTPException
If processing should be interrupted, because an abnormal situation occured.
 o exceptionFilter
 public Reply exceptionFilter(Request request,
                              HTTPException ex,
                              HTTPFilter filters[],
                              int i)
 o outgoingFilter
 public Reply outgoingFilter(Request request,
                             Reply reply,
                             HTTPFilter filters[],
                             int fidx) throws HTTPException
The outgoingFilter method. This method is the one that gets called by Jigsaw core. By default it will call the simpler outgoingFilter method that takes only the request and the reply as parameters.

Parameters:
request - The request that has been processed.
reply - The original reply as emitted by the resource.
filters - The whole filter that applies to the resource.
i - The current index of filters. The i filter is ourself, filters with lower indexes have already been applied, and filters with greater indexes are still to be applied.
Returns:
A Reply instance, if that filter know how to complete the request processing, or null if reminaing filters are to be called by Jigsaw engine.
 o outputFilter
 public OutputStream outputFilter(Request request,
                                  Reply reply,
                                  OutputStream output)
 o initialize
 public void initialize(Object values[])
Initialize the filter.

Parameters:
values - The default attribute values.
Overrides:
initialize in class AttributeHolder

All Packages  Class Hierarchy  This Package  Previous  Next  Index