com.ibm.pim.docstore
Interface Directory


public interface Directory

Interface representing a directory in the docstore.

Since:
6.0.0

Field Summary
static java.lang.String copyright
           
 
Method Summary
 Document getDocument(java.lang.String name)
          Fetches the document with the given name found under this directory.
 Document getDocument(java.lang.String name, boolean forceSync)
          Fetches the document with the given name found under this directory.
 PIMCollection<Document> getDocuments()
          Fetches a collection of all the documents on which the user has view permission in this directory
 java.lang.String getPath()
          Fetches the path of this directory in the docstore.
 java.util.Collection<Directory> getSubDirectories()
          Fetches a collection of directories which are present immediately under this directory
 

Field Detail

copyright

static final java.lang.String copyright
See Also:
Constant Field Values
Method Detail

getSubDirectories

java.util.Collection<Directory> getSubDirectories()
Fetches a collection of directories which are present immediately under this directory

Returns:
Collection of Directory objects, pertaining to directories under this directory
Throws:
PIMInternalException - If an internal error occurs.

getDocuments

PIMCollection<Document> getDocuments()
Fetches a collection of all the documents on which the user has view permission in this directory

Returns:
PIMCollection of Document objects, pertaining to documents under this directory.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use.

getDocument

Document getDocument(java.lang.String name)
Fetches the document with the given name found under this directory.

Parameters:
name - The name of the document to be fetched.
Returns:
The document with the given name. Returns null if a document with the given name is not present in this directory.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - If the user does not have the equivalent of Permission.DOCSTORE_VIEW_FILES
java.lang.IllegalArgumentException - If name is empty

getDocument

Document getDocument(java.lang.String name,
                     boolean forceSync)
Fetches the document with the given name found under this directory.

Parameters:
name - The name of the document to be fetched.
forceSync - When forceSync is true, a document is created in the docstore if it is present in the file system.
Returns:
The document with the given name. Returns null if a document with the given name is not present in this directory.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - If the user does not have the equivalent of Permission.DOCSTORE_VIEW_FILES
java.lang.IllegalArgumentException - If name is empty.

getPath

java.lang.String getPath()
Fetches the path of this directory in the docstore.

Returns:
A String giving the path of this directory in the docstore.
Throws:
PIMInternalException - If an internal error occurs.