WDK Portlets Michael Roth
Date 6/19/2007
Copyright © 2006-2007 EMC Corporation. All rights reserved. EMC believes the information in this publication is accurate as of its publication date. The information is subject to change without notice. THE INFORMATION IN THIS PUBLICATION IS PROVIDED “AS IS.” EMC CORPORATION MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Use, copying, and distribution of any EMC software described in this publication requires an applicable software license. EMC2, EMC, and EMC Documentum product names are trademarks of EMC Corporation. All other trademarks used herein are the property of their respective owners. All other brand names are trademarks or registered trademarks of their respective owners.
WDK Portlets
2
Table of Contents Overview.............................................................................................................. 4 An Introduction to Portals and Portlets ........................................................................................ 4 What is JSR 168? ........................................................................................................................ 4 WDK for Portlets .......................................................................................................................... 5
Working with WDK for Portlets.......................................................................... 5 Out of the Box Portlets................................................................................................................. 5 Creating a Portlet ......................................................................................................................... 5 Refreshing Data in a Portlet ..................................................................................................... 6 Adding Help .............................................................................................................................. 6 Authentication .............................................................................................................................. 6 Manual (Docbase) Authentication / Saved Credentials Authentication.................................... 6 User Principal Authentication ................................................................................................... 6 Ticketed Login .......................................................................................................................... 7 Single Sign On (SSO) .............................................................................................................. 7 Skip Authentication................................................................................................................... 7
Integrating with Various Portal Servers............................................................ 7 Troubleshooting and Miscellaneous Issues..................................................... 8 Tracing ......................................................................................................................................... 8 Support Issues ............................................................................ Error! Bookmark not defined. Specifying Component Options in a URL................................................................................. 8
Additional Resources ......................................................................................... 9
WDK Portlets
3
Overview An Introduction to Portals and Portlets A portal is a way to overcome the limitation of having to access a specific web site or web application one at a time. It allows for developers to present multiple sources of information and applications from a single web location to the user in a simple format unified format. For example, consider the image below
Here we can see several different sources of information/applications being presented to the user, including an RSS Feed, stock quotes and a search widget to search Yahoo! The user is presented a single point of access for a number of different applications – each which is presented in its own windows or Portlet. A Portlet is a self contained pluggable component which generates HTML fragments which are then displayed in the portal server.
What is JSR 168? The Sun Java Specification Request (JSR) 168 is a standard to help promote portability of portlets between various portal server implementations. This is becoming increasingly important given the increasing acceptance of the Web Services for Remote Portals (WSRP) protocol which allows for access to portlet funtionalities using Web Services. The specification defines a set of APIs for portlets and standardizes the following: • Portlet interface • Portlet configuration • Preferences • User information retrieval (user information persistence is portal-specific)
WDK Portlets
4
WDK for Portlets WDK for Portlets is an extension of the exiting WDK and Webcomponent framework where specific support for JSR 168 containers (portal servers) has been added. The eventual goal is to be able to deploy WDK for Portlets in any JSR 168 container, including ones that are not supported by the installer at the moment such as Plumtree and JBoss. WDK for Portlets should provide the same functionality as the WDK product does and will allow components developer for Webtop or WDK to be deployed as portlets with a minimal amount of additional work. In addition, support for portal specific environments is added so that themes, user preferences and authentication is accessible in a transparent manner. Components which are to be deployed as portlets will have a corresponding .portlet file (under /portlets in the application) as well as a entry in the file /WEB-INF/portlets.xml as per the JSR 168 sepecification.
Working with WDK for Portlets Out of the Box Portlets WDK for Portlets provide a number of components that have been wrapped as portlets out of the box which can be used immediately in a portal application. These portlets are: • • • • • • • • • • •
Cabinets Categories Home Cabinet Inbox Login My Rooms Recent Files Search Advanced Search Subscriptions Workflows
The Login portlet will normally not be used directly when deploying a portal but is used by the other portlets to authenticate the user to the content server if needed (see below).
Creating a Portlet Documentum portlets use a single portlet class, com.documentum.web.env.jsr168.DocumentumComponent which extends javax.portlet.GenericPortlet. This class will launch the component that you specify for the portlet as the value of the view mode in portlet.xml and will also provide access to preferences and help for the component using the preferences and help mode values in portlet.xml. When defining a portlet it is important to note that all of the WDK components will define the above class the implementation class. No further portlet specific coding should be needed in order to have a component rendered as a portlet. In order to have the component render properly in a portlet environment as well as in a standard WDK/Webtop one, the standard , and