Skip to main content

skip to main content

developerWorks  >  Lotus  >

Exploring the application development options for IBM Lotus Workplace 2.0

developerWorks
Document options

Document options requiring JavaScript are not displayed


Learn and share!

Exchange know-how with your peers -- try our new Pass It Along beta app


Rate this page

Help us improve this content


Level: Introductory

Rohit Sahasrabudhe (sahas@us.ibm.com), e-business Architect, IBM

29 Nov 2004

Learn about your customization options with the Lotus Workplace Products API Toolkit, which provides you with public APIs and SPIs for Lotus Workplace Messaging and instant messaging, JSP tags, and Collaborative Application Component Interfaces. And take a quick tour of Workplace Builder.

When release 1.1 of the Lotus Workplace products shipped at the end of 2003, IBM provided most of the collaborative functionality that Lotus is known for, including messaging, Web conferencing, instant messaging, on-line learning, and more. You can customize Lotus Workplace to meet the needs of your organization or to meet the needs of your users. With release 2.0 of the Lotus Workplace products, IBM has introduced the IBM Lotus Workplace Products API Toolkit so that you can further customize your Lotus Workplace. The Lotus Workplace Products API Toolkit represents a significant evolution in the Lotus Workplace products. It lets you create components and use JSP tags that add collaboration to your existing J2EE applications. With the help of the toolkit, you can take advantage of the collaborative functionality that Lotus is famous for to build standards-based J2EE applications.

In this article, we explore the application development options available for developers in the Lotus Workplace 2.0 product family. The Lotus Workplace Product API Toolkit 1.0 provides extensions to the Lotus Workplace system. Lotus Workplace 2.0 also introduces an innovative, Web-based tool called Workplace Builder that you can use to create templates (more about Workplace Builder and templates later in this article). This article is intended for application developers who want to know more about the development capabilities of the Lotus Workplace 2.0 products. Java programming experience and WebSphere Portal development experience are a plus, but are not required.

Let?s first take a look at what IBM Lotus Workplace is all about. There are resources that explain the Lotus Workplace architecture in detail, but in this article, we want to give you an overview of the underlying architecture as a basis for understanding the application development options.

IBM Lotus Workplace overview

IBM Lotus Workplace is an integrated family of collaborative products that includes Lotus Workplace Messaging, Lotus Workplace Team Collaboration, Lotus Workplace Collaborative Learning, and Lotus Workplace Documents. A server-managed client known as IBM Workplace Client Technology delivers Lotus Workplace Messaging and Lotus Workplace Documents capability to different types of users in a secure, dynamic work environment.

Lotus Workplace employs a standards-based platform delivered on a stack of components starting with the WebSphere Applications Server. On top of the base WebSphere Application Server, the integration capabilities are provided by WebSphere Portal. Essentially, the Lotus Workplace family of products is a combination of infrastructure components along with the user-facing portlets that run on top of WebSphere Portal. To learn more about portlets and WebSphere Portal, refer to the Resources section of this article.

As far as application development options go, Lotus Workplace developers can expect extensions at the infrastructure level and at the user interface. The infrastructure is primarily built using EJBs; the first release of the toolkit provides some hooks into this layer. The next release of the toolkit will have a more in-depth integration with the infrastructure by giving developers access to the Service tier. On the user interface side, the toolkit provides two JSP tags to further integrate into the Lotus Workplace environment. At the same time, there are two Service Provider Interfaces (SPIs) that give access to the system extensions, such as mail and instant messaging.

Let's take a quick look at the four major parts of the first release of the toolkit. We will explore them in detail later in this article. The first release of the public APIs (Application Programming Interfaces) and SPIs (Service Provider Interfaces) include:

  • IBM Lotus Workplace Mail Messaging SPI
    Allows you to intercept mail messaging flowing in and out of the system.
  • IBM Lotus Workplace Instant Messaging SPI
    Allows you to capture the instant messages flowing through the system.
  • Two JSP Tag
    Allows you to add awareness to your JSPs.
  • The Collaborative Application Component Interface (CACI)
    Allows you to build your own business components (defined in the next section).



Back to top


Introduction to the Lotus Workplace Products API Toolkit 1.0

The Lotus Workplace Products API Toolkit is designed for developers who want to extend the Lotus Workplace platform with new portlets or business components. The toolkit does this by providing a number of public APIs and SPIs in Java. The Lotus Workplace public APIs also supplement the public APIs provided by the underlying WebSphere Application Server and WebSphere Portal platforms (not included in this toolkit). Check the Resources section for further information on these underlying platforms.

The goal of the Lotus Workplace Products API Toolkit is to allow you to build business components, portlets, and other components using the J2EE programming model. Lotus Workplace business components can be thought of as mini-applications. The components provide some business functionality, but not necessarily a complete application. For example, an Inbox and address book are examples of business components. But combining a few business components, such as the Inbox and address book, with a mail infrastructure gives us a mail application.

You can use the Lotus Workplace Products API Toolkit in conjunction with a J2EE development environment, such as WebSphere Studio Application Developer. The toolkit includes documentation on how to use WebSphere Studio Application Developer to build the sample code provided with the toolkit. Tutorials will be available in the near future to give you a more step-by-step look at these samples.

Let's look at the public APIs and SPIs in more detail. The SPIs provide hooks into the Lotus Workplace Extension services, namely the mail and instant messaging extensions in the first release.

IBM Lotus Workplace Mail Messaging SPI

The IBM Lotus Workplace Mail Messaging SPI provides you with extensions to the Lotus Workplace Messaging mail service. These mail service extensions take the form of Java classes that conform to either of two specific interfaces referred to as handlers and deliverers. This Java SPI lets you build email message handlers that intercept mail messages before delivery and optionally redirect them or modify message content. Message handlers can perform virus scanning, active content filtering, spam filtering, or any other desired filtering operations. The sample provided with the toolkit shows how to build a simple virus scanning application.

NOTE: The sample shows how to extract the mail message to pass it on to a virus scanning application that is not part of the sample.

A handler extension can examine the envelope and content of any message that passes through the mail service. A handler can then modify the contents of the message by adding or removing data. It can also reject mail, so it will not be delivered. A deliverer extension can modify which folder a message is delivered to. All handler and deliverer extensions are made known to the Lotus Workplace Messaging server by entries in the Lotus Workplace Messaging property file workplace.properties.

These Java classes, along with the mail processing interfaces, are also described in the Javadoc provided with the toolkit.

IBM Lotus Workplace Instant Messaging SPI

The IBM Lotus Workplace Instant Messaging SPI is used to build instant messaging handlers that intercept instant messages before they are delivered to recipients. You can use this Java SPI to block or modify instant messages in Lotus Workplace Team Collaboration 2.0. The most common use of the SPI is chat logging, but you can also use the SPI to perform other tasks, such as message translation. You can deploy applications that use the SPI as servlets on WebSphere Portal. The sample provided with the toolkit contains details on how a simple chat logging application can be built using this SPI.

The Instant Messaging SPI is part of the presence awareness and instant messaging services of Lotus Workplace Team Collaboration 2.0. The SPI is reachable via a servlet installed on WebSphere Portal, one of the three servers that are part of Lotus Workplace 2.0.

The Instant Messaging SPI includes the following classes:

  • MessagingListener
    This interface receives events for each message going through the Session Initiation Protocol (SIP) server.
  • MessagingService
    This interface is used to manage all MessagingListener instances.
  • MessagingServiceFactory
    This class is used to get an instance of a MessagingService object.
  • Contact
    This class represents a SIP contact. It is used to examine the contacts to which messages are being sent.



Back to top


The Lotus Workplace JSP tags

Along with the APIs and SPIs provided by the toolkit, there are two Java Server Pages (JSP) tags. These tags for Lotus Workplace are one type of component that allows you to add collaborative capabilities to your portlets for Lotus Workplace. For this release of the toolkit, the following custom JSP tags are available. The toolkit includes documentation only for the JSP tags, which are included with Lotus Workplace.

Person tag

This tag is used for adding presence awareness in your application. The Person tag provides contextual collaboration functionality related to a named person. You can use the tag to generate a link menu of collaborative actions, such as sending email, initiating a chat, showing the Person Record, and so on. Simply put, it gives the ability to turn a person's name as plain text into a "live name." After adding the Person tag to a static text that represents a person's name, the client can click the link for further options to communicate with the person. Of course, for the person's name to become a live name, that person has to be connected to the Instant Messaging server using some sort of client. If the person is off-line, then the name appears as plain static text. This tag provides a simple, but powerful capability.

Figure 1 shows the communication options available when you click on a live name.


Figure 1. Communication options available with the Person tag
Communication options available with the Person tag

WebSphere Portal originally introduced the Person tag to allow you to add live names within WebSphere Portal if the person is connected to the IBM Lotus Instant Messaging and Web Conferencing (Sametime) server. The Person tag shipped with Lotus Workplace is capable of connecting to the Instant Messaging server provided on top of Lotus Workplace. In order for an administrator to allow users from the IBM Lotus Instant Messaging and Web Conferencing (Sametime) server to be available in Lotus Workplace via the Person tag, the administrator needs the Lotus Instant Messaging Gateway, which allows Lotus Instant Messaging and Web Conferencing and Lotus Workplace users to communicate via instant messaging.

The documentation provided with the toolkit focuses on the specific changes made to this tag for working with Lotus Workplace 2.0. For more complete information on the Person tag and how it works, refer to the documentation provided in the IBM WebSphere Portal InfoCenter.

Online Center tag

The Online Center tag is required to provide presence awareness. It is already embedded at the top of the page in the Lotus Workplace theme, but if you create a portlet in a pop-up window, you need this tag to provide presence awareness on the page. The Person tag does not provide awareness in pop-up windows unless the Online Center tag is used. The Person tag has the ability to check whether or not the user is logged into the Instant Messaging server, but it does not connect to the Instant Messaging server. The Online Center tag initiates the connection to the Instant Messaging server and populates login information in the CSEnvironment objects. (These objects are part of the Collaborative Services provided with the original release of the Person tag in WebSphere Portal.) The Person tag basically checks the user's login status with the CSEnvironment objects. From the Online Center, you can change your on-line status: available, away, and do not disturb. Use these JSP tags to incorporate people and presence awareness into your portlets.

Figure 2 shows an example of the on-line status options.


Figure 2. Status options available with the Online Center tag
Status options available with the Online Center tag


Back to top


Collaborative Application Component Interfaces

The Collaborative Application Component Interfaces (CACI) enable you to build business components that integrate with the Lotus Workplace collaborative infrastructure. These Java interfaces are used by Lotus Workplace to interact with your components. You implement these interfaces in your collaborative application component stateless session EJB. The Lotus Workplace Products API Toolkit includes a sample business component with a collaborative application component EJB implementing the Collaborative Application Component Interfaces.

The Collaborative Application Component Interfaces let Lotus Workplace manage the following component aspects:

  • Lifecycle
    Used to notify your component when the containing application is created or destroyed, or when the component is added or removed from a template. Allows the component to create and destroy any resources needed while the application is running.
  • Membership
    Used to notify your component when members are added to or removed from community roles. Allows the component to grant or revoke member access to resources that it manages.
  • Templatable
    Used to get information that allows your component to be used in the application template, including parameters that must be specified when the user creates a new application containing the component.
  • Sensor
    Used to get information about resources managed by component, for example, disk space usage. This information is used, for example, to enforce Lotus Workplace application quotas.
  • Transactional
    Used to determine whether or not your component's Lifecycle and Membership methods support global transactions.

None of these interfaces is required to build a Lotus Workplace application component -- only use the ones you need.



Back to top


Lotus Workplace Builder

IBM Lotus Workplace Team Collaboration includes Workplace Builder, an application assembly tool intended, not for application developers, but for business analysts, application managers, and designers, otherwise known as line-of-business users. Those who know business models and processes can use Workplace Builder to create collaborative components and forms for Lotus Workplace without any application development experience.

Using Workplace Builder, line-of-business users can create and manage templates for Lotus Workplace applications and forms. From these templates, users can create applications, and new applications can be saved as templates for component reuse. The Workplace Template Library provides several standard application templates that ship with Lotus Workplace Team Collaboation, including discussion forum, chat room, document library, and more. Users can customize the standard templates to meet their needs or create new templates.


Figure 3. Workplace Template Library
Workplace Template Library

Form viewers on the pages of a Lotus Workplace application let application users edit and submit forms. Workplace Builder provides the following components:

  • Workplace Template Library
    Displays the list of templates that Template Editors, including Template Owners, can view and work with. (See figure 3.)
  • Template editor
    Displays a set of portlets for maintaining templates for Lotus Workplace applications: properties, parameters, pages and layout, and roles.
  • Application editor
    Displays a set of portlets for maintaining a particular Lotus Workplace application: properties, pages and layout, and roles.
  • Form Template Library
    Displays the list of templates for forms that Lotus Workplace managers can view and work with.

NOTE: Lotus Workplace forms, including the Form Template Library and the Form Viewer portlet, are provided as a technical preview in the Lotus Workplace 2.0 release.

To learn more about how to use Workplace Builder, try the developerWorks tutorial, "Customize Lotus Workplace: Using the Workplace Builder."

Back to top


Summary

This article provides introductory information on some application development options available with the Lotus Workplace 2.0 product family. There are tutorials in the works by the author, which will take you step-by-step through some of the APIs and SPIs as part of the Lotus Workplace Products API Toolkit 1.0. There are also a full two days of hands-on workshops being delivered in the IBM Innovation Centers worldwide that provide further details on application development with Lotus Workplace 2.0.



Resources



About the author

Rohit Sahasrabudhe is an e-business Architect for IBM Developer Relations Technical Consulting in Austin, Texas. Rohit is an IBM Certified for e-business Solution Designer, a Solution Technologist, and a Red Hat Certified Engineer. He holds a BS from the University of Louisville in Engineering in Math and Computer Science. He did three co-ops, including one in Germany, before joining IBM in 2000. He joined IBM as a Software Engineer, working on Lotus Domino Solutions. He is always working on improving his WebSphere skills and is looking forward to traveling around the world, consulting, and teaching courses. You can contact Rohit at sahas@us.ibm.com.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top