org.apache.portals.bridges.portletfilter
Class FilterPortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by org.apache.portals.bridges.portletfilter.FilterPortlet
All Implemented Interfaces:
javax.portlet.Portlet, javax.portlet.PortletConfig

public class FilterPortlet
extends javax.portlet.GenericPortlet

FilterPortlet provides a portlet implementation to filter the specified portlet. The filtered portlet and filters are defined in a portlet descriptor(portlet.xml). The filetered portlet is specified by portlet-class, and the filters are specified by portlet-filters. Example:

 <portlet-app id="example-portlets" version="1.0">
    <portlet id="ExamplePortlet">
 ...
        <init-param>
            <name>portlet-class</name>
            <value>org.apache.myfaces.portlet.MyFacesGenericPortlet</value>
        </init-param>
        <init-param>
            <name>portlet-filters</name>
            <value>org.apache.myfaces.portlet.TomahawkPortletFilter</value>
        </init-param>
        <init-param>
            <name>org.apache.myfaces.portlet.TomahawkPortletFilter:upload-threshold-size</name>
            <value>1m</value>
        </init-param>
        <init-param>
            <name>org.apache.myfaces.portlet.TomahawkPortletFilter:upload-max-file-size</name>
            <value>10m</value>
        </init-param>
 ...
 

Author:
Shinsuke Sugaya

Field Summary
private static org.apache.commons.logging.Log log
           
private  javax.portlet.Portlet portlet
           
static String PORTLET_CLASS
           
private  PortletFilterChain portletFilterChain
           
 
Constructor Summary
FilterPortlet()
           
 
Method Summary
 void destroy()
           
 String getInitParameter(String arg0)
           
 Enumeration getInitParameterNames()
           
 javax.portlet.PortletContext getPortletContext()
           
 String getPortletName()
           
 ResourceBundle getResourceBundle(Locale arg0)
           
 void init(javax.portlet.PortletConfig config)
           
 void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
           
 void render(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
 
Methods inherited from class javax.portlet.GenericPortlet
doDispatch, doEdit, doHelp, doView, getPortletConfig, getTitle, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

PORTLET_CLASS

public static final String PORTLET_CLASS
See Also:
Constant Field Values

portletFilterChain

private PortletFilterChain portletFilterChain

portlet

private javax.portlet.Portlet portlet
Constructor Detail

FilterPortlet

public FilterPortlet()
Method Detail

init

public void init(javax.portlet.PortletConfig config)
          throws javax.portlet.PortletException
Specified by:
init in interface javax.portlet.Portlet
Overrides:
init in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException

processAction

public void processAction(javax.portlet.ActionRequest request,
                          javax.portlet.ActionResponse response)
                   throws javax.portlet.PortletException,
                          IOException
Specified by:
processAction in interface javax.portlet.Portlet
Overrides:
processAction in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
IOException

render

public void render(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Specified by:
render in interface javax.portlet.Portlet
Overrides:
render in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
IOException

destroy

public void destroy()
Specified by:
destroy in interface javax.portlet.Portlet
Overrides:
destroy in class javax.portlet.GenericPortlet

getInitParameter

public String getInitParameter(String arg0)
Specified by:
getInitParameter in interface javax.portlet.PortletConfig
Overrides:
getInitParameter in class javax.portlet.GenericPortlet

getInitParameterNames

public Enumeration getInitParameterNames()
Specified by:
getInitParameterNames in interface javax.portlet.PortletConfig
Overrides:
getInitParameterNames in class javax.portlet.GenericPortlet

getPortletContext

public javax.portlet.PortletContext getPortletContext()
Specified by:
getPortletContext in interface javax.portlet.PortletConfig
Overrides:
getPortletContext in class javax.portlet.GenericPortlet

getPortletName

public String getPortletName()
Specified by:
getPortletName in interface javax.portlet.PortletConfig
Overrides:
getPortletName in class javax.portlet.GenericPortlet

getResourceBundle

public ResourceBundle getResourceBundle(Locale arg0)
Specified by:
getResourceBundle in interface javax.portlet.PortletConfig
Overrides:
getResourceBundle in class javax.portlet.GenericPortlet


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