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
-
ATTR_TARGET
- Attribute index - Our target attribute.
-
ResourceFilter()
-
-
exceptionFilter(Request, HTTPException, HTTPFilter[], int)
-
-
getHelpURL()
- Get this resource's help url.
-
getHelpURL(String)
- Get the help URL for that resource's attribute.
-
getTargetResource()
- Get our target resource.
-
ingoingFilter(Request)
- Simplified ingoingFilter API.
-
ingoingFilter(Request, HTTPFilter[], int)
- The ingoingFilter method.
-
initialize(Object[])
- Initialize the filter.
-
lookup(LookupState, LookupResult)
- Lookup time filtering.
-
markModified()
- Mark this filter as modified.
-
outgoingFilter(Request, Reply)
- Simplified API to the outgoing filter metho.
-
outgoingFilter(Request, Reply, HTTPFilter[], int)
- The outgoingFilter method.
-
outputFilter(Request, Reply, OutputStream)
-
ATTR_TARGET
protected static int ATTR_TARGET
- Attribute index - Our target attribute.
ResourceFilter
public ResourceFilter()
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
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
getTargetResource
public Resource getTargetResource()
- Get our target resource.
markModified
public void markModified()
- Mark this filter as modified.
Delegate the dirty bit to our target.
- Overrides:
- markModified in class Resource
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.
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.
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.
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.
exceptionFilter
public Reply exceptionFilter(Request request,
HTTPException ex,
HTTPFilter filters[],
int i)
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.
outputFilter
public OutputStream outputFilter(Request request,
Reply reply,
OutputStream output)
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