|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletFilter
A portlet filter is an object that performs filtering on the request to a portlet, or on the response from a portlet, or both.
Filters perform filtering in the doFilter method. Every Filter has
access to a FilterConfig
object from which it can obtain its
initialization parameters, a reference to the PortalContext
which it can use, for example, to load resources needed for
filtering tasks.
Portlet filters are filters of the portlet container that may be applied to all available portlets in the portal to filter each portlet's request/response. The lifecycle of a portlet filter is identical to the portal server's lifecycle.
Filters are configured in the PortletFilter.properties file of the
portal.
Examples that have been identified for this design are
This interface is designed to be implemented by clients. |
Nested Class Summary | |
---|---|
static class |
PortletFilter.Method
Deprecated. The Method class is a finite enumeration of
the possible methods that a filter can invoke. |
Method Summary | |
---|---|
void |
destroy()
Deprecated. Called by the portlet container to indicate to a filter that it is being taken out of service. |
void |
doFilter(PortletFilter.Method method,
org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletResponse response,
PortletFilterChain chain)
Deprecated. The doFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain. |
void |
init(PortletFilterConfig filterConfig)
Deprecated. Called by the portlet container to indicate to a filter that it is being placed into service. |
Method Detail |
---|
void init(PortletFilterConfig filterConfig) throws org.apache.jetspeed.portlet.PortletException
The portlet container cannot place the filter into service if
the init method either
filterConfig
- the portlet filter config
org.apache.jetspeed.portlet.PortletException
- if an exception has occurrred that interferes
with the portlet filter's normal initializationvoid doFilter(PortletFilter.Method method, org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response, PortletFilterChain chain) throws org.apache.jetspeed.portlet.PortletException, java.io.IOException
Please note that the response may be null for an event-based method, e.g., ActionEvent.
The FilterChain passed in to this method allows the Filter to pass on the request and response to the next filter in the chain.
A typical implementation of this method would follow the following pattern:
1. Examine the request
2. Optionally wrap the request object with a custom implementation to
filter content or headers for input filtering
3. Optionally wrap the response object with a custom implementation to
filter content or headers for output filtering
4. Invoke the next filter in the chain using the FilterChain
object (chain.doFilter())
method
- the type of requested methodrequest
- the request to pass along the chain.response
- the response to pass along the chain.chain
- the portlet filter chain
org.apache.jetspeed.portlet.PortletException
- if the filter has trouble fulfilling the request
java.io.IOException
- if the streaming causes an I/O problemPortletFilterChain
void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |