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.


Field Summary
static String MIME_UNKNOWN
           
 
Fields inherited from class org.apache.chemistry.opencmis.jcr.JcrNode
DATE_UNKNOWN, pathManager, typeManager, USER_UNKNOWN
 
Constructor Summary
JcrDocument(javax.jcr.Node node, TypeManager typeManager, PathManager pathManager, JcrNodeFactory nodeFactory)
           
 
Method Summary
protected  Set<Action> compileAllowableActions(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(org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertiesImpl properties, Set<String> filter, org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl objectInfo)
          Compile the properties of the CMIS object represented by this instance.
protected  BaseTypeId getBaseTypeId()
           
protected abstract  String getCheckedOutBy()
           
protected abstract  String getCheckedOutId()
           
protected abstract  String getCheckInComment()
           
 ContentStream getContentStream()
          See CMIS 1.0 section 2.2.4.10 getContentStream
protected  boolean getIsImmutable()
           
protected abstract  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 String MIME_UNKNOWN
See Also:
Constant Field Values
Constructor Detail

JcrDocument

public JcrDocument(javax.jcr.Node node,
                   TypeManager 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 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 String getCheckedOutId()
                                   throws javax.jcr.RepositoryException
Returns:
the value of the cmis:versionSeriesCheckedOutId property
Throws:
javax.jcr.RepositoryException

getCheckedOutBy

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

getCheckInComment

protected abstract 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(org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertiesImpl properties,
                                 Set<String> filter,
                                 org.apache.chemistry.opencmis.commons.impl.server.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 Set<Action> compileAllowableActions(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.