org.apache.chemistry.opencmis.client.runtime
Class FolderImpl

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject
      extended by org.apache.chemistry.opencmis.client.runtime.AbstractFilableCmisObject
          extended by org.apache.chemistry.opencmis.client.runtime.FolderImpl
All Implemented Interfaces:
Serializable, CmisObject, CmisObjectProperties, FileableCmisObject, Folder, FolderProperties, ObjectId

public class FolderImpl
extends AbstractFilableCmisObject
implements Folder

See Also:
Serialized Form

Constructor Summary
FolderImpl(SessionImpl session, ObjectType objectType, ObjectData objectData, OperationContext context)
          Constructor.
 
Method Summary
 Document createDocument(Map<String,?> properties, ContentStream contentStream, VersioningState versioningState)
          Creates a new document in this folder.
 Document createDocument(Map<String,?> properties, ContentStream contentStream, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context)
          Creates a new document in this folder.
 Document createDocumentFromSource(ObjectId source, Map<String,?> properties, VersioningState versioningState)
          Creates a new document from a source document in this folder.
 Document createDocumentFromSource(ObjectId source, Map<String,?> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context)
          Creates a new document from a source document in this folder.
 Folder createFolder(Map<String,?> properties)
          Creates a new subfolder in this folder.
 Folder createFolder(Map<String,?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context)
          Creates a new subfolder in this folder.
 Policy createPolicy(Map<String,?> properties)
          Creates a new policy in this folder.
 Policy createPolicy(Map<String,?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context)
          Creates a new policy in this folder.
protected  TransientCmisObject createTransientCmisObject()
           
 List<String> deleteTree(boolean allVersions, UnfileObject unfile, boolean continueOnFailure)
          Deletes this folder and all subfolders.
 List<ObjectType> getAllowedChildObjectTypes()
          Returns the list of the allowed object types in this folder (CMIS property cmis:allowedChildObjectTypeIds).
 ItemIterable<Document> getCheckedOutDocs()
          Returns all checked out documents in this folder.
 ItemIterable<Document> getCheckedOutDocs(OperationContext context)
          Returns all checked out documents in this folder using the given OperationContext.
 ItemIterable<CmisObject> getChildren()
          Returns the children of this folder.
 ItemIterable<CmisObject> getChildren(OperationContext context)
          Returns the children of this folder using the given OperationContext.
 List<Tree<FileableCmisObject>> getDescendants(int depth)
          Gets the folder descendants starting with this folder.
 List<Tree<FileableCmisObject>> getDescendants(int depth, OperationContext context)
          Gets the folder descendants starting with this folder using the given OperationContext.
 Folder getFolderParent()
          Gets the parent folder object
 List<Tree<FileableCmisObject>> getFolderTree(int depth)
          Gets the folder tree starting with this folder.
 List<Tree<FileableCmisObject>> getFolderTree(int depth, OperationContext context)
          Gets the folder tree starting with this folder using the given OperationContext.
 String getParentId()
          Returns the parent id or null if the folder is ther root folder (CMIS property cmis:parentId).
 String getPath()
          Returns the path of the folder.
 List<String> getPaths()
          Returns the paths of this object.
 TransientFolder getTransientFolder()
           
 boolean isRootFolder()
          Returns if the folder is the root folder.
 
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractFilableCmisObject
addToFolder, getParents, move, removeFromFolder
 
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject
addAcl, applyAcl, applyPolicy, delete, getAcl, getAcl, getAdapter, getAllowableActions, getBaseType, getBaseTypeId, getBinding, getChangeToken, getCreatedBy, getCreationContext, getCreationDate, getExtensions, getId, getLastModificationDate, getLastModifiedBy, getName, getObjectFactory, getObjectId, getObjectType, getPolicies, getProperties, getProperty, getPropertyQueryName, getPropertyValue, getRefreshTimestamp, getRelationships, getRenditions, getRepositoryId, getSession, getTransientObject, getType, initialize, readLock, readUnlock, refresh, refreshIfOld, removeAcl, removePolicy, updateProperties, updateProperties, writeLock, writeUnlock
 
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.client.api.FileableCmisObject
addToFolder, getParents, move, removeFromFolder
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.CmisObject
addAcl, applyAcl, applyPolicy, delete, getAcl, getAdapter, getAllowableActions, getExtensions, getPolicies, getRefreshTimestamp, getRelationships, getRenditions, getTransientObject, refresh, refreshIfOld, removeAcl, removePolicy, updateProperties, updateProperties
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.ObjectId
getId
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getType
 

Constructor Detail

FolderImpl

public FolderImpl(SessionImpl session,
                  ObjectType objectType,
                  ObjectData objectData,
                  OperationContext context)
Constructor.

Method Detail

createTransientCmisObject

protected TransientCmisObject createTransientCmisObject()
Overrides:
createTransientCmisObject in class AbstractCmisObject

getTransientFolder

public TransientFolder getTransientFolder()
Specified by:
getTransientFolder in interface Folder

createDocument

public Document createDocument(Map<String,?> properties,
                               ContentStream contentStream,
                               VersioningState versioningState,
                               List<Policy> policies,
                               List<Ace> addAces,
                               List<Ace> removeAces,
                               OperationContext context)
Description copied from interface: Folder
Creates a new document in this folder.

Specified by:
createDocument in interface Folder
Returns:
the new document object or null if the parameter context was set to null

createDocumentFromSource

public Document createDocumentFromSource(ObjectId source,
                                         Map<String,?> properties,
                                         VersioningState versioningState,
                                         List<Policy> policies,
                                         List<Ace> addAces,
                                         List<Ace> removeAces,
                                         OperationContext context)
Description copied from interface: Folder
Creates a new document from a source document in this folder.

Specified by:
createDocumentFromSource in interface Folder
Returns:
the new document object or null if the parameter context was set to null

createFolder

public Folder createFolder(Map<String,?> properties,
                           List<Policy> policies,
                           List<Ace> addAces,
                           List<Ace> removeAces,
                           OperationContext context)
Description copied from interface: Folder
Creates a new subfolder in this folder.

Specified by:
createFolder in interface Folder
Returns:
the new folder object or null if the parameter context was set to null

createPolicy

public Policy createPolicy(Map<String,?> properties,
                           List<Policy> policies,
                           List<Ace> addAces,
                           List<Ace> removeAces,
                           OperationContext context)
Description copied from interface: Folder
Creates a new policy in this folder.

Specified by:
createPolicy in interface Folder
Returns:
the new policy object or null if the parameter context was set to null

deleteTree

public List<String> deleteTree(boolean allVersions,
                               UnfileObject unfile,
                               boolean continueOnFailure)
Description copied from interface: Folder
Deletes this folder and all subfolders.

Specified by:
deleteTree in interface Folder
Returns:
a list of object ids which failed to be deleted

getParentId

public String getParentId()
Description copied from interface: FolderProperties
Returns the parent id or null if the folder is ther root folder (CMIS property cmis:parentId).

Specified by:
getParentId in interface FolderProperties

getAllowedChildObjectTypes

public List<ObjectType> getAllowedChildObjectTypes()
Description copied from interface: FolderProperties
Returns the list of the allowed object types in this folder (CMIS property cmis:allowedChildObjectTypeIds). If the list is empty or null all object types are allowed.

Specified by:
getAllowedChildObjectTypes in interface FolderProperties

getCheckedOutDocs

public ItemIterable<Document> getCheckedOutDocs()
Description copied from interface: Folder
Returns all checked out documents in this folder.

Specified by:
getCheckedOutDocs in interface Folder

getCheckedOutDocs

public ItemIterable<Document> getCheckedOutDocs(OperationContext context)
Description copied from interface: Folder
Returns all checked out documents in this folder using the given OperationContext.

Specified by:
getCheckedOutDocs in interface Folder

getChildren

public ItemIterable<CmisObject> getChildren()
Description copied from interface: Folder
Returns the children of this folder.

Specified by:
getChildren in interface Folder

getChildren

public ItemIterable<CmisObject> getChildren(OperationContext context)
Description copied from interface: Folder
Returns the children of this folder using the given OperationContext.

Specified by:
getChildren in interface Folder

getDescendants

public List<Tree<FileableCmisObject>> getDescendants(int depth)
Description copied from interface: Folder
Gets the folder descendants starting with this folder.

Specified by:
getDescendants in interface Folder

getDescendants

public List<Tree<FileableCmisObject>> getDescendants(int depth,
                                                     OperationContext context)
Description copied from interface: Folder
Gets the folder descendants starting with this folder using the given OperationContext.

Specified by:
getDescendants in interface Folder

getFolderTree

public List<Tree<FileableCmisObject>> getFolderTree(int depth)
Description copied from interface: Folder
Gets the folder tree starting with this folder.

Specified by:
getFolderTree in interface Folder

getFolderTree

public List<Tree<FileableCmisObject>> getFolderTree(int depth,
                                                    OperationContext context)
Description copied from interface: Folder
Gets the folder tree starting with this folder using the given OperationContext.

Specified by:
getFolderTree in interface Folder

isRootFolder

public boolean isRootFolder()
Description copied from interface: Folder
Returns if the folder is the root folder.

Specified by:
isRootFolder in interface Folder

getFolderParent

public Folder getFolderParent()
Description copied from interface: Folder
Gets the parent folder object

Specified by:
getFolderParent in interface Folder
Returns:
the parent folder object or null if the folder is the root folder.

getPath

public String getPath()
Description copied from interface: Folder
Returns the path of the folder.

Specified by:
getPath in interface Folder

getPaths

public List<String> getPaths()
Description copied from interface: FileableCmisObject
Returns the paths of this object.

Specified by:
getPaths in interface FileableCmisObject
Overrides:
getPaths in class AbstractFilableCmisObject

createDocument

public Document createDocument(Map<String,?> properties,
                               ContentStream contentStream,
                               VersioningState versioningState)
Description copied from interface: Folder
Creates a new document in this folder.

Specified by:
createDocument in interface Folder
Returns:
the new document object

createDocumentFromSource

public Document createDocumentFromSource(ObjectId source,
                                         Map<String,?> properties,
                                         VersioningState versioningState)
Description copied from interface: Folder
Creates a new document from a source document in this folder.

Specified by:
createDocumentFromSource in interface Folder
Returns:
the new document object

createFolder

public Folder createFolder(Map<String,?> properties)
Description copied from interface: Folder
Creates a new subfolder in this folder.

Specified by:
createFolder in interface Folder
Returns:
the new folder object

createPolicy

public Policy createPolicy(Map<String,?> properties)
Description copied from interface: Folder
Creates a new policy in this folder.

Specified by:
createPolicy in interface Folder
Returns:
the new policy object


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