com.collabnet.ce.webservices
Class DocumentApp

java.lang.Object
  extended by com.collabnet.ce.webservices.DocumentApp

public class DocumentApp
extends java.lang.Object

Class to hold the document-related methods. Wraps a collabNetApp.


Constructor Summary
DocumentApp(CollabNetApp collabNetApp)
          Construct a new DocumentApp.
 
Method Summary
 com.collabnet.ce.soap50.webservices.docman.DocumentSoapDO createDocument(java.lang.String parentId, java.lang.String title, java.lang.String description, java.lang.String versionComment, java.lang.String status, boolean createLocked, java.lang.String fileName, java.lang.String mimeType, java.lang.String fileId, java.lang.String associationId, java.lang.String associationDesc)
          Create a new document.
 java.lang.String findDocumentId(java.lang.String folderId, java.lang.String title)
          Find the latest version of the document in the folder which has a matching title.
 java.lang.String findOrCreatePath(java.lang.String projectId, java.lang.String documentPath)
          Find or create a document folder path.
 java.lang.String getFolderPath(java.lang.String folderId)
          Find the url path for the folder.
 void updateDoc(java.lang.String docId, java.lang.String fileId)
          Update document with new version.
 java.lang.String verifyPath(java.lang.String projectId, java.lang.String documentPath)
          Verify a document folder path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentApp

public DocumentApp(CollabNetApp collabNetApp)
Construct a new DocumentApp.

Parameters:
collabNetApp - a valid (logged-in) collabNetApp.
Method Detail

findOrCreatePath

public java.lang.String findOrCreatePath(java.lang.String projectId,
                                         java.lang.String documentPath)
                                  throws java.rmi.RemoteException
Find or create a document folder path.

Parameters:
projectId - to get the root folder for the project.
documentPath - string with folders separated by '/'. The path may or may not include the root folder.
Returns:
folder id for the found/created folder.
Throws:
java.rmi.RemoteException

verifyPath

public java.lang.String verifyPath(java.lang.String projectId,
                                   java.lang.String documentPath)
                            throws java.rmi.RemoteException
Verify a document folder path. If at any point the folder is missing, return the name of the first missing folder.

Parameters:
projectId - to get the root folder for the project.
documentPath - string with folders separated by '/'.
Returns:
the first missing folder, or null if all are found.
Throws:
java.rmi.RemoteException

getFolderPath

public java.lang.String getFolderPath(java.lang.String folderId)
                               throws java.rmi.RemoteException
Find the url path for the folder.

Parameters:
folderId -
Returns:
path to the folder.
Throws:
java.rmi.RemoteException

findDocumentId

public java.lang.String findDocumentId(java.lang.String folderId,
                                       java.lang.String title)
                                throws java.rmi.RemoteException
Find the latest version of the document in the folder which has a matching title.

Parameters:
folderId -
title -
Returns:
id for the document, if found. Otherwise, null.
Throws:
java.rmi.RemoteException

updateDoc

public void updateDoc(java.lang.String docId,
                      java.lang.String fileId)
               throws java.rmi.RemoteException
Update document with new version.

Throws:
java.rmi.RemoteException

createDocument

public com.collabnet.ce.soap50.webservices.docman.DocumentSoapDO createDocument(java.lang.String parentId,
                                                                                java.lang.String title,
                                                                                java.lang.String description,
                                                                                java.lang.String versionComment,
                                                                                java.lang.String status,
                                                                                boolean createLocked,
                                                                                java.lang.String fileName,
                                                                                java.lang.String mimeType,
                                                                                java.lang.String fileId,
                                                                                java.lang.String associationId,
                                                                                java.lang.String associationDesc)
                                                                         throws java.rmi.RemoteException
Create a new document.

Parameters:
parentId -
title -
description -
versionComment -
status -
createLocked -
fileName -
mimeType -
fileId -
associationId -
associationDesc -
Returns:
newly created Document Soap DO.
Throws:
java.rmi.RemoteException


Copyright © 2009. All Rights Reserved.