org.apache.chemistry.opencmis.jcr
Class JcrDocument

java.lang.Object
  extended by org.apache.chemistry.opencmis.jcr.JcrNode
      extended by org.apache.chemistry.opencmis.jcr.JcrDocument
Direct Known Subclasses:
JcrUnversionedDocument, JcrVersionBase

public abstract class JcrDocument
extends JcrNode

Instances of this class represent a cmis:document 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
static java.lang.String MIME_UNKNOWN
           
 
Fields inherited from class org.apache.chemistry.opencmis.jcr.JcrNode
DATE_UNKNOWN, pathManager, typeManager, USER_UNKNOWN
 
Constructor Summary
protected JcrDocument(javax.jcr.Node node, JcrTypeManager typeManager, PathManager pathManager, JcrNodeFactory nodeFactory)
           
 
Method Summary
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.
protected  BaseTypeId getBaseTypeId()
           
protected abstract  java.lang.String getCheckedOutBy()
           
protected abstract  java.lang.String getCheckedOutId()
           
protected abstract  java.lang.String getCheckInComment()
           
 ContentStream getContentStream()
          See CMIS 1.0 section 2.2.4.10 getContentStream
protected  boolean getIsImmutable()
           
protected abstract  java.lang.String getVersionLabel()
           
protected abstract  boolean isCheckedOut()
           
 boolean isDocumentCheckedOut()
           
protected abstract  boolean isLatestMajorVersion()
           
protected abstract  boolean isLatestVersion()
           
protected abstract  boolean isMajorVersion()
           
 JcrNode setContentStream(ContentStream contentStream, boolean overwriteFlag)
          See CMIS 1.0 section 2.2.4.16 setContentStream
 
Methods inherited from class org.apache.chemistry.opencmis.jcr.JcrNode
addPropertyBoolean, addPropertyDateTime, addPropertyId, addPropertyInteger, addPropertyString, asDocument, asFolder, asVersion, checkAddProperty, compileObjectType, create, delete, getAllowableActions, getBaseVersion, getChangeToken, getContextNode, getCreated, getCreatedBy, getId, getLastModified, getLastModifiedBy, getName, getNode, getNode, getNodeName, getObjectId, getParent, getPropertyLength, getPropertyOrElse, getPropertyOrElse, getTypeId, getTypeIdInternal, 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
 

Field Detail

MIME_UNKNOWN

public static final java.lang.String MIME_UNKNOWN
See Also:
Constant Field Values
Constructor Detail

JcrDocument

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

isDocumentCheckedOut

public boolean isDocumentCheckedOut()
Returns:
true iff the document is checked out

getContentStream

public ContentStream getContentStream()
See CMIS 1.0 section 2.2.4.10 getContentStream

Throws:
CmisObjectNotFoundException
CmisRuntimeException

setContentStream

public JcrNode setContentStream(ContentStream contentStream,
                                boolean overwriteFlag)
See CMIS 1.0 section 2.2.4.16 setContentStream

Throws:
CmisStorageException

isLatestVersion

protected abstract boolean isLatestVersion()
                                    throws javax.jcr.RepositoryException
Returns:
the value of the cmis:isLatestVersion property
Throws:
javax.jcr.RepositoryException

isMajorVersion

protected abstract boolean isMajorVersion()
                                   throws javax.jcr.RepositoryException
Returns:
the value of the cmis:isMajorVersion property
Throws:
javax.jcr.RepositoryException

isLatestMajorVersion

protected abstract boolean isLatestMajorVersion()
                                         throws javax.jcr.RepositoryException
Returns:
the value of the cmis:isLatestMajorVersion property
Throws:
javax.jcr.RepositoryException

getVersionLabel

protected abstract java.lang.String getVersionLabel()
                                             throws javax.jcr.RepositoryException
Returns:
the value of the cmis:versionLabel property
Throws:
javax.jcr.RepositoryException

isCheckedOut

protected abstract boolean isCheckedOut()
                                 throws javax.jcr.RepositoryException
Returns:
the value of the cmis:isVersionSeriesCheckedOut property
Throws:
javax.jcr.RepositoryException

getCheckedOutId

protected abstract java.lang.String getCheckedOutId()
                                             throws javax.jcr.RepositoryException
Returns:
the value of the cmis:versionSeriesCheckedOutId property
Throws:
javax.jcr.RepositoryException

getCheckedOutBy

protected abstract java.lang.String getCheckedOutBy()
                                             throws javax.jcr.RepositoryException
Returns:
the value of the cmis:versionSeriesCheckedOutBy property
Throws:
javax.jcr.RepositoryException

getCheckInComment

protected abstract java.lang.String getCheckInComment()
                                               throws javax.jcr.RepositoryException
Returns:
the value of the cmis:checkinComment property
Throws:
javax.jcr.RepositoryException

getIsImmutable

protected boolean getIsImmutable()

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:

getBaseTypeId

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


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