com.ibm.commerce.collaboration.manager
Class CollabManager

java.lang.Object
  |
  +--com.ibm.commerce.collaboration.manager.CollabManager

public class CollabManager
extends java.lang.Object

This class is the singleton that controls the operations of Collaborative Workspaces


Field Summary
static java.lang.String COPYRIGHT
          Copyright statement
static java.lang.String ROLE_AUTHOR
          Constant for author role
static java.lang.String ROLE_MANAGER
          Constant for manager role
static java.lang.String ROLE_READER
          Constant for reader role
 
Method Summary
static int addCWMember(java.lang.String collabWorkspaceId, java.lang.String memberDN, java.lang.String role)
          Adds a member to the collaborative workspace
static int addCWMembers( CollabWorkspaceInfo csbean)
          Adds members to the collaborative workspace
static int addCWMembers(java.lang.String collabWorkspaceId, java.util.Vector memberDNs, java.lang.String role)
          Adds members to the collaborative workspace
static boolean changeCWDescription(java.lang.String collabSpaceID, java.lang.String description)
          Modifies the collaborative workspace description
static java.lang.String createCollabWorkspace( CollabWorkspaceInfo cspaceBean)
          Creates a collaboration space.
static  CollabWorkspaceInfo getCollabWorkspaceDetails(java.lang.String collabSpaceID)
          Gets the details of a collaborative workspace
static java.lang.String getCollabWorkspaceURL(java.lang.String cwId)
          Gets the collaborative workspace URL given the workspace ID
static java.lang.String getCWMemberRole(java.lang.String memberDN, java.lang.String cwId)
          Returns the role of a member within a collaborative workspace
static java.util.Vector listCollabWorkspaces()
          Lists all the collaborative workspaces that exist in the collaborative application server
static java.util.Vector listCollabWorkspaces(java.lang.String userDN)
          This function returns a list of CollabSpaceBean objects for the given LDAP uid.
static java.util.Vector listCWMembers(java.lang.String collabSpaceID)
          Lists the group members distinguished name (DN) for the given collaborative workspace ID
static java.util.Vector listCWMembers(java.lang.String collabSpaceID, java.lang.String role)
          This lists the group members distinguished name (DN) for the given collaborative workspace ID and group ("Manager", "Author", "Reader" and null for all)
static java.util.Vector listCWTemplates()
          Lists all available collaborative workspace templates
static boolean removeCollabWorkpace(java.lang.String collabSpaceID)
          Deletes a given collaborative workspace from the QuickPlace server
static int removeCWMember(java.lang.String cwId, java.lang.String memberDN)
          Removes a member from a collaborative workspace
static int removeCWMembers( CollabWorkspaceInfo csbean)
          Remove members from the collaborative workspace
static int removeCWMembers(java.lang.String cwId, java.util.Vector memberDNs)
          Remove members from the collaborative workspace
static void setCWMemberRole(java.lang.String memberDN, java.lang.String cwId, java.lang.String role)
          Set the role of a member within a collaborative workspace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
Copyright statement
See Also:
Constant Field Values

ROLE_MANAGER

public static final java.lang.String ROLE_MANAGER
Constant for manager role
See Also:
Constant Field Values

ROLE_AUTHOR

public static final java.lang.String ROLE_AUTHOR
Constant for author role
See Also:
Constant Field Values

ROLE_READER

public static final java.lang.String ROLE_READER
Constant for reader role
See Also:
Constant Field Values
Method Detail

addCWMembers

public static int addCWMembers(CollabWorkspaceInfo csbean)
                        throws ECException
Adds members to the collaborative workspace
Parameters:
csbean - Collaborative workspaces information
Returns:
Number of members added
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

addCWMembers

public static int addCWMembers(java.lang.String collabWorkspaceId,
                               java.util.Vector memberDNs,
                               java.lang.String role)
                        throws ECException
Adds members to the collaborative workspace
Parameters:
collabWorkspaceId - The collaborative workspace ID
role - Role of the members to be added, can be CollabManager.ROLE_MANAGER, CollabManager.ROLE_AUTHOR or CollabManager.ROLE_READER
Returns:
Number of members added
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

addCWMember

public static int addCWMember(java.lang.String collabWorkspaceId,
                              java.lang.String memberDN,
                              java.lang.String role)
                       throws ECException
Adds a member to the collaborative workspace
Parameters:
collabWorkspaceId - The collaborative workspace ID
role - Role of the members to be added, can be CollabManager.ROLE_MANAGER, CollabManager.ROLE_AUTHOR or CollabManager.ROLE_READER
Returns:
Number of members added
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

changeCWDescription

public static boolean changeCWDescription(java.lang.String collabSpaceID,
                                          java.lang.String description)
                                   throws ECException
Modifies the collaborative workspace description
Parameters:
collabSpaceID - collaborative workspace ID
description - the new description
Returns:
true if successful, false otherwise
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

createCollabWorkspace

public static java.lang.String createCollabWorkspace(CollabWorkspaceInfo cspaceBean)
                                              throws ECException
Creates a collaboration space. CollabManager needs to get information of which collaboration application we are using. All the required parameters for creating a collaboration space are passed through the cspaceBean. It returns the collabSpace URL if it succeeds, otherwise null.
Parameters:
cspaceBean - Collaborative workspace information
Returns:
URL of the collaborative workspace created
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

getCollabWorkspaceURL

public static java.lang.String getCollabWorkspaceURL(java.lang.String cwId)
                                              throws ECException
Gets the collaborative workspace URL given the workspace ID
Parameters:
cwId - The collaborative workspace ID
Returns:
The URL of the workspace
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

getCollabWorkspaceDetails

public static CollabWorkspaceInfo getCollabWorkspaceDetails(java.lang.String collabSpaceID)
                                                     throws ECException
Gets the details of a collaborative workspace
Parameters:
collabSpaceID - collaborative workspace ID
Returns:
collaborative workspace information
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

getCWMemberRole

public static java.lang.String getCWMemberRole(java.lang.String memberDN,
                                               java.lang.String cwId)
                                        throws ECException
Returns the role of a member within a collaborative workspace
Parameters:
memberDN - The distinguished name (DN) of the member
cwId - collaborative workspace ID
Returns:
role of the member
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

setCWMemberRole

public static void setCWMemberRole(java.lang.String memberDN,
                                   java.lang.String cwId,
                                   java.lang.String role)
                            throws ECException
Set the role of a member within a collaborative workspace
Parameters:
memberDN - The distinguished name (DN) of the member
cwId - collaborative workspace ID
role - The new role of the member, can be CollabManager.ROLE_MANAGER, CollabManager.ROLE_AUTHOR or CollabManager.ROLE_READER
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

listCollabWorkspaces

public static java.util.Vector listCollabWorkspaces()
                                             throws ECException
Lists all the collaborative workspaces that exist in the collaborative application server
Returns:
Vector of all collaborative workspaces
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

listCollabWorkspaces

public static java.util.Vector listCollabWorkspaces(java.lang.String userDN)
                                             throws ECException
This function returns a list of CollabSpaceBean objects for the given LDAP uid.
Parameters:
userDN - distinguished name (DN) of the member
Returns:
vector of collaborative workspaces
Throws:
Exceptions - thrown by WebSphereCommerce server
ECException

listCWTemplates

public static java.util.Vector listCWTemplates()
                                        throws ECException
Lists all available collaborative workspace templates
Returns:
vector of collaborative workspaces templates
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

listCWMembers

public static java.util.Vector listCWMembers(java.lang.String collabSpaceID)
                                      throws ECException
Lists the group members distinguished name (DN) for the given collaborative workspace ID
Returns:
a list of DNs
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

listCWMembers

public static java.util.Vector listCWMembers(java.lang.String collabSpaceID,
                                             java.lang.String role)
                                      throws ECException
This lists the group members distinguished name (DN) for the given collaborative workspace ID and group ("Manager", "Author", "Reader" and null for all)
Returns:
a list of DNs.
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

removeCollabWorkpace

public static boolean removeCollabWorkpace(java.lang.String collabSpaceID)
                                    throws ECException
Deletes a given collaborative workspace from the QuickPlace server
Parameters:
collabSpaceID - collaborative workspace ID
Returns:
true if it is successful, otherwise, false
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

removeCWMembers

public static int removeCWMembers(CollabWorkspaceInfo csbean)
                           throws ECException
Remove members from the collaborative workspace
Parameters:
csbean - Collaborative workspaces information
Returns:
Number of members removed
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

removeCWMembers

public static int removeCWMembers(java.lang.String cwId,
                                  java.util.Vector memberDNs)
                           throws ECException
Remove members from the collaborative workspace
Parameters:
cwId - The collaborative workspaces ID
memberDNs - A Vector of memberDNs to be added
Returns:
Number of members removed
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException

removeCWMember

public static int removeCWMember(java.lang.String cwId,
                                 java.lang.String memberDN)
                          throws ECException
Removes a member from a collaborative workspace
Parameters:
cwId - The collaborative workspace ID
memberDN - The distinguished name (DN) of the member to be removed
Returns:
1 if the member is removed, 0 otherwise
Throws:
java.lang.Exception - thrown by WebSphereCommerce
ECException