org.apache.chemistry.opencmis.inmemory.storedobj.impl
Class FolderImpl

java.lang.Object
  extended by org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
      extended by org.apache.chemistry.opencmis.inmemory.storedobj.impl.AbstractSingleFilingImpl
          extended by org.apache.chemistry.opencmis.inmemory.storedobj.impl.FolderImpl
All Implemented Interfaces:
Children, Filing, Folder, SingleFiling, StoredObject

public class FolderImpl
extends AbstractSingleFilingImpl
implements Folder


Field Summary
 
Fields inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.AbstractSingleFilingImpl
fParent
 
Fields inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
fCreatedAt, fCreatedBy, fId, fModifiedAt, fModifiedBy, fName, fObjStore, fProperties, fRepositoryId, fTypeId
 
Fields inherited from interface org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing
PATH_SEPARATOR
 
Constructor Summary
FolderImpl(ObjectStoreImpl objStore, String name, Folder parent)
           
 
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.
 void fillProperties(Map<String,PropertyData<?>> properties, BindingsObjectFactory objFactory, List<String> requestedIds)
           
 List<String> getAllowedChildObjectTypeIds()
          return a list of allowed types of children in this 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
 void moveChildDocument(StoredObject so, Folder oldParent, Folder newParent)
           
 
Methods inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.AbstractSingleFilingImpl
getParent, getParents, getPath, hasParent, move, rename, setParent
 
Methods inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
createSystemBasePropertiesWhenCreated, getChangeToken, getCreatedAt, getCreatedBy, getId, getModifiedAt, getModifiedBy, getName, getProperties, getRepositoryId, getTypeId, persist, setCreatedAt, setCreatedBy, setCustomProperties, setModifiedAtNow, setModifiedBy, setName, setProperties, setRepositoryId, setSystemBasePropertiesWhenCreatedDirect, setTypeId, updateSystemBasePropertiesWhenModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.chemistry.opencmis.inmemory.storedobj.api.SingleFiling
getParent, getPath, setParent
 
Methods inherited from interface org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing
getParents, hasParent, move
 
Methods inherited from interface org.apache.chemistry.opencmis.inmemory.storedobj.api.StoredObject
createSystemBasePropertiesWhenCreated, getChangeToken, getCreatedAt, getCreatedBy, getId, getModifiedAt, getModifiedBy, getName, getProperties, getRepositoryId, getTypeId, persist, rename, setCreatedAt, setCreatedBy, setCustomProperties, setModifiedAtNow, setModifiedBy, setName, setProperties, setRepositoryId, setTypeId, updateSystemBasePropertiesWhenModified
 

Constructor Detail

FolderImpl

public FolderImpl(ObjectStoreImpl objStore,
                  String name,
                  Folder parent)
Method Detail

addChildFolder

public void addChildFolder(Folder folder)
Description copied from interface: Children
Create a subfolder in an existing folder. This call persists parent and child folder as transactional step.

Specified by:
addChildFolder in interface Children
Parameters:
folder - new child folder

addChildDocument

public void addChildDocument(Document doc)
Description copied from interface: Children
Add a document to a folder. This call persists the folder and the document as a transactional step.

Specified by:
addChildDocument in interface Children
Parameters:
doc - document to be added

addChildDocument

public void addChildDocument(VersionedDocument doc)
Description copied from interface: Children
Add a versioned document to a folder. This call persists the folder and the document as a transactional step.

Specified by:
addChildDocument in interface Children
Parameters:
doc - document to be added

getChildren

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

Specified by:
getChildren in interface Children
Parameters:
maxItems - max. number of items to return
skipCount - initial offset where to start fetching
Returns:
list of children objects

getFolderChildren

public List<Folder> getFolderChildren(int maxItems,
                                      int skipCount)
Description copied from interface: Children
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.

Specified by:
getFolderChildren in interface Children
Parameters:
maxItems - max. number of items to return
skipCount - initial offset where to start fetching
Returns:
list of children folders

hasChild

public boolean hasChild(String name)
Description copied from interface: Children
indicate if a child with the given name exists in this folder

Specified by:
hasChild in interface Children
Parameters:
name - name to check
Returns:
true if the name exists in the folderas child, false otherwise

fillProperties

public void fillProperties(Map<String,PropertyData<?>> properties,
                           BindingsObjectFactory objFactory,
                           List<String> requestedIds)
Specified by:
fillProperties in interface StoredObject
Overrides:
fillProperties in class StoredObjectImpl

moveChildDocument

public void moveChildDocument(StoredObject so,
                              Folder oldParent,
                              Folder newParent)

getAllowedChildObjectTypeIds

public List<String> getAllowedChildObjectTypeIds()
Description copied from interface: Folder
return a list of allowed types of children in this folder

Specified by:
getAllowedChildObjectTypeIds in interface Folder
Returns:


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