[ http://issues.apache.org/jira/browse/PB-15?page=comments#action_12355897 ]
Shinsuke SUGAYA commented on PB-15: ----------------------------------- I'll work on this feature next week. If you have any comments/concerns/suggestions, please let me know. > Implements Portlet Filter > ------------------------- > > Key: PB-15 > URL: http://issues.apache.org/jira/browse/PB-15 > Project: Portals Bridges > Type: New Feature > Environment: J2SE 1.4 > Reporter: Shinsuke SUGAYA > Assignee: Shinsuke SUGAYA > > FilterPortlet > ============= > Overview > --------- > FilterPortlet enables you to add processes you want before and after > accessing the target portlet. > The feature provided by FilterPortlet is like Servlet Filter. (Portlet Filter > may be included in > future Portlet Spec, but currently it's not included yet.) > I have already implemented it to fix MyFaces dependency issue(please see > http://issues.apache.org/jira/browse/MYFACES-434). > Generalizing it, I put them to: > http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/jetplume/jetplume/bridges/portlet-filter/ > Class&Interface > --------------- > - FilterPortlet class > FilterPortlet wraps the target portlet. > - PortletFilter interface > The process you want to add is implemented this interface. > - PortletFilterChain class > This class is an object provided to the developer giving a view > into the invocation chain of a filtered request for a resource. > - PortletFilterConfig class > A filter configuration object used by FilterPortlet to pass > information to a filter during initialization. > If you have used Servlet Filter, I think it's easy to use FilterPortlet :) > Example > ------- > For example, if you create "HelloWorldPortletFilter" as the portlet filter, > portlet.xml is: > <portlet-app id="helloworld" version="1.0"> > <portlet id="FilteredHelloWorld"> > <portlet-name>FilteredHelloWorld</portlet-name> > <display-name>Filtered Hello World</display-name> > <description>HelloWorld is a filtered portlet for testing</description> > > <portlet-class>jp.sf.jetplume.portlets.filter.FilterPortlet</portlet-class> > <init-param> > <name>portlet-class</name> > <value>jp.sf.jetplume.portlets.helloworld.HelloWorldPortlet</value> > </init-param> > <init-param> > <name>portlet-filters</name> > > <value>jp.sf.jetplume.portlets.helloworld.filter.HelloWorldPortletFilter</value> > </init-param> > <expiration-cache>-1</expiration-cache> > <supports> > <mime-type>text/html</mime-type> > <portlet-mode>VIEW</portlet-mode> > </supports> > <supported-locale>en</supported-locale> > <supported-locale>ja</supported-locale> > > <resource-bundle>jp.sf.jetplume.portlets.helloworld.resources.HelloWorldResources</resource-bundle> > <portlet-info> > <title>Filtered Hello World</title> > <short-title>This is a filtered portlet for testing</short-title> > <keywords>Hello,Test,PortletFilter</keywords> > </portlet-info> > </portlet> > </portlet-app> > Sample Files: > http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/jetplume/jetplume/portlets/helloworld/src/webapp/WEB-INF/portlet.xml?rev=1.2&content-type=text/vnd.viewcvs-markup > http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/jetplume/jetplume/portlets/helloworld/src/java/jp/sf/jetplume/portlets/helloworld/filter/HelloWorldPortletFilter.java?rev=1.1&content-type=text/vnd.viewcvs-markup -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
