Tutorial: Creating a Collaboration Service
A collaboration service enables a specific way of collaborating online with other portal users. Examples:
● Send e-mail
● Share application
● Dial phone
Collaboration services can be made available in the following applications:
● Collaboration Launch Pad
● Room member lists
● User details dialog
● Context menu for a user or user group (using the PeopleRenderer control)
If you need an additional collaboration service, you can write it as described below and make it available using the configuration.
The collaboration service uses the ContextContainer to store the users involved in the collaborative activity that the service enables. When an application launches a collaboration service, it creates a container and places the respective users or groups in the container. When a user launches the collaboration service, it retrieves the users or groups from the container and uses them in its application logic.
This section gives you source code examples and explains the configuration for making a new collaboration service available to users.
The portal component implementing the collaboration service is a HTMLB DynPage application. Therefore, the following two classes are to be implemented:
●
PageProcessorComponent
Example: PageProcessorComponent of sample.collaborationservice (the PageProcessorComponent implementation returns the DynPage):
|
● DynPage
Example: DynPage of sample.collaborationservice
|
To work with the principals (users, groups, roles) provided by either the Collaboration launch pad or the PeopleRenderer, you need to instantiate a ContextContainer. You can then call the methods on the ContextContainer to get an ArrayList that contains all principals. For more information, see Javadoc.
This section describes the steps necessary to create the configurable items for your collaboration service. See also the Making Services Available section of the Collaboration Administration Guide.
The configurable items must be deployed to the configuration path Collaboration ® Properties ® LinkCommand.
For each collaboration service, you need to create two configurable items of type LinkCommand. The configurable items differ only in the Java implementation used:
Usage |
JavaImplementationClass |
PeopleRenderer control user details dialog |
|
Collaboration Launch Pad, Team Member List |
|

Even if your collaboration service can only deal
with a single user, you should create two Configurables because otherwise the collaboration service
cannot be launched for individual users that are selected on the Collaboration
Launch Pad.
In the table below, you can see all attributes of a LinkCommand configurable:
Attribute |
Value description (sample values in bold type) |
javaClass |
Use one of the following Java classes: ● com.sap.netweaver.coll.coreui.api.uicommands. UILaunchCommand ● com.sap.ip.collaboration.coreui.api.people. flexibleui.CLPUICommand |
reference |
Reference to the fully-qualified name of the portal application as specified in the portalapp.xml file prefixed with 'portal:', for example: portal:sample.portal.app.CollaborationService |
resourceBundle |
Name of the resource bundle file as registered with the CRT, for example: sample.collaborationservice.MyBundle |
labelKey |
Key of label in resource bundle file |
tooltipKey |
Key of label in resource bundle file |
positionType |
center or custom |
height, width |
Integer value specifying the window dimension |
top, left |
Integer value specifying the window position, only relevant if positionType equals custom |
valueFactoryKey |
LinkCommandValueFactory (fixed) |
launchType |
modalPopup (fixed) |
ridPathName |
Uri (fixed) |
windowName |
Not used, empty value (fixed) |
applicationParameters |
Not used, empty value (fixed) |
urlParameters |
Not used, empty value (fixed) |
portalRoles |
See documentation of collaboration services |

Fixed means that you cannot change the attributes.
● Example of a LinkCommand Configurable
Find below a complete example of a LinkCommand configurable:
<?xml version="1.0" encoding="UTF-8" ?> <Configurable configclass="LinkCommand"> <property name="name" value="MyCollaborationService"/> <property name="javaClass" value="com.sap.netweaver.coll.coreui.api.uicommands.UILaunchCommand"/> <property name="reference" value="portal:sample.portal.app.CollaborationService"/> <property name="resourceBundle" value="sample.collaborationservice.MyBundle"/> <property name="labelKey" value="XLAB_COLL_SERVICE"/> <property name="tooltipKey" value="XTOL_COLL_SERVICE"/> <property name="positionType" value="custom"/> <property name="height" value="340"/> <property name="width" value="200"/> <property name="top" value="20"/> <property name="left" value="20"/> <property name="valueFactoryKey" value="LinkCommandValueFactory"/> <property name="launchType" value="modalPopup"/> <property name="ridPathName" value="Uri"/> <property name="windowName" /> <property name="applicationParameters" /> <property name="urlParameters" /> <property name="portalRoles" /> </Configurable> |
Attribute values in bold type will differ in your configurable.

You must adhere to the naming conventions for configurable file names.
The context menu entry of your collaboration service can be internationalised using standard Java technology. You need to add two properties for the label and the tooltip of the collaboration service to a resource bundle. These properties are referenced in the configurable as described in the previous section.

The resource bundle files must be registered with the CRT.
Making Services Available (Collaboration Administration)
