org.apache.portals.bridges.portletfilter
Interface PortletFilter


public interface PortletFilter

A filter is an object that performs filtering tasks on either the request to a resource (a portlet), or on the response from a resource, or both. Filters perform filtering in the renderFilter and processActionFilter method. Every Filter has access to a PortletFilterConfig object from which it can obtain its initialization parameters, a reference to the PortletConfig which it can use, for example, to load resources needed for filtering tasks. Filters are configured in the deployment descriptor of a portlet(portlet.xml).

Author:
Shinsuke Sugaya

Method Summary
 void destroy()
          Called by destroy method of FilterPortlet to destroy this portlet filter.
 void init(PortletFilterConfig filterConfig)
          Called by init method of FilterPortlet to initialize this portlet filter.
 void processActionFilter(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, PortletFilterChain chain)
          Called by render method of FilterPortlet to wrap the request when it has a multipart content.
 void renderFilter(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, PortletFilterChain chain)
          Called by render method of FilterPortlet to put tags, such as <style>, into <head>.
 

Method Detail

init

public void init(PortletFilterConfig filterConfig)
          throws javax.portlet.PortletException
Called by init method of FilterPortlet to initialize this portlet filter.

Parameters:
filterConfig -
Throws:
javax.portlet.PortletException

renderFilter

public void renderFilter(javax.portlet.RenderRequest request,
                         javax.portlet.RenderResponse response,
                         PortletFilterChain chain)
                  throws javax.portlet.PortletException,
                         IOException
Called by render method of FilterPortlet to put tags, such as <style>, into <head>.

Parameters:
request -
response -
chain - PortletFilterChain instance
Throws:
javax.portlet.PortletException
IOException

processActionFilter

public void processActionFilter(javax.portlet.ActionRequest request,
                                javax.portlet.ActionResponse response,
                                PortletFilterChain chain)
                         throws javax.portlet.PortletException,
                                IOException
Called by render method of FilterPortlet to wrap the request when it has a multipart content.

Parameters:
request -
response -
chain - PortletFilterChain instance
Throws:
javax.portlet.PortletException
IOException

destroy

public void destroy()
Called by destroy method of FilterPortlet to destroy this portlet filter.

Throws:
javax.portlet.PortletException


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.