Portalizing Domino Applications for Websphere Portal
| < Day Day Up > |
|
4.7 Integration via people awareness
This integration technique will add value to your portlets by exploiting the people awareness services provided by WebSphere Portal. This integration technique adds real-time collaboration among the people involved in the application.
4.7.1 People awareness
If you extend the portal to offer people awareness features, portal users will see references to people in collaborative portlets. These references to individuals and groups are links that let portal users see and contact others with whom they might want to work. Wherever people links appear, portal users can display a menu of actions for contacting and working with the individuals and groups named by the link. If you have enabled Lotus Sametime to work with the portal, people links include the online status indicator that shows whether a person is active, away, offline, or in a Do Not Disturb state.
People links
When portal users click the name of (or the icon for) a person or group, a menu appears that provides actions linking them to other portal users. The actions that are visible on people link menus depend on the following factors:
-
Whether Lotus companion products for advanced collaboration are installed and enabled to work with your portal (for example, Lotus Sametime and Lotus Discovery Server).
-
The online status (Active, Away, Do Not Disturb, Offline) of the person or group.
-
Whether the link applies to an individual person or to a public group.
The complete set of actions that users might see from people links depends on which Lotus companion products for advanced collaboration are installed and enabled to work with the portal.
-
See a person's online status
Appearing only if Lotus Sametime is enabled, the Sametime status icon indicates whether a person is active, away, offline, or does not want to be disturbed.
-
Chat
Appearing only if Lotus Sametime is enabled, this action is not available if the person is offline.
-
Send E-mail
-
Show Profile
Appearing only if Lotus Discovery Server is enabled, this action displays the person's profile of business card information, contact information, affinities, current job, and background.
-
Find Documents Authored By
Appearing only if Lotus Discovery Server is enabled, this action launches Knowledge Map Search of all documents that the person has authored.
-
Add to Sametime List
Appearing only if Lotus Sametime is enabled, this action displays a window in which you can add the person to your Sametime List, either as an individual entry or as a member of a new or existing personal group.
Online presence
If you have enabled Lotus Sametime to work with the portal, portal users can see each other's online presence in their person links according to the status options they have set in their Sametime client:
-
I am active.
-
I am away or not using the computer now.
-
Do not disturb me.
-
I am offline.
Tip | Portal users can select Options → Preferences → Status in their Sametime Connect clients to customize the messages that appear for each online state and to control the period of time in which keyboard or mouse inactivity automatically switches their status from Active to Away. |
In this section we describe how to use this integration technique to add some of the collaborative services included with WebSphere Portal. Before we begin, we first review what the Collaborative Components are.
Collaborative Components
Collaborative Components or Collaborative Services are a set of JSP tags and Java objects that enable the inclusion of Lotus collaborative functionality to new or existing portlets.
These components allow the seamless interaction of the Lotus family of products with the Java-based portlets that run on WebSphere Portal. These methods of interaction do not replace the product-specific APIs, but facilitate the integration of such products within the portal infrastructure.
The Collaborative Components provide standardized access to applications, through an easy to use API that is optimized for a collaborative portal, and a consistent security model across all Lotus Software family of products.
This API is written in Java and isn't platform-specific, so it provides a multiplatform solution, with no dependence on UI-specific implementation. Therefore, these components are very useful tools for writing pervasive portlets.
The services are the following:
-
Infrastructure objects
-
CSEnvironment
-
CSCredentials
-
CSFactory
-
-
Java Service objects
-
CSBaseService. This service is the base class for the other Java Service objects.
-
DominoService
-
QuickplaceService
-
PeopleService
-
DiscoveryServerService
-
-
JSP custom tags
-
People tags
-
Menu tags
-
Further information on usage and services is available from the WebSphere Portal Infocenter.
Note | The Lotus Notes productivity portlets that are installed with Portal are not implemented with the DominoService object. Therefore, do not refer to those portlets as examples. Instead, refer to the samples that are installed with the Collaborative Components enterprise application (cs.ear). |
The Java Collaboration Components API is explained in the next chapter because it requires further Java knowledge. For now, our discussion concentrates on the People tags components, which work with JSP Tag libraries.
PeopleService tags
The PeopleService tag library contains the following necessary tags:
people
-
Displays person menu links according to the following factors:
-
Portlet context (that is, where the portlet resides)
-
The permission level of the specified user
-
The Lotus Software products for advanced collaboration that are installed and enabled in the portal environment.
-
-
Added to a person's name string returned by the PeopleService object, the person tag generates the HTML that renders the person link menu that provides the following basic action for collaborating with the named person:
-
Send e-mail
-
-
If Sametime is installed and enabled to work with the Portal, then the person tag also provides online status for the person link and the following additional actions on the person menu:
-
Chat
-
Share
-
Available tools
-
Add to Sametime List
-
-
If Discovery Server is installed and enabled to work with the Portal, then the person tag provides the following additional actions on the person menu:
-
Show expertise profile
-
Find documents authored by
-
peopleinit
-
Determines whether Sametime or Discovery Server, or both, are enabled to work with a portal and generates the correct HTML and JavaScript for initializing Sametime or enabling Discovery Server, or both. Establishes the server connections between the Portal, the Sametime server, and the Discovery Server, and provides automatic log-in to all servers.
Both the people and peopleinit tags generate HTML and require Java and JavaScript on the client that are compatible with the WebSphere Portal.
4.7.2 Implementation of the technique
Now that your portlets are Click to Action enabled, the next step is to implement people awareness by including one the PeopleService tags which is available on WebSphere Portal. People awareness services are available at the JSP level and are incredibly easy to use.
The enablement consists basically of two steps on each JSP you want to enable:
-
Insert a JSP taglib directive on the JSP.
-
Place the people tag around the names in the JSP of which you want to be aware.
Enabling the CustomerList portlet
The CustomerList portlet consists only of one JSP file. Follow these steps to enable the portlet:
-
Open the /jsp/CustomerList/View.jsp file.
-
Copy the following line at the beginning of the file:
<%@ taglib uri="/WEB-INF/tld/people.tld" prefix="peopleservice" %>
-
In the JSP file, in the results file of the display table, insert in the third column, surrounding the <Domino:viewitem col="3"/> tag, the peopleservice tags as follows:
<peopleservice:person><Domino:viewitem col="3"/></peopleservice:person>
Important: Be careful when inserting the peopleservice tags: do not include a line break or space between the tags and the name.
-
Save and close the View.jsp file.
Note You can ignore the errors displayed in the tasks view since they will find the reference once deployed on the WebSphere Portal.
Enabling the CustomerDetails portlet
The CustomerDetails portlet is composed of two JSPs. The View.jsp file doesn't display any names, so you do not need to enable people awareness on this file. The CustomerDetails.jsp file displays people names, so you need to enable this JSP.
-
Open the /jsp/CustomerDetails/CustomerDetails.jsp file.
-
Copy the following line at the beginning of the file:
<%@ taglib uri="/WEB-INF/tld/people.tld" prefix="peopleservice" %>
-
In the JSP file on the results table there is a row called Account Owner. Enable this field by including the following peopleservice tags:
<peopleservice:person><Domino:item name="ownerName"/></peopleservice:person>
Important: Be careful when inserting the peopleservice tags: do not include a line break or space between the tags and the name.
-
Save and close the CustomerDetails.jsp file.
Note You can ignore the errors displayed in the tasks view since they will find the reference once deployed on the WebSphere Portal.
Enabling the CustomerContacts portlet
The CustomerContacts portlet is composed of two JSPs. The View.jsp file doesn't display any names, so there is no need to enable people awareness in this file. The CustomerContacts.jsp file displays people names, so you need to enable this JSP using the following steps:
-
Open the /jsp/CustomerContacts/CustomerContacts.jsp file.
-
Copy the following line at the beginning of the file:
<%@ taglib uri="/WEB-INF/tld/people.tld" prefix="peopleservice" %>
-
In the JSP file on the results table there is a column called Contact Name.Enable this field by including the peopleservice tags as follows:
<peopleservice:person><Domino:viewitem col="2"/></peopleservice:person>
Important: Be careful when inserting the peopleservice tags: do not include a line break or space between the tags and the name.
-
Save and close the CustomerContacts.jsp file.
Note You can ignore the errors displayed in the tasks view since they will find the reference once deployed on the WebSphere Portal.
Enabling our CustomerSalesActivities portlet
The CustomerSalesActivities portlet is composed of two JSPs. The View.jsp file doesn't display any names, so there is no need to enable people awareness in this file. The CustomerSalesActivities.jsp file displays people names, so you need to enable this JSP using the following steps:
-
Open the /jsp/CustomerSalesActivity/CustomerSalesActivities.jsp file.
-
Copy the following line at the beginning of the file
<%@ taglib uri="/WEB-INF/tld/people.tld" prefix="peopleservice" %>
-
In the JSP file on the results table there are two columns called Sales Person and Contact Name. Enable these fields by including the peopleservice tags as follows:
... <peopleservice:person><Domino:viewitem col="4"/></peopleservice:person> </td> <td> <peopleservice:person><Domino:viewitem col="5"/></peopleservice:person> ...
Important: Be careful when inserting the peopleservice tags: do not include a line break or space between the tags and the name.
-
Save and close the CustomerSalesActivities.jsp file.
Note You can ignore the errors displayed in the tasks view since they will find the reference once deployed on the WebSphere Portal.
All of your portlets are now enabled, and they can be deployed in the WebSphere Portal just as you did previously. You should see your portlets working as shown in Figure 4-41.
| < Day Day Up > |
|