Collaboration API Documentation

com.filenet.bso.api.collaboration
Interface ContentManager


public interface ContentManager

A class that implements the ContentManager interface provides functionality to manage content folders and documents of a teamspace.


Method Summary
 com.filenet.wcm.api.Document addDocument(SubjectInfo creatorOwner, java.lang.String parentFolderID, java.lang.String className, com.filenet.wcm.api.TransportInputStream content, com.filenet.wcm.api.Properties properties, com.filenet.wcm.api.Permissions permissions, boolean membershipManagedSecurity, boolean autoClassify)
          Create a new content document and file it in a folder in a teamspace.
 com.filenet.wcm.api.Folder addFolder(SubjectInfo creatorOwner, java.lang.String parentFolderID, java.lang.String name, java.lang.String className, com.filenet.wcm.api.Properties properties, com.filenet.wcm.api.Permissions permissions, boolean membershipManagedSecurity, boolean isHidden)
          Create a new content folder in a teamspace.
 com.filenet.wcm.api.Document copyDocument(SubjectInfo creatorOwner, java.lang.String parentFolderID, java.lang.String className, com.filenet.wcm.api.Document srcDocument, com.filenet.wcm.api.Properties properties, com.filenet.wcm.api.Permissions permissions, boolean membershipManagedSecurity, boolean autoClassify)
          Create a new document based on an existing document and file it in a folder in a teamspace.
 java.lang.String getObjectSecurityXML(int objectType, java.lang.String objectID, java.lang.String[] propNames, OrderBy[] sortOrder)
          Return all members of this teamspace, indicating if each member has access to the requested object.
 boolean isAccessGranted(int objectType, java.lang.String objectID, java.lang.String memberID, int requiredRights)
          Return true if the member has access to the object, given the required rights.
 boolean isOwner(SubjectInfo userInfo, com.filenet.wcm.api.BaseObject content)
          Determine if a user has a security owner relationship with a content folder or document.
 boolean membershipManagedSecurity(com.filenet.wcm.api.BaseObject content)
          Determine if the content folder or document security is controlled via teamspace membership.
 void moveDocument(java.lang.String toFolderID, java.lang.String fromFolderID, com.filenet.wcm.api.Document document)
          Move a content document to a different folder within a teamspace.
 void moveFolder(java.lang.String toFolderID, com.filenet.wcm.api.Folder folder)
          Move a content folder to another folder within a teamspace.
 void restoreObjectSecurity(int objectType, java.lang.String objectID)
          Restores object security (to inherit from parent).
 void updateObjectSecurity(int objectType, java.lang.String objectID, java.lang.String[] addMembers, java.lang.String[] removeMembers)
          Update the permission collection of the object.
 

Method Detail

addDocument

public com.filenet.wcm.api.Document addDocument(SubjectInfo creatorOwner,
                                                java.lang.String parentFolderID,
                                                java.lang.String className,
                                                com.filenet.wcm.api.TransportInputStream content,
                                                com.filenet.wcm.api.Properties properties,
                                                com.filenet.wcm.api.Permissions permissions,
                                                boolean membershipManagedSecurity,
                                                boolean autoClassify)
                                         throws NonTeamspaceMemberException,
                                                ValidationException
Create a new content document and file it in a folder in a teamspace.

Parameters:
creatorOwner - SubjectInfo object for user adding document. Required.
parentFolderID - ID of parent folder where document will be filed. Required.
className - Document class name for new document. Required.
content - Content for document. May be null.
properties - Properties for document. May be null.
permissions - Permissions for document. May be null.
membershipManagedSecurity - Boolean to specify if document security is controlled via teamspace membership.
autoClassify - Boolean to specify if the document should be automatically classified.

Returns:
content Document.
Throws:
ValidationException -  
NonTeamspaceMemberException -  

copyDocument

public com.filenet.wcm.api.Document copyDocument(SubjectInfo creatorOwner,
                                                 java.lang.String parentFolderID,
                                                 java.lang.String className,
                                                 com.filenet.wcm.api.Document srcDocument,
                                                 com.filenet.wcm.api.Properties properties,
                                                 com.filenet.wcm.api.Permissions permissions,
                                                 boolean membershipManagedSecurity,
                                                 boolean autoClassify)
                                          throws NonTeamspaceMemberException,
                                                 ValidationException,
                                                 com.filenet.wcm.api.PropertyNotFoundException
Create a new document based on an existing document and file it in a folder in a teamspace.

Parameters:
creatorOwner - SubjectInfo object for user adding document. Required.
parentFolderID - ID of parent folder where document will be filed. Required.
className - Document class name for new document. Required.
srcDocument - Source document. Required.
properties - Properties for document. May be null.
permissions - Permissions for document. May be null.
membershipManagedSecurity - Boolean to specify if document security is controlled via teamspace membership.
autoClassify - Boolean to specify if the document should be automatically classified.

Returns:
content Document.
Throws:
ValidationException -  
NonTeamspaceMemberException -  
com.filenet.wcm.api.PropertyNotFoundException -  

moveDocument

public void moveDocument(java.lang.String toFolderID,
                         java.lang.String fromFolderID,
                         com.filenet.wcm.api.Document document)
                  throws NonTeamspaceMemberException,
                         ValidationException,
                         com.filenet.wcm.api.PropertyNotFoundException
Move a content document to a different folder within a teamspace.

Parameters:
toFolderID - String identifier of folder to which document will be moved. Required.
fromFolderID - String identifier of folder from which document will be moved. Required.
document - Document object to be moved. Required.
Throws:
ValidationException -  
com.filenet.wcm.api.PropertyNotFoundException -  

addFolder

public com.filenet.wcm.api.Folder addFolder(SubjectInfo creatorOwner,
                                            java.lang.String parentFolderID,
                                            java.lang.String name,
                                            java.lang.String className,
                                            com.filenet.wcm.api.Properties properties,
                                            com.filenet.wcm.api.Permissions permissions,
                                            boolean membershipManagedSecurity,
                                            boolean isHidden)
                                     throws NonTeamspaceMemberException,
                                            ValidationException
Create a new content folder in a teamspace.

Parameters:
creatorOwner - SubjectInfo object of user adding folder. Required.
parentFolderID - Id of parent folder where folder will be created. Required.
name - Name for folder. Required.
className - Folder class name for new document. Required.
properties - Properties for folder. May be null.
permissions - Permissions for folder May be null.
membershipManagedSecurity - Boolean to specify if folder security is controlled via teamspace membership.
isHidden - Boolean to specify if the folder should be hidden.

Returns:
content Document.

Throws:
ValidationException -  
NonTeamspaceMemberException -  

moveFolder

public void moveFolder(java.lang.String toFolderID,
                       com.filenet.wcm.api.Folder folder)
                throws NonTeamspaceMemberException,
                       ValidationException,
                       com.filenet.wcm.api.PropertyNotFoundException
Move a content folder to another folder within a teamspace.

Parameters:
toFolderID - String identifier of parent folder to which folder will be moved. Required.
folder - Folder object to be moved. Required.
Throws:
ValidationException -  
com.filenet.wcm.api.PropertyNotFoundException -  

isOwner

public boolean isOwner(SubjectInfo userInfo,
                       com.filenet.wcm.api.BaseObject content)
Determine if a user has a security owner relationship with a content folder or document.

Parameters:
userInfo - SubjectInfo of user adding folder. Required.
content - A document of folder object. Required.

Returns:
boolean value (true if the user has security owner relationship).

membershipManagedSecurity

public boolean membershipManagedSecurity(com.filenet.wcm.api.BaseObject content)
Determine if the content folder or document security is controlled via teamspace membership.

Parameters:
content - A document of folder object. Required.

Returns:
boolean value, true if the document or folder security is managed by the teamspace membership.

getObjectSecurityXML

public java.lang.String getObjectSecurityXML(int objectType,
                                             java.lang.String objectID,
                                             java.lang.String[] propNames,
                                             OrderBy[] sortOrder)
                                      throws NonTeamspaceObjectException,
                                             org.xml.sax.SAXException,
                                             java.io.IOException,
                                             javax.xml.parsers.ParserConfigurationException,
                                             javax.xml.transform.TransformerException
Return all members of this teamspace, indicating if each member has access to the requested object. Returned as XML. A null string is returned if the value of the MEMBERSHIPMANAGEDSECURITY property is not set.

Parameters:
objectType - The int value of object type. Supported object types: BaseObject.TYPE_FOLDER and BaseObject.TYPE_DOCUMENT.
objectID - The GUID value of the object.
propNames - A String array containing the property names to include in the XML. May be null.
sortOrder - An OrderBy array that contains the property name and sort order (ASCENDING_SORT or DESCENDING_SORT) for each property value selected to sort on. Optional. May be null.
Returns:
The XML representation of the teamspace members.
Throws:
NonTeamspaceObjectException -  
org.xml.sax.SAXException -  
java.io.IOException -  
javax.xml.parsers.ParserConfigurationException -  
javax.xml.transform.TransformerException -  

restoreObjectSecurity

public void restoreObjectSecurity(int objectType,
                                  java.lang.String objectID)
                           throws NonTeamspaceObjectException
Restores object security (to inherit from parent).
Parameters:
objectType - The int value of object type. Supported object type: BaseObject.TYPE_FOLDER.
objectID - The GUID value of the object.
Throws:
NonTeamspaceObjectException -  

updateObjectSecurity

public void updateObjectSecurity(int objectType,
                                 java.lang.String objectID,
                                 java.lang.String[] addMembers,
                                 java.lang.String[] removeMembers)
                          throws NonTeamspaceObjectException
Update the permission collection of the object. Once the access control of the object is updated, the object no longer inherits access control from its parent and the value of the MEMBERSHIPMANAGEDSECURITY property is set to false.
Parameters:
objectType - The int value of object type. Supported object type: BaseObject.TYPE_FOLDER.
objectID - The GUID value of the object.
addMembers - An array of member IDs to add to the object's permission collection. Access rights are based on the member's role as defined in the access level definition XML for that role.
removeMembers - An array of member IDs to remove from the object's permission collection.
Throws:
NonTeamspaceObjectException -  

isAccessGranted

public boolean isAccessGranted(int objectType,
                               java.lang.String objectID,
                               java.lang.String memberID,
                               int requiredRights)
Return true if the member has access to the object, given the required rights.
Parameters:
objectType - The int value of object type. Supported object types include BaseObject.TYPE_FOLDER BaseObject.TYPE_DOCUMENT, BaseObject.TYPE_VERSIONSERIES. For version series, the access rights check is performed against the current version.
objectID - The GUID value of the object.
memberID - The String value of the member ID.
requiredRights - The int value of the required rights
Returns:
true if the member has access to the object, given the required rights.

Collaboration API Documentation

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