org.apache.chemistry.opencmis.inmemory.storedobj.impl
Class VersionedDocumentImpl

java.lang.Object
  extended by org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
      extended by org.apache.chemistry.opencmis.inmemory.storedobj.impl.AbstractMultiFilingImpl
          extended by org.apache.chemistry.opencmis.inmemory.storedobj.impl.VersionedDocumentImpl
All Implemented Interfaces:
Filing, MultiFiling, StoredObject, VersionedDocument

public class VersionedDocumentImpl
extends AbstractMultiFilingImpl
implements VersionedDocument


Field Summary
 
Fields inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.AbstractMultiFilingImpl
fParents
 
Fields inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
fCreatedAt, fCreatedBy, fId, fModifiedAt, fModifiedBy, fName, fObjStore, fProperties, fRepositoryId, fTypeId
 
Fields inherited from interface org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing
PATH_SEPARATOR
 
Constructor Summary
VersionedDocumentImpl(ObjectStoreImpl objStore)
           
 
Method Summary
 DocumentVersion addVersion(ContentStream content, VersioningState verState, String user)
           
 void cancelCheckOut(String user)
           
 void checkIn(boolean isMajor, Properties properties, ContentStream content, String checkinComment, String user)
           
 DocumentVersion checkOut(ContentStream content, String user)
           
 boolean deleteVersion(DocumentVersion version)
          delete a version from this object, throw exception if document is checked out or document does not contain this version
 void fillProperties(Map<String,PropertyData<?>> properties, BindingsObjectFactory objFactory, List<String> requestedIds)
           
 List<DocumentVersion> getAllVersions()
           
 String getCheckedOutBy()
           
 DocumentVersion getLatestVersion(boolean major)
           
 DocumentVersion getPwc()
           
 boolean isCheckedOut()
           
 
Methods inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.AbstractMultiFilingImpl
addParent, getParents, getPathSegment, hasParent, move, removeParent, rename
 
Methods inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
createSystemBasePropertiesWhenCreated, getChangeToken, getCreatedAt, getCreatedBy, getId, getModifiedAt, getModifiedBy, getName, getProperties, getRepositoryId, getTypeId, persist, setCreatedAt, setCreatedBy, setCustomProperties, setModifiedAtNow, setModifiedBy, setName, setProperties, setRepositoryId, setSystemBasePropertiesWhenCreatedDirect, setTypeId, updateSystemBasePropertiesWhenModified
 
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.inmemory.storedobj.api.MultiFiling
addParent, getPathSegment, removeParent
 
Methods inherited from interface org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing
getParents, hasParent, move
 
Methods inherited from interface org.apache.chemistry.opencmis.inmemory.storedobj.api.StoredObject
createSystemBasePropertiesWhenCreated, getChangeToken, getCreatedAt, getCreatedBy, getId, getModifiedAt, getModifiedBy, getName, getProperties, getRepositoryId, getTypeId, persist, rename, setCreatedAt, setCreatedBy, setCustomProperties, setModifiedAtNow, setModifiedBy, setName, setProperties, setRepositoryId, setTypeId, updateSystemBasePropertiesWhenModified
 

Constructor Detail

VersionedDocumentImpl

public VersionedDocumentImpl(ObjectStoreImpl objStore)
Method Detail

addVersion

public DocumentVersion addVersion(ContentStream content,
                                  VersioningState verState,
                                  String user)
Specified by:
addVersion in interface VersionedDocument

deleteVersion

public boolean deleteVersion(DocumentVersion version)
Description copied from interface: VersionedDocument
delete a version from this object, throw exception if document is checked out or document does not contain this version

Specified by:
deleteVersion in interface VersionedDocument
Parameters:
version - version to be removed
Returns:
true if version could be removed, and other versions exist, false if the deleted version was the last version in this document

cancelCheckOut

public void cancelCheckOut(String user)
Specified by:
cancelCheckOut in interface VersionedDocument

checkIn

public void checkIn(boolean isMajor,
                    Properties properties,
                    ContentStream content,
                    String checkinComment,
                    String user)
Specified by:
checkIn in interface VersionedDocument

checkOut

public DocumentVersion checkOut(ContentStream content,
                                String user)
Specified by:
checkOut in interface VersionedDocument

getAllVersions

public List<DocumentVersion> getAllVersions()
Specified by:
getAllVersions in interface VersionedDocument

getLatestVersion

public DocumentVersion getLatestVersion(boolean major)
Specified by:
getLatestVersion in interface VersionedDocument

isCheckedOut

public boolean isCheckedOut()
Specified by:
isCheckedOut in interface VersionedDocument

getCheckedOutBy

public String getCheckedOutBy()
Specified by:
getCheckedOutBy in interface VersionedDocument

getPwc

public DocumentVersion getPwc()
Specified by:
getPwc in interface VersionedDocument

fillProperties

public void fillProperties(Map<String,PropertyData<?>> properties,
                           BindingsObjectFactory objFactory,
                           List<String> requestedIds)
Specified by:
fillProperties in interface StoredObject
Overrides:
fillProperties in class StoredObjectImpl


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