Collaboration API Documentation

com.filenet.bso.api.collaboration
Class CollaborationFactory

java.lang.Object
  |
  +--com.filenet.bso.api.collaboration.CollaborationFactory

public class CollaborationFactory
extends java.lang.Object

The CollaborationFactory class is responsible for creating new Teamspace objects and retrieving existing Teamspace and TeamspaceWork objects.

This class also creates various "info" objects that are used to add containees and subcontainers to Teamspace containers.

See Also:
Teamspace, Task

Method Summary
static Teamspace createTeamspace(com.filenet.wcm.api.ObjectStore store, com.filenet.wcm.api.Folder parentFolder, java.lang.String ownerID, java.lang.String teamspaceFolderClass, java.lang.String teamspaceName, com.filenet.wcm.api.Properties teamspaceProperties, java.util.List teamspaceMembers, ContainerInfo[] containerInfo, filenet.vw.api.VWSession vwSession)
          Creates a Teamspace object.
static Teamspace createTeamspace(com.filenet.wcm.api.ObjectStore store, com.filenet.wcm.api.Folder parentFolder, java.lang.String ownerID, java.lang.String teamspaceFolderClass, java.lang.String teamspaceName, com.filenet.wcm.api.Properties teamspaceProperties, java.util.List teamspaceMembers, ContainerInfo[] containerInfo, filenet.vw.api.VWSession vwSession, java.lang.String applicationID)
          Creates a Teamspace object.
static Teamspace createTeamspaceFromTemplate(com.filenet.wcm.api.ObjectStore store, java.lang.String teamspaceTemplateID, com.filenet.wcm.api.Folder parentFolder, java.lang.String ownerID, java.lang.String teamspaceName, java.util.List teamspaceMembers, filenet.vw.api.VWSession vwSession, java.lang.String applicationID)
          Creates a Teamspace object from a teamspace template.
static Teamspace createTeamspaceFromTemplate(com.filenet.wcm.api.ObjectStore store, java.lang.String teamspaceTemplateID, com.filenet.wcm.api.Folder parentFolder, java.lang.String ownerID, java.lang.String teamspaceName, java.lang.String description, java.util.List teamspaceMembers, filenet.vw.api.VWSession vwSession)
          Creates a Teamspace object from a teamspace template.
static Teamspace createTeamspaceTemplate(com.filenet.wcm.api.ObjectStore store, java.lang.String teamspaceID, java.lang.String ownerID, java.lang.String templateName)
          Creates a Teamspace template from an existing teamspace.
static SubjectInfo findSubjectInfo(com.filenet.wcm.api.ObjectStore store, java.lang.String subjectShortName, int subjectType, filenet.vw.api.VWSession vwSession)
          Returns a SubjectInfo object for a user or group identified by the subject's short name.
static Command getCommand(java.lang.String cmdKey)
          Returns a Command object based on the key value.
static java.lang.String getCurrentUserId(com.filenet.wcm.api.ObjectStore store)
          Gets the LDAP id of the current logged-on user.
static SubjectInfo getCurrentUserInfo(com.filenet.wcm.api.Session session, filenet.vw.api.VWSession vwSession)
          Returns a SubjectInfo object for current logged-on user.
static EmailsQuery getEmailsQuery(com.filenet.wcm.api.Session sess)
           
static MixedTypesQuery getMixedTypesQuery(com.filenet.wcm.api.Session sess)
           
static NormalDocumentsQuery getNormalDocumentsQuery(com.filenet.wcm.api.Session sess)
           
static NormalFoldersQuery getNormalFoldersQuery(com.filenet.wcm.api.Session sess)
           
static OrderBy getOrderBy(java.lang.String propertyName, boolean ascendingSort)
          Returns an OrderBy object.
static ContentCriteriaNode getQueryContentCriteriaNode(int nodeType)
           
static OrderBy getQueryOrderBy()
           
static QueryPersister getQueryPersister()
           
static PropertyCriteriaNode getQueryPropertyCriteriaNode(int nodeType)
           
static SingleCollaborationTypeQuery getSingleCollaborationTypeQuery(com.filenet.wcm.api.Session sess, int collabType)
           
static SubjectInfo getSubjectInfo(com.filenet.wcm.api.Session session, java.lang.String subjectID, int subjectType, filenet.vw.api.VWSession vwSession)
          Returns a SubjectInfo object for a user or group identified by the subject's LDAP id.
static SubjectInfo[] getSubjectInfos(com.filenet.wcm.api.Session sess, java.lang.String[] userIDs, java.lang.String[] groupIDs, filenet.vw.api.VWSession vwSession)
          Returns SubjectInfo objects for multiple users or groups identified by each subject's LDAP id.
static Teamspace getTeamspace(com.filenet.wcm.api.ObjectStore store, java.lang.String teamspaceID, java.lang.String userID, BsoSearchResultRow row, filenet.vw.api.VWSession vwSession)
          Returns an existing Teamspace object referenced by a GUID.
static Teamspace getTeamspace(com.filenet.wcm.api.ObjectStore store, java.lang.String teamspaceID, java.lang.String userID, Task teamspaceTask, filenet.vw.api.VWSession vwSession)
          Returns an existing Teamspace object referenced by a GUID and associates a Task object with it.
static Teamspace getTeamspace(com.filenet.wcm.api.ObjectStore store, java.lang.String teamspaceID, java.lang.String userID, filenet.vw.api.VWSession vwSession)
          Returns an existing Teamspace object referenced by a GUID.
static java.lang.Object getTeamspaceObject(Teamspace teamspace, java.lang.String guid, int type)
          Returns an existing object from a Teamspace based on the object id (GUID) and type.
static TeamspacesQuery getTeamspacesQuery(com.filenet.wcm.api.Session sess)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTeamspace

public static Teamspace createTeamspace(com.filenet.wcm.api.ObjectStore store,
                                        com.filenet.wcm.api.Folder parentFolder,
                                        java.lang.String ownerID,
                                        java.lang.String teamspaceFolderClass,
                                        java.lang.String teamspaceName,
                                        com.filenet.wcm.api.Properties teamspaceProperties,
                                        java.util.List teamspaceMembers,
                                        ContainerInfo[] containerInfo,
                                        filenet.vw.api.VWSession vwSession)
                                 throws ValidationException
Creates a Teamspace object. Through the Teamspace object, a collaborative work environment is established that supports content management, subscription to and notification of teamspace events, threaded discussions, meetings, tasks and so on.

Parameters:
store - Content Engine ObjectStore object.

parentFolder - Content Engine Folder object. May be null. If null, the root folder is used.

ownerID - The LDAP SID of the user that will be granted CREATOR OWNER rights for the Teamspace. Required.

teamspaceFolderClass - The teamspace's folder class. The created teamspace will be an object of this type. The value may be a symbolic class name or a folder class GUID.

teamspaceName - A String containing the name of the teamspace (unqualified).

teamspaceProperties - The Content Engine properties to apply to the teamspace.

teamspaceMembers - A list of MemberInfo objects.

containerInfo - An array of container information objects.

vwSession - A VWSession object.

Returns:
A Teamspace object.

Throws:
ValidationException -  

createTeamspace

public static Teamspace createTeamspace(com.filenet.wcm.api.ObjectStore store,
                                        com.filenet.wcm.api.Folder parentFolder,
                                        java.lang.String ownerID,
                                        java.lang.String teamspaceFolderClass,
                                        java.lang.String teamspaceName,
                                        com.filenet.wcm.api.Properties teamspaceProperties,
                                        java.util.List teamspaceMembers,
                                        ContainerInfo[] containerInfo,
                                        filenet.vw.api.VWSession vwSession,
                                        java.lang.String applicationID)
                                 throws ValidationException
Creates a Teamspace object. Through the Teamspace object, a collaborative work environment is established that supports content management, subscription to and notification of teamspace events, threaded discussions, meetings, tasks and so on.

Parameters:
store - Content Engine ObjectStore object.

parentFolder - Content Engine Folder object. May be null. If null, the root folder is used.

ownerID - The LDAP SID of the user that will be granted CREATOR OWNER rights for the Teamspace. Required.

teamspaceFolderClass - The teamspace's folder class. The created teamspace will be an object of this type. The value may be a symbolic class name or a folder class GUID.

teamspaceName - A String containing the name of the teamspace (unqualified).

teamspaceProperties - The Content Engine properties to apply to the teamspace.

teamspaceMembers - A list of MemberInfo objects.

containerInfo - An array of container information objects.

vwSession - A VWSession object.

applicationID - The application ID to associate with this teamspace. May be null. If null, the application ID used in the object store's JavaAPI session is used.

Returns:
A Teamspace object.

Throws:
ValidationException -  

createTeamspaceFromTemplate

public static Teamspace createTeamspaceFromTemplate(com.filenet.wcm.api.ObjectStore store,
                                                    java.lang.String teamspaceTemplateID,
                                                    com.filenet.wcm.api.Folder parentFolder,
                                                    java.lang.String ownerID,
                                                    java.lang.String teamspaceName,
                                                    java.lang.String description,
                                                    java.util.List teamspaceMembers,
                                                    filenet.vw.api.VWSession vwSession)
                                             throws ObjectAccessException,
                                                    ValidationException
Creates a Teamspace object from a teamspace template.

Parameters:
store - Content Engine ObjectStore object. Required.

teamspaceTemplateID - The GUID of the teamspace template to use as the basis of the new teamspace. Required.

parentFolder - Content Engine Folder object. May be null. If null, the root folder is used.

ownerID - The LDAP SID of the user that will be granted CREATOR OWNER rights for the Teamspace. Required.

teamspaceName - A String containing the name of the teamspace (unqualified). Required.

teamspaceMembers - A list of MemberInfo objects.

vwSession - A VWSession object.

Returns:
Teamspace object.

Throws:
ObjectAccessException - If template does not exist or security rights do not permit access.
ValidationException -  

createTeamspaceFromTemplate

public static Teamspace createTeamspaceFromTemplate(com.filenet.wcm.api.ObjectStore store,
                                                    java.lang.String teamspaceTemplateID,
                                                    com.filenet.wcm.api.Folder parentFolder,
                                                    java.lang.String ownerID,
                                                    java.lang.String teamspaceName,
                                                    java.util.List teamspaceMembers,
                                                    filenet.vw.api.VWSession vwSession,
                                                    java.lang.String applicationID)
                                             throws ObjectAccessException,
                                                    ValidationException
Creates a Teamspace object from a teamspace template.

Parameters:
store - Content Engine ObjectStore object. Required.

teamspaceTemplateID - The GUID of the teamspace template to use as the basis of the new teamspace. Required.

parentFolder - Content Engine Folder object; may be null. If null, the root folder is used.

ownerID - The LDAP SID of the user that will be granted CREATOR OWNER rights for the Teamspace. Required.

teamspaceName - A String containing the name of the teamspace (unqualified). Required.

teamspaceMembers - A list of MemberInfo objects.

vwSession - A VWSession object.

applicationID - The application ID to associate with this teamspace. If null, then use the application ID used in the object store's JavaAPI session.
Returns:
Teamspace object.

Throws:
ObjectAccessException - If template does not exist or security rights do not permit access.
ValidationException -  

createTeamspaceTemplate

public static Teamspace createTeamspaceTemplate(com.filenet.wcm.api.ObjectStore store,
                                                java.lang.String teamspaceID,
                                                java.lang.String ownerID,
                                                java.lang.String templateName)
                                         throws ObjectAccessException,
                                                ValidationException
Creates a Teamspace template from an existing teamspace.

Parameters:
store - Content Engine ObjectStore object.

teamspaceID - Id of existing teamspace to be templated.

ownerID - The LDAP SID of the user that will be granted CREATOR OWNER rights for the Teamspace. Required.

templateName - The name to be given to the template.

Returns:
Teamspace object.

Throws:
ObjectAccessException - if teamspace does not exist or security rights do not permit access.
ValidationException -  

getTeamspace

public static Teamspace getTeamspace(com.filenet.wcm.api.ObjectStore store,
                                     java.lang.String teamspaceID,
                                     java.lang.String userID,
                                     filenet.vw.api.VWSession vwSession)
                              throws ObjectAccessException
Returns an existing Teamspace object referenced by a GUID.

Important:
An instance of a Teamspace object caches member and container data so as to avoid frequent roundtrips to reacquire that data. To prevent unnecessary roundtrips, it is recommended that an application cache teamspace objects and that the cached objects be used until a specific user request to refresh teamspace data is issued and a new instance of the teamspace is retrieved.

Parameters:
store - Content Engine ObjectStore object.

teamspaceID - GUID for the Teamspace object.

userID - The id of the user requesting the teamspace.

vwSession - A VWSession object.

Returns:
A Teamspace object.

Throws:
ObjectAccessException - if teamspace does not exist or if security rights do not permit access.

getTeamspace

public static Teamspace getTeamspace(com.filenet.wcm.api.ObjectStore store,
                                     java.lang.String teamspaceID,
                                     java.lang.String userID,
                                     Task teamspaceTask,
                                     filenet.vw.api.VWSession vwSession)
                              throws ObjectAccessException
Returns an existing Teamspace object referenced by a GUID and associates a Task object with it.

Important:
An instance of a Teamspace object caches member and container data so as to avoid frequent roundtrips to reacquire that data. To prevent unnecessary roundtrips, it is recommended that an application cache teamspace objects and that the cached objects be used until a specific user request to refresh teamspace data is issued and a new instance of the teamspace is retrieved.

Parameters:
store - Content Engine ObjectStore object.

teamspaceID - GUID for the Teamspace object.

userID - The id of the user requesting the teamspace.

teamspaceTask - A Task object that will be associated with this instance of the teamspace. Any calls to the teamspace getCurrentTask() method will return this teamspace task object.

vwSession - A VWSession object.

Returns:
A Teamspace object.

Throws:
ObjectAccessException - if teamspace does not exist or if security rights do not permit access.

getTeamspace

public static Teamspace getTeamspace(com.filenet.wcm.api.ObjectStore store,
                                     java.lang.String teamspaceID,
                                     java.lang.String userID,
                                     BsoSearchResultRow row,
                                     filenet.vw.api.VWSession vwSession)
                              throws ObjectAccessException
Returns an existing Teamspace object referenced by a GUID.

Important:
An instance of a Teamspace object caches member and container data so as to avoid frequent roundtrips to reacquire that data. To prevent unnecessary roundtrips, it is recommended that an application cache teamspace objects and that the cached objects be used until a specific user request to refresh teamspace data is issued and a new instance of the teamspace is retrieved.

Parameters:
store - Content Engine ObjectStore object.

teamspaceID - GUID for the Teamspace object.

userID - The id of the user requesting the teamspace.

row - A BsoSearchResultRow object.

vwSession - A VWSession object.

Returns:
A Teamspace object.

Throws:
ObjectAccessException - if teamspace does not exist or if security rights do not permit access.

getTeamspaceObject

public static java.lang.Object getTeamspaceObject(Teamspace teamspace,
                                                  java.lang.String guid,
                                                  int type)
                                           throws ObjectAccessException
Returns an existing object from a Teamspace based on the object id (GUID) and type. This method supports retrieval of containee and subcontainer objects.

Parameters:
teamspace - Teamspace object. Required.

guid - Object id (GUID) of teamspace object to retrieve. Required.

type - Object type of teamspace object. Required.

Returns:
An Object which must be cast to the expected class.

Throws:
ObjectAccessException - if object does not exist or if security rights do not permit access.

getSubjectInfo

public static SubjectInfo getSubjectInfo(com.filenet.wcm.api.Session session,
                                         java.lang.String subjectID,
                                         int subjectType,
                                         filenet.vw.api.VWSession vwSession)
Returns a SubjectInfo object for a user or group identified by the subject's LDAP id.

Parameters:
session - Content Engine Session object. Required.

subjectID - LDAP id of user or group to retrieve. Required.

subjectType - Type of subject, either BaseObject.TYPE_USER, BaseObject.TYPE_GROUP or Member.TEAMSPACE_MEMBER. Required.

vwSession - VWSession object. Optional.

Returns:
A SubjectInfo object.

findSubjectInfo

public static SubjectInfo findSubjectInfo(com.filenet.wcm.api.ObjectStore store,
                                          java.lang.String subjectShortName,
                                          int subjectType,
                                          filenet.vw.api.VWSession vwSession)
                                   throws UserNotFoundException
Returns a SubjectInfo object for a user or group identified by the subject's short name.

Parameters:
store - Content Engine ObjectStore object. Required.

subjectShortName - Short name of user or group to retrieve. Required.

subjectType - Type of subject, either BaseObject.TYPE_USER, BaseObject.TYPE_GROUP or Member.TEAMSPACE_MEMBER. Required.

vwSession - VWSession object. Optional.

Returns:
A SubjectInfo object.

getCurrentUserInfo

public static SubjectInfo getCurrentUserInfo(com.filenet.wcm.api.Session session,
                                             filenet.vw.api.VWSession vwSession)
Returns a SubjectInfo object for current logged-on user.

Parameters:
session - Content Engine Session object. Required.

vwSession - VWSession object. Optional.

Returns:
A SubjectInfo object for the current logged-on user.

See Also:
AccessLevelsStore

getSubjectInfos

public static SubjectInfo[] getSubjectInfos(com.filenet.wcm.api.Session sess,
                                            java.lang.String[] userIDs,
                                            java.lang.String[] groupIDs,
                                            filenet.vw.api.VWSession vwSession)
Returns SubjectInfo objects for multiple users or groups identified by each subject's LDAP id. Always returns the whole SubjectInfo list even invalid users/groups are found.

Parameters:
sess - Content Engine Session object. Required.

userIDs - Array of LDAP ids of Users. Optional, but either userIDs or groupIDs must contain at least one ID.

groupIDs - Array of LDAP ids of Groups. Optional, but either groupIDs or userIDs must contain at least one ID.

vwSession - VWSession object, optional, but if not provided SubjectInfo cannot access email address.

Returns:
An array of SubjectInfo objects.

getOrderBy

public static OrderBy getOrderBy(java.lang.String propertyName,
                                 boolean ascendingSort)
Returns an OrderBy object.

Parameters:
propertyName - Name of property used for sort.

ascendingSort - If ascending sort, pass in TRUE, for descending sort, pass in FALSE.

Returns:
An OrderBy object.

getCommand

public static Command getCommand(java.lang.String cmdKey)
Returns a Command object based on the key value.

Parameters:
cmdKey - String value that specifies the type of command object to return.

Returns:
A Command object.

See Also:
Command

getMixedTypesQuery

public static MixedTypesQuery getMixedTypesQuery(com.filenet.wcm.api.Session sess)

getNormalDocumentsQuery

public static NormalDocumentsQuery getNormalDocumentsQuery(com.filenet.wcm.api.Session sess)

getNormalFoldersQuery

public static NormalFoldersQuery getNormalFoldersQuery(com.filenet.wcm.api.Session sess)

getTeamspacesQuery

public static TeamspacesQuery getTeamspacesQuery(com.filenet.wcm.api.Session sess)

getEmailsQuery

public static EmailsQuery getEmailsQuery(com.filenet.wcm.api.Session sess)

getSingleCollaborationTypeQuery

public static SingleCollaborationTypeQuery getSingleCollaborationTypeQuery(com.filenet.wcm.api.Session sess,
                                                                           int collabType)

getQueryPersister

public static QueryPersister getQueryPersister()

getQueryOrderBy

public static OrderBy getQueryOrderBy()

getQueryPropertyCriteriaNode

public static PropertyCriteriaNode getQueryPropertyCriteriaNode(int nodeType)

getQueryContentCriteriaNode

public static ContentCriteriaNode getQueryContentCriteriaNode(int nodeType)

getCurrentUserId

public static java.lang.String getCurrentUserId(com.filenet.wcm.api.ObjectStore store)
Gets the LDAP id of the current logged-on user.

Parameters:
store - A Content Engine ObjectStore object. Required.

Returns:
The LDAP id of the current logged-on user.

Collaboration API Documentation

Copyright ?2002 - 2005 FileNet Corporation. All rights reserved.