Hi all, I have proposed the portlet filter to Jetspeed2. But I would like to move it to portal-bridges. Because this portlet filter does not depends on Jetspeed(or other portals) and the primary reason is I would like to use it on MyFaces Tomahark until the next portlet spec defines it. Currently I'm working on MYFACES-434 with Stan Silvert, and we want to use it as an independent stuff from portal. So, I'm thinking that portal-bridges is the right place. If you have any idea, please let me know.
http://issues.apache.org/jira/browse/MYFACES-434 Any comments/suggestions are highly appreciated. Regards, shinsuke -------- Original Message -------- Subject: [jira] Created: (JS2-380) Implements Portlet Filter Date: Sat, 15 Oct 2005 00:56:45 +0200 (CEST) From: Shinsuke SUGAYA (JIRA) <[email protected]> Reply-To: Jetspeed Developers List <[email protected]> To: [email protected] Implements Portlet Filter ------------------------- Key: JS2-380 URL: http://issues.apache.org/jira/browse/JS2-380 Project: Jetspeed 2 Type: New Feature Components: Demo Portlets Versions: 2.0-dev/cvs Environment: J2SE 1.4 Reporter: Shinsuke SUGAYA Assigned to: Shinsuke SUGAYA Fix For: 2.0-dev/cvs 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] -------------------------------------- Know more about Breast Cancer http://pr.mail.yahoo.co.jp/pinkribbon/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
