org.eclipse.stardust.engine.api.runtime
Interface Folder

All Superinterfaces:
FolderInfo, Resource, ResourceInfo, Serializable

public interface Folder
extends FolderInfo, Resource

The Folder interface represents an existing JCR folder.

Version:
$Revision$
Author:
rsauer

Field Summary
static int LOD_LIST_MEMBERS
          level depth 1 - folder with documents and bare sub folders.
Use this if you want to get the documents in a folder and the folder objects contained in the requested folder.
static int LOD_LIST_MEMBERS_OF_MEMBERS
          level depth 2 - folder with documents and subfolders with contents, but sub folders NOT recursively.
Use this if you to have the contained folders and documents of the sub folders.
static int LOD_NO_MEMBERS
          level depth 0 - empty sub folder and no documents, just the bare folder object.
Use this for best performance if the folder itself is required not its contained documents or subfolders.
 
Method Summary
 int getDocumentCount()
          Gets the number of documents contained in this folder.
 List<Document> getDocuments()
          Gets the documents contained in this folder.
 int getFolderCount()
          Gets the number of subfolders contained in this folder.
 List<Folder> getFolders()
          Gets the subfolders contained in this folder.
 int getLevelOfDetail()
          Gets the level of detail of information contained in the Folder object.
 
Methods inherited from interface org.eclipse.stardust.engine.api.runtime.Resource
getId, getPath, getRepositoryId
 
Methods inherited from interface org.eclipse.stardust.engine.api.runtime.ResourceInfo
getDateCreated, getDateLastModified, getDescription, getName, getOwner, getProperties, getProperty, setDescription, setName, setOwner, setProperties, setProperty
 

Field Detail

LOD_NO_MEMBERS

static final int LOD_NO_MEMBERS
level depth 0 - empty sub folder and no documents, just the bare folder object.
Use this for best performance if the folder itself is required not its contained documents or subfolders.

If level of detail is set to LOD_NO_MEMBERS, the Folder object contains neither its document nor subfolder information.

See Also:
Constant Field Values

LOD_LIST_MEMBERS

static final int LOD_LIST_MEMBERS
level depth 1 - folder with documents and bare sub folders.
Use this if you want to get the documents in a folder and the folder objects contained in the requested folder.

If level of detail is set to LOD_LIST_MEMBERS, the Folder object contains both its document and subfolder without their document and subfolder information

See Also:
Constant Field Values

LOD_LIST_MEMBERS_OF_MEMBERS

static final int LOD_LIST_MEMBERS_OF_MEMBERS
level depth 2 - folder with documents and subfolders with contents, but sub folders NOT recursively.
Use this if you to have the contained folders and documents of the sub folders. This is just one more depth level than LOD_LIST_MEMBERS not the whole folder tree.

If level of detail is set to LOD_LIST_MEMBERS_OF_MEMBERS, the Folder object contains both its document and subfolder with their document and subfolder information

See Also:
Constant Field Values
Method Detail

getLevelOfDetail

int getLevelOfDetail()
Gets the level of detail of information contained in the Folder object.

Returns:
one of LOD_NO_MEMBERS, LOD_LIST_MEMBERS or LOD_LIST_MEMBERS_OF_MEMBERS.

getDocumentCount

int getDocumentCount()
Gets the number of documents contained in this folder. The information returned may be different depending on the level of detail.

Returns:
the number of documents contained in this folder.

getDocuments

List<Document> getDocuments()
Gets the documents contained in this folder. The information returned may be different depending on the level of detail. Use DocumentManagementService.createDocument(String, DocumentInfo) to add documents to this folder.

Returns:
the documents contained in this folder. This list is unmodifiable.

getFolderCount

int getFolderCount()
Gets the number of subfolders contained in this folder. The information returned may be different depending on the level of detail.

Returns:
the number of subfolders contained in this folder.

getFolders

List<Folder> getFolders()
Gets the subfolders contained in this folder. The information returned may be different depending on the level of detail. Use DocumentManagementService.createFolder(String, FolderInfo) to add subfolders to this folder.

Returns:
the subfolders contained in this folder. This list is unmodifiable.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.