Primavera Integration API 6.1

com.primavera.integration.collab
Interface DocumentManager


public interface DocumentManager

Provides access to the Document Management repository.


Method Summary
 DocumentProperties assignDocumentSecurityPolicy(DocumentId documentId, DocumentManagementSecurityPolicy policy)
          Assign a security policy to a document.
 FolderProperties assignFolderSecurityPolicy(FolderId folderId, DocumentManagementSecurityPolicy policy)
          Assign a security policy to a folder.
 VersionProperties checkIn(VersionId versionId, CheckInOptions options, File content)
          Checks in a checked out document with the content.
 VersionProperties checkIn(VersionId versionId, CheckInOptions options, InputStream content, long streamLength)
          Deprecated. As of release 5.0, use use checkIn(VersionId, CheckInOptions, String, InputStream, long)
 VersionProperties checkIn(VersionId versionId, CheckInOptions options, String contentPathAndName, InputStream content, long streamLength)
          Checks in a checked out document with the content.
 VersionProperties checkOut(VersionId versionId, File content)
          Checks out a version of a document and puts the document content into the object provided.
 VersionProperties checkOut(VersionId versionId, OutputStream content)
          Checks out a version of a document and puts the document content into the object provided.
 VersionProperties checkOutLatestVersion(DocumentId documentId, File content)
          Checks out the latest version of a document and puts the document content into the object provided.
 VersionProperties checkOutLatestVersion(DocumentId documentId, OutputStream content)
          Checks out the latest version of a document and puts the document content into the object provided.
 DocumentProperties convertDocumentFromPrivateToProject(Document pmDocument, FolderId destination, DocumentId privateDocumentId)
          Converts an existing private collaboration document to a Project Management collaboration document.
 DocumentProperties convertDocumentFromPrivateToProject(ObjectId documentObjectId, FolderId destination, DocumentId privateDocumentId)
          Converts an existing private collaboration document to a Project Management collaboration document, linking the collaboration document to an existing Project Management document.
 DocumentProperties convertDocumentFromProjectToPrivate(DocumentId documentId)
          Converts an existing project collaboration document to a private collaboration document.
 DocumentProperties convertDocumentFromProjectToPrivate(ObjectId documentObjectId)
          Converts an existing project collaboration document to a private collaboration document.
 FolderProperties createFolder(FolderId parentFolderId, String folderName)
          Creates a subfolder under the parent folder.
 DocumentProperties createProjectDocument(Document pmDocument, FolderId locationFolderId, File contents)
          Creates a ProjectManagment document and uploads the file associated with the document.
 DocumentProperties createProjectDocument(Document pmDocument, FolderId locationFolderId, String fileName, InputStream content, long streamLength)
          Creates a ProjectManagment document and uploads the file associated with the document.
 void deleteDocument(DocumentId documentId)
          Deletes a document.
 void deleteFolder(FolderId folderId)
          Deletes a folder.
 void deleteVersion(VersionId versionId)
          Deletes a version of a project or private document.
 VersionProperties download(VersionId versionId, File content)
          Downloads a version of a document without checking out.
 VersionProperties download(VersionId versionId, OutputStream content)
          Downloads a version of a document without checking out.
 VersionProperties downloadLatestVersion(DocumentId documentId, File content)
          Downloads the latest version of a document without checking out.
 VersionProperties downloadLatestVersion(DocumentId documentId, OutputStream content)
          Downloads the latest version of a document without checking out.
 boolean isDocumentCheckedOut(DocumentId documentId)
          Determines if any version of a document is checked out.
 boolean isStrictVersioningOn()
          Determines if Strict versioning is on.
 VersionProperties[] loadCheckedOutVersions(DocumentId documentId)
          Provides information about any versions of a document that are checked out.
 FolderProperties[] loadChildFolders(FolderId folderId)
          Loads all the subfolders of a given folder.
 DocumentProperties loadDocument(DocumentId documentId)
          Loads the properties of the document based on the collaboration id of the document.
 DocumentProperties loadDocument(ObjectId docObjId)
          Loads the properties of the document based on the ObjectId from the Project Management Database.
 DocumentProperties[] loadDocuments(FolderId folderId)
          Loads all the properties of all the documents in the folder.
 FolderProperties loadFolder(DocumentId documentId)
          Gets the properties of the folder containing the document.
 FolderProperties loadFolder(FolderId folderId)
          Gets the properties of the folder specified.
 HistoryEventProperties[] loadHistoryEvents(DocumentId documentId)
          Loads all the history objects associated with the document.
 VersionProperties loadLatestVersion(DocumentId documentId)
          Gets the latest version of the document.
 FolderProperties loadParentFolder(FolderId folderId)
          Loads the properties of the parent folder.
 DocumentProperties[] loadPrivateDocuments()
          Gets all private documents for the current user.
 FolderProperties loadRootFolder(ObjectId projectObjectId)
          Loads the base or root folder for a Project.
 VersionProperties loadVersion(VersionId versionId)
          Loads the properties of the version.
 VersionProperties[] loadVersions(DocumentId documentId)
          Loads versions of a document.
 DocumentProperties moveDocument(DocumentId targetDocumentId, FolderId destinationFolderId)
          Moves a document from its current folder to another NOTE: moving a document from one folder to another alters the DocumentId value.
 FolderProperties moveFolder(FolderId targetFolderId, FolderId destinationFolderId)
          Moves a folder from one location to another.
 FolderProperties renameFolder(FolderId targetFolderId, String newName)
          Renames the folder.
 DocumentProperties renamePrivateDocument(DocumentId targetDocumentId, String newName)
          Renames the document.
 VersionProperties undoCheckOut(VersionId versionId)
          Removes the checkout of a version.
 DocumentProperties uploadPrivateDocument(String description, File content)
          Creates a private document, accessible only the user.
 DocumentProperties uploadPrivateDocument(String title, String description, InputStream content, long streamLength)
          Creates a private document, accessible only the user.
 DocumentProperties uploadProjectDocument(ObjectId docObjId, FolderId locationFolderId, File content)
          Uploads a file into the document management repository for an existing Document in the Project Management database.
 DocumentProperties uploadProjectDocument(ObjectId docObjId, FolderId locationFolderId, String fileName, InputStream content, long streamLength)
          Uploads a file into the document management repository for an existing Document in the Project Management database.
 

Method Detail

loadCheckedOutVersions

VersionProperties[] loadCheckedOutVersions(DocumentId documentId)
                                           throws ServerException,
                                                  ClientException,
                                                  NetworkException
Provides information about any versions of a document that are checked out.

Parameters:
documentId - unique identifier for a document
Returns:
the VersionProperties for any version that is checked out
Throws:
ServerException - if documentId not found or an error occurs
ClientException - if documentId is null
NetworkException - if a problem occurred in the network layer

isDocumentCheckedOut

boolean isDocumentCheckedOut(DocumentId documentId)
                             throws ServerException,
                                    ClientException,
                                    NetworkException
Determines if any version of a document is checked out.

Parameters:
documentId - unique identifier for a document
Returns:
true if any version of a document is checked out
Throws:
ServerException - if documentId not found or an error occurs
ClientException - if documentId is null
NetworkException - if a problem occurred in the network layer

loadLatestVersion

VersionProperties loadLatestVersion(DocumentId documentId)
                                    throws ServerException,
                                           ClientException,
                                           NetworkException
Gets the latest version of the document.

Parameters:
documentId - unique identifier for a document
Returns:
the VersionProperties for the most recent (latest) version
Throws:
ServerException - if document not found or an error occurs
ClientException - if documentId is null
NetworkException - if a problem occurred in the network layer

isStrictVersioningOn

boolean isStrictVersioningOn()
Determines if Strict versioning is on. Strict versioning means that users cannot delete versions of a document and cannot overwrite versions of a document

Returns:
value for strict versioning

checkIn

@Deprecated
VersionProperties checkIn(VersionId versionId,
                                     CheckInOptions options,
                                     InputStream content,
                                     long streamLength)
                          throws ServerException,
                                 ClientException,
                                 NetworkException
Deprecated. As of release 5.0, use use checkIn(VersionId, CheckInOptions, String, InputStream, long)

Checks in a checked out document with the content. WARNING: if the length parameter is not the exact length of the stream, an exception will be thrown.

Parameters:
versionId - unique identifier for a version
options - options for checking in
content - the potentially revised content
streamLength - the size of the content to include in the checkin.
Returns:
the attributes of the version that the checking process created
Throws:
ServerException - if version is not checked out or is checked out by another user or the stream cannot be read.
ClientException - if input data is invalid (null) or if options are invalid
NetworkException - if a problem occurred in the network layer

checkIn

VersionProperties checkIn(VersionId versionId,
                          CheckInOptions options,
                          String contentPathAndName,
                          InputStream content,
                          long streamLength)
                          throws ServerException,
                                 ClientException,
                                 NetworkException
Checks in a checked out document with the content. WARNING: if the length parameter is not the exact length of the stream, an exception will be thrown.

Parameters:
versionId - unique identifier for a version
options - options for checking in
contentPathAndName - the path and name of the content
content - the potentially revised content
streamLength - the size of the content to include in the checkin.
Returns:
the attributes of the version that the checking process created
Throws:
ServerException - if version is not checked out or is checked out by another user or the stream cannot be read.
ClientException - if input data is invalid (null) or if options are invalid
NetworkException - if a problem occurred in the network layer

checkIn

VersionProperties checkIn(VersionId versionId,
                          CheckInOptions options,
                          File content)
                          throws ServerException,
                                 ClientException,
                                 NetworkException
Checks in a checked out document with the content.

Parameters:
versionId - unique identifier for a version
options - options for checking in
content - the potentially revised content
Returns:
the attributes of the version that the checking process created
Throws:
ServerException - if version is not checked out or is checked out by another user or the file cannot be read.
ClientException - if requred input data is invalid or null
NetworkException - if a problem occurred in the network layer

checkOut

VersionProperties checkOut(VersionId versionId,
                           OutputStream content)
                           throws ServerException,
                                  ClientException,
                                  NetworkException
Checks out a version of a document and puts the document content into the object provided.

Parameters:
versionId - unique identifier for a version
content - container for the content of the document
Returns:
the attributes of the version that has been checked out
Throws:
ServerException - if version not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

checkOut

VersionProperties checkOut(VersionId versionId,
                           File content)
                           throws ServerException,
                                  ClientException,
                                  NetworkException
Checks out a version of a document and puts the document content into the object provided.

Parameters:
versionId - unique identifier for a version
content - container for the content of the document
Returns:
the attributes of the version that has been checked out
Throws:
ServerException - if version not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

checkOutLatestVersion

VersionProperties checkOutLatestVersion(DocumentId documentId,
                                        OutputStream content)
                                        throws ServerException,
                                               ClientException,
                                               NetworkException
Checks out the latest version of a document and puts the document content into the object provided.

Parameters:
documentId - unique identifier for a document
content - container for the content of the document
Returns:
the attributes of the version that has been checked out
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

checkOutLatestVersion

VersionProperties checkOutLatestVersion(DocumentId documentId,
                                        File content)
                                        throws ServerException,
                                               ClientException,
                                               NetworkException
Checks out the latest version of a document and puts the document content into the object provided.

Parameters:
documentId - unique identifier for a document
content - container for the content of the document
Returns:
the attributes of the version that has been checked out
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

convertDocumentFromPrivateToProject

DocumentProperties convertDocumentFromPrivateToProject(Document pmDocument,
                                                       FolderId destination,
                                                       DocumentId privateDocumentId)
                                                       throws ServerException,
                                                              ClientException,
                                                              NetworkException
Converts an existing private collaboration document to a Project Management collaboration document. After this method, the contents of pmDocument should be reloaded since attributes of the Document may change.

Parameters:
pmDocument - data container with fields populated, but that does not yet exist in the database (did not call create method).
destination - folder in which to place the collaboration document; uses project root folder if null
privateDocumentId - the document to convert
Returns:
the altered properties of the new project document
Throws:
ServerException - if privateDocumentId not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

convertDocumentFromPrivateToProject

DocumentProperties convertDocumentFromPrivateToProject(ObjectId documentObjectId,
                                                       FolderId destination,
                                                       DocumentId privateDocumentId)
                                                       throws ServerException,
                                                              ClientException,
                                                              NetworkException
Converts an existing private collaboration document to a Project Management collaboration document, linking the collaboration document to an existing Project Management document. After this method, the contents of pmDocument should be reloaded since attributes of the Document may change.

Parameters:
documentObjectId - the Project Management object id for the document to convert
destination - folder in which to place the collaboration document; uses project root folder if null
privateDocumentId - the existing private collaboration document to convert
Returns:
the altered properties of the project document
Throws:
ServerException - if privateDocumentId not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

convertDocumentFromProjectToPrivate

DocumentProperties convertDocumentFromProjectToPrivate(DocumentId documentId)
                                                       throws ServerException,
                                                              ClientException,
                                                              NetworkException
Converts an existing project collaboration document to a private collaboration document. After this method, the project document will have been deleted from the Project Management database.

Parameters:
documentId - the collaboration id for the document to convert
Returns:
the altered properties of the document that was converted
Throws:
ServerException - if data not found, document is not a collaboration document, or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

convertDocumentFromProjectToPrivate

DocumentProperties convertDocumentFromProjectToPrivate(ObjectId documentObjectId)
                                                       throws ServerException,
                                                              ClientException,
                                                              NetworkException
Converts an existing project collaboration document to a private collaboration document. After this method, the project document will have been deleted from the Project Management database.

Parameters:
documentObjectId - the Project Management object id for the document to convert (the document must be a collaboration document)
Returns:
the altered properties of the document that was converted
Throws:
ServerException - if Document not found, document is not a collaboration document, or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

createFolder

FolderProperties createFolder(FolderId parentFolderId,
                              String folderName)
                              throws ServerException,
                                     ClientException,
                                     NetworkException
Creates a subfolder under the parent folder.

Parameters:
parentFolderId - the folder to contain the new folder.
folderName - the name of the new folder
Returns:
the properties of the created folder
Throws:
ServerException - if parent folder not found or an error occurs
ClientException - if any input value is null or name is too long
NetworkException - if a problem occurred in the network layer

createProjectDocument

DocumentProperties createProjectDocument(Document pmDocument,
                                         FolderId locationFolderId,
                                         File contents)
                                         throws ServerException,
                                                ClientException,
                                                NetworkException
Creates a ProjectManagment document and uploads the file associated with the document. After this method, the contents of pmDocument should be reloaded since attributes of the Document may change. To add content for an existing Project Management Document that has no content,

Parameters:
pmDocument - data container with fields populated, but that does not yet exist in the database (did not call create method).
locationFolderId - null value puts document in project root folder
contents - the actual document file
Returns:
collaboration properties of the document created
Throws:
ServerException - if Document already exists or if pmDocument cannot be created
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer
See Also:
uploadProjectDocument(com.primavera.common.value.ObjectId, FolderId, java.io.File)

createProjectDocument

DocumentProperties createProjectDocument(Document pmDocument,
                                         FolderId locationFolderId,
                                         String fileName,
                                         InputStream content,
                                         long streamLength)
                                         throws ServerException,
                                                ClientException,
                                                NetworkException
Creates a ProjectManagment document and uploads the file associated with the document. After this method, the contents of pmDocument should be reloaded since attributes of the Document may change. WARNING: if the length parameter is not the exact length of the stream, an exception will be thrown. To add content for an existing Project Management Document that has no content,

Parameters:
pmDocument - data container with fields populated, but that does not yet exist in the database (did not call create method).
locationFolderId - null value puts document in project root folder
fileName - the value to store in the collaboration server as the file name.
content - the content of the document
streamLength - the length of the content to be included
Returns:
collaboration properties of the document created
Throws:
ServerException - if Document already exists or if pmDocument cannot be created
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer
See Also:
uploadProjectDocument(com.primavera.common.value.ObjectId, FolderId, String, java.io.InputStream, long)

deleteDocument

void deleteDocument(DocumentId documentId)
                    throws ServerException,
                           ClientException,
                           NetworkException
Deletes a document.

Parameters:
documentId -
Throws:
ServerException - if document not found, the user is not allowed to delete the document, or an error occurs
ClientException - if documentId is null
NetworkException - if a problem occurred in the network layer

deleteFolder

void deleteFolder(FolderId folderId)
                  throws ServerException,
                         ClientException,
                         NetworkException
Deletes a folder. NOTE: folders containing other folders or any documents cannot be deleted. The contents must be deleted first.

Parameters:
folderId - the identifier of the folder to delete
Throws:
ServerException - if folder not found, folder contains documents or subfolders, or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

deleteVersion

void deleteVersion(VersionId versionId)
                   throws ServerException,
                          ClientException,
                          NetworkException
Deletes a version of a project or private document.

Parameters:
versionId - the version to delete
Throws:
ServerException - if version not found, trying to delete the first version of a project document, or an error occurs
ClientException - if required input parameters are null or strict versioning is enabled.
NetworkException - if a problem occurred in the network layer

downloadLatestVersion

VersionProperties downloadLatestVersion(DocumentId documentId,
                                        File content)
                                        throws ServerException,
                                               ClientException,
                                               NetworkException
Downloads the latest version of a document without checking out.

Parameters:
documentId - the unique identifier for the document
content - the container for the document content
Returns:
the properties of the version of the document that was downloaded.
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

download

VersionProperties download(VersionId versionId,
                           OutputStream content)
                           throws ServerException,
                                  ClientException,
                                  NetworkException
Downloads a version of a document without checking out.

Parameters:
versionId - the unique identifier of the version to checkout
content - the container for the document content
Returns:
the properties of the version of the document that was downloaded.
Throws:
ServerException - if version not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

download

VersionProperties download(VersionId versionId,
                           File content)
                           throws ServerException,
                                  ClientException,
                                  NetworkException
Downloads a version of a document without checking out.

Parameters:
versionId - the unique identifier of the version to checkout
content - the container for the document content
Returns:
the properties of the version of the document that was downloaded.
Throws:
ServerException - if version not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

downloadLatestVersion

VersionProperties downloadLatestVersion(DocumentId documentId,
                                        OutputStream content)
                                        throws ServerException,
                                               ClientException,
                                               NetworkException
Downloads the latest version of a document without checking out.

Parameters:
documentId - the unique identifier for the document
content - the container for the document content
Returns:
the properties of the version of the document that was downloaded.
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadChildFolders

FolderProperties[] loadChildFolders(FolderId folderId)
                                    throws ServerException,
                                           ClientException,
                                           NetworkException
Loads all the subfolders of a given folder. The subfolders of the subfolders are not included.

Parameters:
folderId - the folder on which to load the subfolders
Returns:
the properties of all immediate children folders for the input.
Throws:
ServerException - if folder not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadDocument

DocumentProperties loadDocument(DocumentId documentId)
                                throws ServerException,
                                       ClientException,
                                       NetworkException
Loads the properties of the document based on the collaboration id of the document. To get the contents of the document, use download.

Parameters:
documentId - the document on which to get properties
Returns:
the properties of the document provided
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadDocument

DocumentProperties loadDocument(ObjectId docObjId)
                                throws ServerException,
                                       ClientException,
                                       NetworkException
Loads the properties of the document based on the ObjectId from the Project Management Database. To get the contents of the document, use download.

Parameters:
docObjId - the ObjectId for the Document in the Project Management database
Returns:
the properties of the document provided
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadDocuments

DocumentProperties[] loadDocuments(FolderId folderId)
                                   throws ServerException,
                                          ClientException,
                                          NetworkException
Loads all the properties of all the documents in the folder.

Parameters:
folderId - the folder that contains all the documents
Returns:
the properties of all documents in the folder provided
Throws:
ServerException - if folder not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadFolder

FolderProperties loadFolder(DocumentId documentId)
                            throws ServerException,
                                   ClientException,
                                   NetworkException
Gets the properties of the folder containing the document.

Parameters:
documentId - the document
Returns:
the properties of the folder that contains the document provided.
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadFolder

FolderProperties loadFolder(FolderId folderId)
                            throws ServerException,
                                   ClientException,
                                   NetworkException
Gets the properties of the folder specified.

Parameters:
folderId - the folder to provide data for
Returns:
the properties of the folder provided
Throws:
ServerException - if folder not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadHistoryEvents

HistoryEventProperties[] loadHistoryEvents(DocumentId documentId)
                                           throws ServerException,
                                                  ClientException,
                                                  NetworkException
Loads all the history objects associated with the document. Includes downloads, checkin, checkout, undo checkout, and views of any version of the document.

Parameters:
documentId - the document on which to provide history
Returns:
the history of the document.
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadParentFolder

FolderProperties loadParentFolder(FolderId folderId)
                                  throws ServerException,
                                         ClientException,
                                         NetworkException
Loads the properties of the parent folder. This method called with the project root folder id as input will return null.

Parameters:
folderId - the folder on which to find its parent's properties.
Returns:
the parent folder properties, if accessible. Null if parent is not accessible. For example, loadParentFolder with the FolderId of the root folder will return null.
Throws:
ServerException - if folder not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadPrivateDocuments

DocumentProperties[] loadPrivateDocuments()
                                          throws ServerException,
                                                 ClientException,
                                                 NetworkException
Gets all private documents for the current user.

Returns:
the properties for each private document
Throws:
ServerException - if an error occurs.
ClientException
NetworkException - if a problem occurred in the network layer

loadRootFolder

FolderProperties loadRootFolder(ObjectId projectObjectId)
                                throws ServerException,
                                       ClientException,
                                       NetworkException
Loads the base or root folder for a Project.

Parameters:
projectObjectId - the ObjectId for a project
Returns:
the properties of the root folder for the project provided
Throws:
ServerException - if project not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

loadVersion

VersionProperties loadVersion(VersionId versionId)
                              throws ServerException,
                                     ClientException,
                                     NetworkException
Loads the properties of the version.

Parameters:
versionId - the version on which to get properties
Returns:
the properties of the version provided
Throws:
ServerException - if version not found or an error occurs
ClientException - if versionId is null
NetworkException - if a problem occurred in the network layer

loadVersions

VersionProperties[] loadVersions(DocumentId documentId)
                                 throws ServerException,
                                        ClientException,
                                        NetworkException
Loads versions of a document.

Parameters:
documentId - the document for which to load versions
Returns:
version data for each version of the document
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

moveDocument

DocumentProperties moveDocument(DocumentId targetDocumentId,
                                FolderId destinationFolderId)
                                throws ServerException,
                                       ClientException,
                                       NetworkException
Moves a document from its current folder to another NOTE: moving a document from one folder to another alters the DocumentId value.

Parameters:
targetDocumentId - the document to move
destinationFolderId - the folder to which the document is moved
Returns:
properties of the document that was moved; includes the new DocumentId and the FolderId for the new location.
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

moveFolder

FolderProperties moveFolder(FolderId targetFolderId,
                            FolderId destinationFolderId)
                            throws ServerException,
                                   ClientException,
                                   NetworkException
Moves a folder from one location to another. NOTE: the project must be the same for both folders. NOTE: moving a folder to another folder alters the target folder's id and all the documents contained in the structure (folder id is part of the document id).

Parameters:
targetFolderId - the folder to move
destinationFolderId - the folder to which the folder is moved
Returns:
properties of the folder that was moved; includes the new folder id.
Throws:
ServerException - if folder not found, destination is not contained in same project, or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

renameFolder

FolderProperties renameFolder(FolderId targetFolderId,
                              String newName)
                              throws ServerException,
                                     ClientException,
                                     NetworkException
Renames the folder.

Parameters:
targetFolderId - the folder to rename
newName - the new name for the folder
Returns:
the properties of the renamed folder
Throws:
ServerException - if folder not found or an error occurs
ClientException - if required input parameters are null or name is too long.
NetworkException - if a problem occurred in the network layer

renamePrivateDocument

DocumentProperties renamePrivateDocument(DocumentId targetDocumentId,
                                         String newName)
                                         throws ServerException,
                                                ClientException,
                                                NetworkException
Renames the document. To rename Project documents, use the set methods on Document and then execute Document.update().

Parameters:
targetDocumentId - the document to rename
newName - the new name
Returns:
the properties of the renamed document
Throws:
ServerException - if document not found, the document is not a private document, or an error occurs
ClientException - if required input parameters are null or name is too long.
NetworkException - if a problem occurred in the network layer

undoCheckOut

VersionProperties undoCheckOut(VersionId versionId)
                               throws ServerException,
                                      ClientException,
                                      NetworkException
Removes the checkout of a version.

Parameters:
versionId - the unique identifer for the version on which to act.
Returns:
the properties of the version that was checked in, after the action has occurred.
Throws:
ServerException - if version not found or an error occurs
ClientException - if versionId is null
NetworkException - if a problem occurred in the network layer

uploadPrivateDocument

DocumentProperties uploadPrivateDocument(String title,
                                         String description,
                                         InputStream content,
                                         long streamLength)
                                         throws ServerException,
                                                ClientException,
                                                NetworkException
Creates a private document, accessible only the user. WARNING: if the length parameter is not the exact length of the stream, an exception will be thrown.

Parameters:
title - the value to store in the collaboration server as the title.
description - the description of the content
content - the document content to be added to the collaboration server.
streamLength - the length of the content to be included
Returns:
the properties of the document that was uploaded.
Throws:
ServerException - if an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

uploadPrivateDocument

DocumentProperties uploadPrivateDocument(String description,
                                         File content)
                                         throws ServerException,
                                                ClientException,
                                                NetworkException
Creates a private document, accessible only the user.

Parameters:
description - the description of the content
content - the document content to be added to the collaboration server.
Returns:
the properties of the document that was uploaded.
Throws:
ServerException - if an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

uploadProjectDocument

DocumentProperties uploadProjectDocument(ObjectId docObjId,
                                         FolderId locationFolderId,
                                         File content)
                                         throws ServerException,
                                                ClientException,
                                                NetworkException
Uploads a file into the document management repository for an existing Document in the Project Management database.

Parameters:
docObjId - the ObjectId for the Document in the Project Management database
locationFolderId - the location for the collaboration document; uses the root if this value is null
content - the document content to be added to the collaboration server.
Returns:
the collaboration properties of the document that was uploaded.
Throws:
ServerException - if folder or document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

uploadProjectDocument

DocumentProperties uploadProjectDocument(ObjectId docObjId,
                                         FolderId locationFolderId,
                                         String fileName,
                                         InputStream content,
                                         long streamLength)
                                         throws ServerException,
                                                ClientException,
                                                NetworkException
Uploads a file into the document management repository for an existing Document in the Project Management database. WARNING: if the length parameter is not the exact length of the stream, an exception will be thrown.

Parameters:
docObjId - the ObjectId for the Document in the Project Management database
locationFolderId - the location for the collaboration document; uses the root if this value is null
fileName - the value to store in the collaboration server as the file name.
content - the document content to be added to the collaboration server.
streamLength - the length of the content to be included
Returns:
the collaboration properties of the document that was uploaded.
Throws:
ServerException - if document or folder not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer

assignDocumentSecurityPolicy

DocumentProperties assignDocumentSecurityPolicy(DocumentId documentId,
                                                DocumentManagementSecurityPolicy policy)
                                                throws ServerException,
                                                       ClientException,
                                                       NetworkException
Assign a security policy to a document.

Parameters:
documentId - the document on which to assign the specified security policy
policy - the value to assign
Returns:
information about the document with the changed values
Throws:
ServerException - if document not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer
Since:
Version 5.0

assignFolderSecurityPolicy

FolderProperties assignFolderSecurityPolicy(FolderId folderId,
                                            DocumentManagementSecurityPolicy policy)
                                            throws ServerException,
                                                   ClientException,
                                                   NetworkException
Assign a security policy to a folder.

Parameters:
folderId - the folder on which to assign the specified security policy
policy - the value to assign
Returns:
information about the folder with the changed values
Throws:
ServerException - if folder not found or an error occurs
ClientException - if required input parameters are null
NetworkException - if a problem occurred in the network layer
Since:
Version 5.0

Primavera Integration API 6.1

Copyright © Primavera 1999-2007. All rights reserved.