com.ibm.pim.docstore
Interface DocstoreManager

All Superinterfaces:
Manager

public interface DocstoreManager
extends Manager

Interface for the manager of docstore. The docstore acts as a repository for all documents in the PIM system.

Since:
6.0.0

Field Summary
 
Fields inherited from interface com.ibm.pim.common.Manager
copyright
 
Method Summary
 Document createAndPersistDocument(java.lang.String documentPath)
          Creates an empty document at the specified documentPath and persists it.
 Document createAndPersistDocument(java.lang.String documentPath, AccessControlGroup accessControlGroup)
          Creates an empty document at the specified documentPath and sets the given access control group for the document.
 Directory getDirectory(java.lang.String directoryPath)
          Fetches the directory at the given directoryPath.
 Document getDocument(java.lang.String documentPath)
          Fetches the document which exists at the given documentPath.
 Document getDocument(java.lang.String documentPath, boolean forceSync)
          Fetches the document which exists at the given documentPath.
 Directory getRootDirectory()
          Fetches the root directory of the docstore.
 
Methods inherited from interface com.ibm.pim.common.Manager
getManagerName
 

Method Detail

createAndPersistDocument

Document createAndPersistDocument(java.lang.String documentPath)
Creates an empty document at the specified documentPath and persists it. Sets the default access control group as the access control group for the document.

Parameters:
documentPath - The path at which the new document will be created, including the file name.
Returns:
The newly created empty document
Throws:
PIMInternalException - If an internal error occurred.
PIMAuthorizationException - Reserved for future use.
java.lang.IllegalArgumentException - If the documentPath is empty or null.

createAndPersistDocument

Document createAndPersistDocument(java.lang.String documentPath,
                                  AccessControlGroup accessControlGroup)
Creates an empty document at the specified documentPath and sets the given access control group for the document. Persists the document.

Parameters:
documentPath - The path at which the new document will be created, including the file name.
accessControlGroup - The accessControlGroup for the document.
Returns:
The newly created empty document
Throws:
PIMInternalException - If an internal error occurred.
PIMAuthorizationException - Reserved for future use.
java.lang.IllegalArgumentException - If the documentPath is empty or null or accessControlGroup is null
java.lang.IllegalStateException - If the access control group has not been persisted

getDocument

Document getDocument(java.lang.String documentPath)
Fetches the document which exists at the given documentPath.

Parameters:
documentPath - The path of the document, including the file name.
Returns:
The document in the given documentPath. Returns null if a document is not present at the given documentPath.
Throws:
PIMInternalException - If an internal error occurred.
PIMAuthorizationException - If the user does not have the equivalent of Permission.DOCSTORE_VIEW_FILES
java.lang.IllegalArgumentException - If the documentPath is empty or null

getDocument

Document getDocument(java.lang.String documentPath,
                     boolean forceSync)
Fetches the document which exists at the given documentPath.

Parameters:
documentPath - The path of the document, including the file name.
forceSync - When forceSync is true, a document is created in the docstore if it is present in the file system.
Returns:
A Document object. Returns null if a document is not present at the given documentPath.
Throws:
PIMInternalException - If an internal error occurred.
PIMAuthorizationException - If the user does not have the equivalent of Permission.DOCSTORE_VIEW_FILES
java.lang.IllegalArgumentException - If the documentPath is empty or null

getRootDirectory

Directory getRootDirectory()
Fetches the root directory of the docstore. Helps in navigating through the docstore.

Returns:
The directory corresponding to the root of the docstore. Equivalent to calling getDirectory("/")
Throws:
PIMInternalException - If an internal error occurred.
PIMAuthorizationException - Reserved for future use.

getDirectory

Directory getDirectory(java.lang.String directoryPath)
Fetches the directory at the given directoryPath.

Parameters:
directoryPath - The path of a directory in the docstore. Ends with a slash.
Returns:
The directory at the specified path. Returns null if a directory is not present at the given directoryPath.
Throws:
PIMInternalException - If an internal error occurred.
PIMAuthorizationException - Reserved for future use.
java.lang.IllegalArgumentException - If the directoryPath is empty or null.