42
IBM Software, WPLC May 3, 2006 © 2006 IBM Corporation IBM Lotus Sametime Connect 7.5 Integration Guide TechTalk Dan Kehn Lori Ott

IBM Lotus Sametime Connect 7.5 Integration Guide TechTalk

  • Upload
    zoltin

  • View
    63

  • Download
    1

Embed Size (px)

DESCRIPTION

IBM Lotus Sametime Connect 7.5 Integration Guide TechTalk. Dan Kehn Lori Ott. Today’s Agenda. Overview of Sametime Connect 7.5 Sametime Connect Demonstration Sametime Connect and Eclipse Sametime Connect 7.5 Architecture Review of Sample Plug-ins’ Implementation. - PowerPoint PPT Presentation

Citation preview

IBM Software, WPLC

May 3, 2006 © 2006 IBM Corporation

IBM Lotus Sametime Connect 7.5Integration Guide TechTalk

Dan KehnLori Ott

2

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Today’s Agenda

Overview of Sametime Connect 7.5

Sametime Connect Demonstration

Sametime Connect and Eclipse

Sametime Connect 7.5 Architecture

Review of Sample Plug-ins’ Implementation

3

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Sametime 7.5The next generation of real time collaboration

Breakthrough IM client– New look and feel – rich text, emoticons, spell check, etc.

– Customizable branding*

Improved Web Conferencing– Easy to get into meetings

– Updated UI

Advanced Organizational Collaboration– Instant polls

– Reach out to a community of experts

Extensible client based on Eclipse– IBM and 3rd party plug-ins such as VOIP, Location Awareness, LDAP, etc.

* Beta does not include branding; it is planned for GA

4

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Unified Instant Messaging

Sametime Connect 7.5 is the first release of the new unified instant messaging (UIM) client

All managed client products use the same Eclipse-based WebSphere Everyplace Deployment (WED) platform

UIM is a set of common instant messaging and presence client components for IBM managed client products, including Hannover and Workplace Managed Client (WMC)

5

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Extending Sametime Connect 7.5

Sametime Connect 7.5 is built on Eclipse.

Integration Guide includes practical end-user extensions to demonstrate how the product can be enhanced by third parties using plug-ins.

Extensions allow seamless integration into the Sametime Connect 7.5 client user interface.

6

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Adding UI Extensions (Main Window)

Branding Areas

Live Names Telephony

Action Bar

Actions Menu

"Mini apps"Status Bar

7

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Adding UI Extensions (Chat Window)

Message Toolbar

Branding Area

Action Bar

Actions Menu

Telephony

Status BarBranding Area

8

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Sametime Connect 7.5 Demonstration

9

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

What is Eclipse?

Sametime Connect client is composed of Eclipse plug-ins Wait… Isn’t Eclipse an IDE?

– Yes, but it is also a rich client application development platform

– Architected with extensibility as one of the primary objectives

– Plug-ins are the base functional unit (declarations + code)

– Plug-ins define “extension points” where other plug-ins can contribute (e.g., menu items, services)

Plug-ins can define extension points to allow other plug-ins to extend their functionality

– Sametime plug-in extension points are documented in the Sametime Client Toolkit Extend the Sametime client by creating your own plug-ins that leverage the

Sametime plug-in extension points– Your plug-ins can access any services exposed by Sametime and the underlying platforms

(RTC API, Sametime Java API, WED, Eclipse, Java RTE)

– Your plug-ins register listeners for events that they need to handle

– Your plug-ins can define extension points for other plug-ins to use See eclipse.org and jdg2e.com for more information

10

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Why the Extensible Client Model?

Plug-ins allow IBM, partner, and customer extensions– LDAP, softphone, video, etc

– Advanced plug-ins (LDAP, Locations, Calendar look up…)

ISV Enablement team working with partners to “jumpstart” adoption of Sametime 7.5

– Managed beta partners (technical account manager / TAM)

– Open beta partners (forum and e-mail support)

– Integration Guide includes “reusable” examples that ISVs can adapt to their needs.

11

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Examples of UI Extension Points*

Extend menus and toolbars in other windows (chat history viewer, n-way chat, etc.)

Extend Preferences UI using standard Eclipse API

Branding of colors, fonts, icons (coming soon)

Add plug-in actions to system tray menu

* Beta does not include all the extensions planned for GA

12

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Sametime 7.5 Client Architecture (Eclipse base)

Eclipse 3.2 RCP

Platform Runtime

SWT JFace PerspectivesHelpWorkbench

Sametime Platform

Sametime Platform

13

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

MessagingServices

RTSession

Buddy List Storage

Directory Privacy Policy

SIP Stack * Third-Party Protocols *

UIM Client Architecture

Java 1.4.2 Runtime Environment (J9 jclMax) (Sametime 7.5)

Eclipse 3.2 RCP

Credential Store/SSO

Pre-Authenticated Browser

Embedded Browser

Network Sensing

Localization Spell CheckerUser Interface Components

...

Sametime Java API

Community ServicesChat

StorageTelephony

Alert Storage

User Info

User Interface Components

WED 6.1 (WebSphere Everyplace Deployment)

Login Chat PresenceReal-Time Sessions

NotificationOther Tools

RTC (Real-Time Collaboration) API

OS-Specific Services

Quick Find

Storage Service

Service and Plug-in

Registry

Location Service

Policy Service

* SIP and third-party protocols not supported in Sametime 7.5

Capabilities

ST Connect Framework

14

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Sample Plug-ins

Quick Response*

Recent Buddies*

Buddy Note**

Acronym Expander

Snippets

* Sample plug-ins that will be presented today

15

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Quick Response Plug-in

What it does for the user: – Provides one-click button to answer common questions

What it demonstrates for the programmer:– Chat window integration using pop-up add-on

– Adding chat toolbar action

16

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Quick Response UI

Clicking this button

opens the Quick Response pop-up add on

Clicking this drop-down

opens the Quick Response menu pulldown

17

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Manifest-Version: 1.0

Bundle-ManifestVersion: 2

Bundle-Name: Quick Response Plug-in

Bundle-SymbolicName: com.ibm.collaboration.realtime.sample.quickresponse;singleton:=true

Bundle-Version: 1.0.2

Bundle-Activator: com.ibm.collaboration.realtime.sample.quickresponse.QuickResponsePlugin

Bundle-Vendor: IBM

Bundle-Localization: plugin

Require-Bundle: org.eclipse.ui,

org.eclipse.core.runtime,

com.ibm.collaboration.realtime.imhub,

com.ibm.collaboration.realtime.chatwindow,

com.ibm.collaboration.realtime.ui,

com.ibm.collaboration.realtime.messages,

Eclipse-LazyStart: true

Quick Response Manifest

The Quick Response manifest file

required Eclipse plug-ins

Required Sametime 7.5 plug-ins

18

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Quick Response Plug-in Extension Classes

Plug-in Purpose QrPopupAddOn Introduces UI element

Gives list of responses and listens for what choice was selected

QrOpenPopupAddOnAction Adds the action to the existing general actions in the toolbar as a drop-down menu

QuickResponsePreferencePage Preference page for adding, removing, and editing quick responses.

19

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Quick Response Plug-in Extension Manifest

Quick Response plugin.xml– Declares two Sametime-specific extension points

– com.ibm.collaboration.realtime.chatwindow.popupAddOn– com.ibm.collaboration.realtime.chatwindow.chatAction

<extension

point="com.ibm.collaboration.realtime.chatwindow.popupAddOn">

<popupAddOn

class=“…sample.quickresponse.QrPopupAddOn"

id=“…sample.quickresponse"

name="Quick Response"/>

</extension>

20

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Quick Response Plug-in Extension Manifest (cont’d)

The following lines of code show the plugin.xml file.…

<extension point="com.ibm.collaboration.realtime.chatwindow.chatAction"> <chatAction class=“…sample.quickresponse.QrOpenPopupAddOnAction" displayName="Quick Response" id=“…realtime.sample.quickresponse.openquickresponse" image="images/quickresponse.png" path="format/end" showsFor="both" tooltipText="Quick Response" type="format"/> </extension>

21

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

QrPopupAddon composite

The following code creates the pop-up add on:

public class QrPopupAddOn implements IPopupAddOn {

private ImChatWindowHandler wndHandler = null; List listResponses;

public QrPopupAddOn() { super(); } void addItems() { ArrayList elems = QuickResponsePlugin.getDefault().loadResponses(); for (int i = 0; i < elems.size(); i++) listResponses.add((String) elems.get(i)); listResponses.add(QuickResponsePlugin.ADD_NEW_RESPONSE_MSG); }

public Composite createControl(ImChatWindowHandler handler, Composite parent) { wndHandler = handler; Composite comp = new Composite(parent, SWT.NONE); comp.setLayout(new FillLayout()); listResponses = new List(comp, SWT.SINGLE …); addItems(); listResponses.addSelectionListener(...); ...

return comp; } public int getInitialSize() { return PREFERRED_HEIGHT; }}

IPopupAddon

public interface IPopupAddOn { public Composite createControl (ImChatWindowHandler, Composite); public int getInitialSize();}

22

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

QrOpenPopupAddOn action

The following code adds content to the pop-up window

public class QrOpenPopupAddOnAction extends ImChatWindowAction { public QrOpenPopupAddOnAction() { super(IAction.AS_DROP_DOWN_MENU); }

public void run() { ImChatWindowHandler handler = getChatWindowHandler();

if (handler.isPopupShowing()) { handler.hidePopupMessageArea(); } else { handler.createPopupMessageArea(…, QrPopupAddOn.PREFERRED_HEIGHT); } }

public IMenuCreator getMenuCreator() { return new IMenuCreator() { ... }; }

}

ImChatActionWindowAction

public class ImChatWindowAction extends Action { ….}

23

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Quick Response plug-in manifest outline

24

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Recent Buddies Mini Application

What it does for the user: – Displays a dynamic list of users based most recent chats (similar to

NotesBuddy’s primary buddies)

– List is stored locally

What it demonstrates for the programmer– Event notification

– Local data storage

– Directory interface

25

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

The Recent Buddies UIbefore… after…

26

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Adding a Sametime Mini Application

In order to add a mini application, a developer needs to:

Create an Eclipse plug-in that requires the Sametime runtime plug-ins

Declare a contribution to the UI with an extension to Sametime specific extension points

Create an extension class

27

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Manifest-Version: 1.0Bundle-ManifestVersion: 2Bundle-Name: Sametime Sample Recent Buddies Plug-inBundle-SymbolicName:

com.ibm.collaboration.realtime.sample.recentbuddies; singleton:=true

Bundle-Version: 1.0.2Bundle-Activator: …sample.recentbuddies.RecentBuddiesPluginBundle-Vendor: IBMBundle-Localization: pluginRequire-Bundle: org.eclipse.ui, org.eclipse.core.runtime, com.ibm.collaboration.realtime.core, com.ibm.collaboration.realtime.community, com.ibm.collaboration.realtime.imhub, com.ibm.collaboration.realtime.messages, com.ibm.collaboration.realtime.people, com.ibm.collaboration.realtime.storageEclipse-Lazystart: true

The Recent Buddies Manifest

The Recent Buddies MANIFEST.MF

required Eclipse plug-ins

Required Sametime 7.5 plug-ins

28

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

The Recent Buddies Plug-in ExtensionsPlug-in Purpose

RbMiniApp Adds the Recent Buddies view to the miniApps area when Sametime is launched.

This class also determines what information is displayed and how it is laid out as well as the right click actions that can be performed on members of this list.

RbMessageHandlerAdapter Handles and processes the messages from the notification service.

Right-click action set

29

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Recent Buddies Plug-in Extension Manifest

Recent Buddies plugin.xml– Declares a Sametime specific extension point

– com.ibm.collaboration.realtime.imhub.miniApps– com.ibm.collaboration.realtime.messages.MessageHandlerListener

The following lines of code show the plugin.xml file.…

<extension

point="com.ibm.collaboration.realtime.imhub.miniApps">

<miniApp

category="shelf.messaging"

class="com.ibm.collaboration.realtime.sample.recentbuddies.ui.RbMiniApp"

displayName="Recent Buddies"

id="com.ibm.collaboration.realtime.sample.recentbuddies.miniApp"

maxHeight="400"/>

</extension>

Your “mini app” declares the class responsible for creating the contents of the tabbed area.

30

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Recent Buddies Plug-in Extension Manifest, cont.

The following lines of code show the plugin.xml file:…

<extension

point="com.ibm.collaboration.realtime.messages.MessageHandlerListener">

<messageHandler

class="com.ibm.collaboration.realtime.sample.recentbuddies.RbMessageHandlerAdapter"/>

</extension>

</plugin>

Your “message handler” can subscribe to IM events (connected, disconnected, status change) and UI events (person selected, chat window opened).

31

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Recent Buddies plug-in outline

32

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Buddy Note Plug-in

What it does for the user:

– Displays a tabbed, text area to enter

short notes about the currently selected

person

– Notes are stored locally

What it demonstrates for the

programmer

– How to declare a “mini application”

extension

– How to track the selection of a person

mini app tabbed area

33

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

The Buddy Note UIbefore… after…

34

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Bundle-Name: BuddyNote

Bundle-SymbolicName: ...sample.buddynote;singleton=true

Bundle-Version: 1.0.0

Bundle-ClassPath: BuddyNotePlugin.jar

Bundle-Activator: ...sample.buddynote.BuddyNotePlugin

Bundle-Vendor: IBM

Bundle-Localization: plugin

Require-Bundle: org.eclipse.ui,

org.eclipse.core.runtime,

com.ibm.collaboration.realtime.imhub,

com.ibm.collaboration.realtime.ui,

com.ibm.collaboration.realtime.people,

com.ibm.collaboration.realtime.core,

com.ibm.collaboration.realtime.community

Eclipse-LazyStart: true

The Buddy Note Manifest

The Buddy Note manifest file, MANIFEST.MF

– uses Open Sources Gateway Initiative (OSGi) bundles

– describes how the plug-in is packaged

– defines the plug-in requirements required Eclipse plug-ins

Required Sametime 7.5 plug-ins

35

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

BuddyNote classes

Plug-in Purpose BuddyNoteMiniApp This class extends the AbstractMiniApp class,

which builds the tabbed application window, defines what content appears in the window, and how it will be laid out.

BuddyNoteMessageHandlerAdapter Handles and processes the messages from the notification service.

36

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

The Buddy Note Plug-in Extension Manifest

Buddy Note plugin.xml– Declares a Sametime specific extension point

– com.ibm.collaboration.realtime.imhub.miniApps– com.ibm.collaboration.messages.MessageHandlerListener

<extension

point="com.ibm.collaboration.realtime.imhub.miniApps">

<miniApp

category="shelf.messaging"

class="com.ibm.collaboration.realtime.sample.buddynote.BuddyNoteMiniApp"

displayName="BuddyNote"

maxHeight="300"

id="com.ibm.collaboration.realtime.sample.buddynote.buddynoteminiapp"/>

</extension>

<extension

point="com.ibm.collaboration.realtime.messages.MessageHandlerListener">

<messageHandler class="com.ibm.collaboration.realtime.sample.buddynote.BuddyNoteMessageHandlerAdapter"/>

</extension>

37

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

The BuddyNoteMiniApp class extendspublic class BuddyNoteMiniApp extends AbstractMiniApp {

static public BuddyNoteMiniApp INSTANCE; private final String DEFAULT_NOTE = “…"; private IPerson person = null; MyBusinessCard bizCard; StyledText textControl; String currentNote = null;

public Control createControl(Composite parent) { Composite comp = new Composite(parent, SWT.BORDER); comp.setLayout(new FormLayout());

// Business card is "person aware", i.e., will update // as the person's status updates. bizCard = new MyBusinessCard(comp, SWT.NONE); FormData fd = new FormData(); ... bizCard.setLayoutData(fd);

// Text input area; it displays an indication that it's empty // as defined by DEFAULT_NOTE textControl = new StyledText(comp, SWT.MULTI | SWT.V_SCROLL |

SWT.WRAP); ...

// Save and restore the buddy note on gain/lose focus. // (remember not to store the "default" note!) textControl.addFocusListener(new FocusAdapter() {... });

return comp;}

the AbstractMiniApp class

public abstract class AbstractMiniApp {

public abstract Control createControl(Composite parent);

public boolean showsInitially() {return true;}

public abstract void init() throws Exception;}

BuddyNoteMiniAppusing com.ibm.collaboration.realtime.imhub.miniApps extension point

38

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

The BuddyNoteMessageHandler class extends

public class BuddyNoteMessageHandler extends DefaultMessageHandler {

public void handleMessage(BuddySelectedMessage message) {

IPeopleService peopleSvc = (IPeopleService) ServiceHub.getService(IPeopleService.SVC_TYPE);

IPerson person = peopleSvc.getPersonById(message.getPersonId());

BuddyNoteMiniApp.INSTANCE.handleBuddySelected(person);

} public void handleMessage(ImConnectedMessage message)

{ BuddyNoteMiniApp.INSTANCE.handleConnected(); }

public void handleDefaultMessage(Message message) { }}

the DefaultMessageHandler class

BuddyNoteMessageHandlerusing com.ibm.collaboration.messages.MessageHandlerListener extension point

Your handler is notified by overriding the desired handleMessage(eventMessage) method.

39

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Buddy Note plug-in outline

40

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Where to Get the Sametime 7.5 Integration Guide

IBMers… Partners...

Contact your IBM sales representative

41

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Resources

Sametime TechTalks from Feb 15:– WPLC TechTalk: Sametime 7.5, Interoperability, and Integrated Audio

– Or for Partners:

– Partner Lotus Sales Talk QuickPlace and selecting 2006 Lotus TechTalks:

– http://extranet.lotus.com/salestalk

– User Name: Sales Talk

– Password: golotus

TechTalks via Podcast delivery!– Download the audio replays from WPLC Talks via the

– WPLC TechTalk Podcast

– http://podcast.webahead.ibm.com/podcast_view.do?podcastId=1100– WPLC SalesTalk Podcast

– http://podcast.webahead.ibm.com/podcast_view.do?setPage=pages.podcast_edit&podcastId=1489

42

IBM Software, WPLC

Sametime Connect 7.5 Integration Guide © 2006 IBM Corporation

Q & A

For more information:

http://www.ibm.com/software/sw-lotus/products/product3.nsf/wdocs/st75home