org.apache.chemistry.opencmis.jcr
Class JcrFolder

java.lang.Object
  extended by org.apache.chemistry.opencmis.jcr.JcrNode
      extended by org.apache.chemistry.opencmis.jcr.JcrFolder

public class JcrFolder
extends JcrNode

Instances of this class represent a cmis:folder backed by an underlying JCR Node.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.chemistry.opencmis.jcr.JcrNode
JcrNode.PropertyUpdater
 
Field Summary
 
Fields inherited from class org.apache.chemistry.opencmis.jcr.JcrNode
DATE_UNKNOWN, pathManager, typeManager, USER_UNKNOWN
 
Constructor Summary
JcrFolder(javax.jcr.Node node, JcrTypeManager typeManager, PathManager pathManager, JcrNodeFactory nodeFactory)
           
 
Method Summary
 JcrNode addFolder(java.lang.String name, java.lang.String typeId, Properties properties)
          See CMIS 1.0 section 2.2.4.3 createFolder
 JcrNode addNode(java.lang.String name, java.lang.String typeId, Properties properties, ContentStream contentStream, VersioningState versioningState)
          See CMIS 1.0 section 2.2.4.1 createDocument
 JcrNode addNodeFromSource(JcrDocument source, Properties properties)
          See CMIS 1.0 section 2.2.4.2 createDocumentFromSource
protected  java.util.Set<Action> compileAllowableActions(java.util.Set<Action> aas)
          Compile the allowed actions on the CMIS object represented by this instance See CMIS 1.0 section 2.2.4.6 getAllowableActions
protected  void compileProperties(PropertiesImpl properties, java.util.Set<java.lang.String> filter, ObjectInfoImpl objectInfo)
          Compile the properties of the CMIS object represented by this instance.
 void delete(boolean allVersions, boolean isPwc)
          See CMIS 1.0 section 2.2.4.14 deleteObject
 FailedToDeleteDataImpl deleteTree()
          See CMIS 1.0 section 2.2.4.15 deleteTree
protected  BaseTypeId getBaseTypeId()
           
protected  javax.jcr.Node getContextNode()
          Retrieve the context node of the CMIS object represented by this instance.
 java.util.Iterator<JcrNode> getNodes()
          See CMIS 1.0 section 2.2.3.1 getChildren
protected  java.lang.String getObjectId()
           
protected  java.lang.String getTypeIdInternal()
           
 
Methods inherited from class org.apache.chemistry.opencmis.jcr.JcrNode
addPropertyBoolean, addPropertyDateTime, addPropertyId, addPropertyInteger, addPropertyString, asDocument, asFolder, asVersion, checkAddProperty, compileObjectType, create, getAllowableActions, getBaseVersion, getChangeToken, getCreated, getCreatedBy, getId, getLastModified, getLastModifiedBy, getName, getNode, getNode, getNodeName, getParent, getPropertyLength, getPropertyOrElse, getPropertyOrElse, getTypeId, getVersionHistory, getVersionManager, getVersionSeriesId, isDocument, isFolder, isRoot, isVersionable, move, setAction, toString, updateProperties, updateProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JcrFolder

public JcrFolder(javax.jcr.Node node,
                 JcrTypeManager typeManager,
                 PathManager pathManager,
                 JcrNodeFactory nodeFactory)
Method Detail

getNodes

public java.util.Iterator<JcrNode> getNodes()
See CMIS 1.0 section 2.2.3.1 getChildren

Returns:
Iterator of JcrNode. Children which are created in the checked out state are left out from the iterator.
Throws:
CmisRuntimeException

addNode

public JcrNode addNode(java.lang.String name,
                       java.lang.String typeId,
                       Properties properties,
                       ContentStream contentStream,
                       VersioningState versioningState)
See CMIS 1.0 section 2.2.4.1 createDocument

Throws:
CmisStorageException

addNodeFromSource

public JcrNode addNodeFromSource(JcrDocument source,
                                 Properties properties)
See CMIS 1.0 section 2.2.4.2 createDocumentFromSource

Throws:
CmisStorageException

addFolder

public JcrNode addFolder(java.lang.String name,
                         java.lang.String typeId,
                         Properties properties)
See CMIS 1.0 section 2.2.4.3 createFolder

Throws:
CmisStorageException

delete

public void delete(boolean allVersions,
                   boolean isPwc)
See CMIS 1.0 section 2.2.4.14 deleteObject

Overrides:
delete in class JcrNode
Throws:
CmisRuntimeException

deleteTree

public FailedToDeleteDataImpl deleteTree()
See CMIS 1.0 section 2.2.4.15 deleteTree


compileProperties

protected void compileProperties(PropertiesImpl properties,
                                 java.util.Set<java.lang.String> filter,
                                 ObjectInfoImpl objectInfo)
                          throws javax.jcr.RepositoryException
Description copied from class: JcrNode
Compile the properties of the CMIS object represented by this instance. See CMIS 1.0 section 2.2.4.7 getObject

Overrides:
compileProperties in class JcrNode
Parameters:
properties - compilation of properties
Throws:
javax.jcr.RepositoryException

compileAllowableActions

protected java.util.Set<Action> compileAllowableActions(java.util.Set<Action> aas)
Description copied from class: JcrNode
Compile the allowed actions on the CMIS object represented by this instance See CMIS 1.0 section 2.2.4.6 getAllowableActions

Overrides:
compileAllowableActions in class JcrNode
Parameters:
aas - compilation of allowed actions
Returns:

getContextNode

protected javax.jcr.Node getContextNode()
Description copied from class: JcrNode
Retrieve the context node of the CMIS object represented by this instance. The context node is the node which is used to derive the common properties from (creation date, modification date, ...)

Specified by:
getContextNode in class JcrNode
Returns:
the context node

getObjectId

protected java.lang.String getObjectId()
                                throws javax.jcr.RepositoryException
Overrides:
getObjectId in class JcrNode
Returns:
the object id of the CMIS object represented by this instance
Throws:
javax.jcr.RepositoryException

getBaseTypeId

protected BaseTypeId getBaseTypeId()
Specified by:
getBaseTypeId in class JcrNode
Returns:
the value of the cmis:baseTypeId property

getTypeIdInternal

protected java.lang.String getTypeIdInternal()
Specified by:
getTypeIdInternal in class JcrNode
Returns:
the value of the cmis:objectTypeId property


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