org.xcmis.sp.jcr.exo
Class DocumentVersion

java.lang.Object
  extended by org.xcmis.sp.jcr.exo.DocumentVersion
All Implemented Interfaces:
DocumentData, ObjectData

public class DocumentVersion
extends Object

Version:
$Id: $
Author:
Andrey Parfonov

Field Summary
protected static Set<String> CHECKOUT_SKIP
           
protected  IndexListener indexListener
           
protected  org.xcmis.sp.jcr.exo.JcrNodeEntry jcrEntry
           
protected  RenditionManager renditionManager
           
 
Constructor Summary
DocumentVersion(org.xcmis.sp.jcr.exo.JcrNodeEntry jcrEntry, IndexListener indexListener, RenditionManager renditionManager)
           
 
Method Summary
 void accept(ObjectDataVisitor visitor)
          
 void applyPolicy(PolicyData policy)
          
 void cancelCheckout()
          
 DocumentData checkin(boolean major, String checkinComment, Map<String,Property<?>> properties, ContentStream content, List<AccessControlEntry> acl, Collection<PolicyData> policies)
          
 DocumentData checkout()
          
protected  void delete()
          
protected  Property<?> doGetProperty(PropertyDefinition<?> definition)
           
protected  void doSetProperty(Property<?> property)
          Update properties, skip on-create and read-only properties
 boolean equals(Object obj)
           
 List<AccessControlEntry> getACL(boolean onlyBasicPermissions)
          
 BaseType getBaseType()
          
 String getChangeToken()
          
 ContentStream getContentStream()
          
 ContentStream getContentStream(String streamId)
          
protected  long getContentStreamLength()
           
 String getContentStreamMimeType()
          
 String getCreatedBy()
          
 Calendar getCreationDate()
          
 Calendar getLastModificationDate()
          
 String getLastModifiedBy()
          
 String getName()
          
 String getObjectId()
          
 FolderData getParent()
          
 Collection<FolderData> getParents()
          
 Collection<PolicyData> getPolicies()
          
 Map<String,Property<?>> getProperties()
          
 Map<String,Property<?>> getProperties(PropertyFilter filter)
          
 Property<?> getProperty(String id)
          
 ItemsIterator<RelationshipData> getRelationships(RelationshipDirection direction, TypeDefinition type, boolean includeSubRelationshipTypes)
          
 TypeDefinition getTypeDefinition()
          
 String getTypeId()
          
 String getVersionLabel()
          
 String getVersionSeriesCheckedOutBy()
          
 String getVersionSeriesCheckedOutId()
          
 String getVersionSeriesId()
          
 boolean hasContent()
          
 int hashCode()
           
 boolean isLatestMajorVersion()
          
 boolean isLatestVersion()
          
 boolean isMajorVersion()
          
 boolean isPWC()
          
 boolean isVersionSeriesCheckedOut()
          
 void removePolicy(PolicyData policy)
          
protected  void save()
          
 void setACL(List<AccessControlEntry> aces)
          
 void setContentStream(ContentStream contentStream)
          
 void setProperties(Map<String,Property<?>> properties)
          
 void setProperty(Property<?> property)
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xcmis.spi.ObjectData
accept, getBaseType, getChangeToken, getCreatedBy, getCreationDate, getLastModificationDate, getLastModifiedBy, getObjectId, getProperties, getProperties, getProperty, getTypeDefinition, getTypeId
 

Field Detail

CHECKOUT_SKIP

protected static final Set<String> CHECKOUT_SKIP

renditionManager

protected final RenditionManager renditionManager

indexListener

protected IndexListener indexListener

jcrEntry

protected org.xcmis.sp.jcr.exo.JcrNodeEntry jcrEntry
Constructor Detail

DocumentVersion

public DocumentVersion(org.xcmis.sp.jcr.exo.JcrNodeEntry jcrEntry,
                       IndexListener indexListener,
                       RenditionManager renditionManager)
Method Detail

applyPolicy

public void applyPolicy(PolicyData policy)

Specified by:
applyPolicy in interface ObjectData

cancelCheckout

public void cancelCheckout()
                    throws VersioningException,
                           StorageException

Specified by:
cancelCheckout in interface DocumentData
Throws:
VersioningException
StorageException

checkin

public DocumentData checkin(boolean major,
                            String checkinComment,
                            Map<String,Property<?>> properties,
                            ContentStream content,
                            List<AccessControlEntry> acl,
                            Collection<PolicyData> policies)
                     throws StorageException

Specified by:
checkin in interface DocumentData
Throws:
StorageException

checkout

public DocumentData checkout()
                      throws VersioningException,
                             StorageException

Specified by:
checkout in interface DocumentData
Throws:
VersioningException
StorageException

getACL

public List<AccessControlEntry> getACL(boolean onlyBasicPermissions)

Specified by:
getACL in interface ObjectData

getName

public String getName()

Specified by:
getName in interface ObjectData

getParent

public FolderData getParent()
                     throws ConstraintException

Specified by:
getParent in interface ObjectData
Throws:
ConstraintException

getParents

public Collection<FolderData> getParents()

Specified by:
getParents in interface ObjectData

getPolicies

public Collection<PolicyData> getPolicies()

Specified by:
getPolicies in interface ObjectData

getRelationships

public ItemsIterator<RelationshipData> getRelationships(RelationshipDirection direction,
                                                        TypeDefinition type,
                                                        boolean includeSubRelationshipTypes)

Specified by:
getRelationships in interface ObjectData

getVersionLabel

public String getVersionLabel()

Specified by:
getVersionLabel in interface DocumentData

getVersionSeriesCheckedOutBy

public String getVersionSeriesCheckedOutBy()

Specified by:
getVersionSeriesCheckedOutBy in interface DocumentData

getVersionSeriesCheckedOutId

public String getVersionSeriesCheckedOutId()

Specified by:
getVersionSeriesCheckedOutId in interface DocumentData

isLatestVersion

public boolean isLatestVersion()

Specified by:
isLatestVersion in interface DocumentData

removePolicy

public void removePolicy(PolicyData policy)

Specified by:
removePolicy in interface ObjectData

setACL

public void setACL(List<AccessControlEntry> aces)

Specified by:
setACL in interface ObjectData

setContentStream

public void setContentStream(ContentStream contentStream)
                      throws IOException,
                             VersioningException,
                             StorageException

Specified by:
setContentStream in interface DocumentData
Throws:
IOException
VersioningException
StorageException

setProperties

public void setProperties(Map<String,Property<?>> properties)
                   throws NameConstraintViolationException,
                          VersioningException

Specified by:
setProperties in interface ObjectData
Throws:
NameConstraintViolationException
VersioningException

setProperty

public void setProperty(Property<?> property)
                 throws VersioningException

Specified by:
setProperty in interface ObjectData
Throws:
VersioningException

delete

protected void delete()
               throws StorageException

Throws:
StorageException

save

protected void save()


getContentStream

public ContentStream getContentStream()
                               throws IOException

Specified by:
getContentStream in interface DocumentData
Throws:
IOException

getContentStream

public ContentStream getContentStream(String streamId)
                               throws IOException

Specified by:
getContentStream in interface ObjectData
Throws:
IOException

getContentStreamMimeType

public String getContentStreamMimeType()

Specified by:
getContentStreamMimeType in interface DocumentData

getVersionSeriesId

public String getVersionSeriesId()

Specified by:
getVersionSeriesId in interface DocumentData

hasContent

public boolean hasContent()

Specified by:
hasContent in interface DocumentData

isLatestMajorVersion

public boolean isLatestMajorVersion()

Specified by:
isLatestMajorVersion in interface DocumentData

isMajorVersion

public boolean isMajorVersion()

Specified by:
isMajorVersion in interface DocumentData

isPWC

public boolean isPWC()

Specified by:
isPWC in interface DocumentData

isVersionSeriesCheckedOut

public boolean isVersionSeriesCheckedOut()

Specified by:
isVersionSeriesCheckedOut in interface DocumentData

getContentStreamLength

protected long getContentStreamLength()
Returns:
length of content in bytes

accept

public void accept(ObjectDataVisitor visitor)

Specified by:
accept in interface ObjectData

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getBaseType

public BaseType getBaseType()

Specified by:
getBaseType in interface ObjectData

getChangeToken

public String getChangeToken()

Specified by:
getChangeToken in interface ObjectData

getCreatedBy

public String getCreatedBy()

Specified by:
getCreatedBy in interface ObjectData

getCreationDate

public Calendar getCreationDate()

Specified by:
getCreationDate in interface ObjectData

getLastModificationDate

public Calendar getLastModificationDate()

Specified by:
getLastModificationDate in interface ObjectData

getLastModifiedBy

public String getLastModifiedBy()

Specified by:
getLastModifiedBy in interface ObjectData

getObjectId

public String getObjectId()

Specified by:
getObjectId in interface ObjectData

getProperties

public Map<String,Property<?>> getProperties()

Specified by:
getProperties in interface ObjectData

getProperties

public Map<String,Property<?>> getProperties(PropertyFilter filter)

Specified by:
getProperties in interface ObjectData

getProperty

public Property<?> getProperty(String id)

Specified by:
getProperty in interface ObjectData

getTypeDefinition

public TypeDefinition getTypeDefinition()

Specified by:
getTypeDefinition in interface ObjectData

getTypeId

public String getTypeId()

Specified by:
getTypeId in interface ObjectData

hashCode

public int hashCode()
Overrides:
hashCode in class Object

doGetProperty

protected Property<?> doGetProperty(PropertyDefinition<?> definition)

doSetProperty

protected void doSetProperty(Property<?> property)
                      throws NameConstraintViolationException
Update properties, skip on-create and read-only properties

Parameters:
property - property to be updated
Throws:
NameConstraintViolationException


Copyright © 2010 eXo Platform SAS. All Rights Reserved.