org.apache.chemistry.opencmis.inmemory.storedobj.api
Interface Children

All Known Subinterfaces:
Folder
All Known Implementing Classes:
FolderImpl

public interface Children

A folder is a StoredObject that that has a path and children. Children can be folder or documents

Author:
Jens

Method Summary
 void addChildDocument(Document doc)
          Add a document to a folder.
 void addChildDocument(VersionedDocument doc)
          Add a versioned document to a folder.
 void addChildFolder(Folder folder)
          Create a subfolder in an existing folder.
 List<StoredObject> getChildren(int maxItems, int skipCount)
          get all the children of this folder.
 List<Folder> getFolderChildren(int maxItems, int skipCount)
          get all the children of this folder which are folders.
 boolean hasChild(String name)
          indicate if a child with the given name exists in this folder
 

Method Detail

addChildFolder

void addChildFolder(Folder folder)
Create a subfolder in an existing folder. This call persists parent and child folder as transactional step.

Parameters:
folder - new child folder

addChildDocument

void addChildDocument(Document doc)
Add a document to a folder. This call persists the folder and the document as a transactional step.

Parameters:
doc - document to be added

addChildDocument

void addChildDocument(VersionedDocument doc)
Add a versioned document to a folder. This call persists the folder and the document as a transactional step.

Parameters:
doc - document to be added

getChildren

List<StoredObject> getChildren(int maxItems,
                               int skipCount)
get all the children of this folder. To support paging an initial offset and a maximum number of children to retrieve can be passed

Parameters:
maxItems - max. number of items to return
skipCount - initial offset where to start fetching
Returns:
list of children objects

getFolderChildren

List<Folder> getFolderChildren(int maxItems,
                               int skipCount)
get all the children of this folder which are folders. To support paging an initial offset and a maximum number of childrent to retrieve can be passed.

Parameters:
maxItems - max. number of items to return
skipCount - initial offset where to start fetching
Returns:
list of children folders

hasChild

boolean hasChild(String name)
indicate if a child with the given name exists in this folder

Parameters:
name - name to check
Returns:
true if the name exists in the folderas child, false otherwise


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.