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

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.DocumentImpl
All Implemented Interfaces:
Content, Document, Filing, MultiFiling, StoredObject

public class DocumentImpl
extends AbstractMultiFilingImpl
implements Document

InMemory Stored Document A document is a stored object that has a path and (optional) content

Author:
Jens

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
 
Method Summary
 void fillProperties(java.util.Map<java.lang.String,PropertyData<?>> properties, BindingsObjectFactory objFactory, java.util.List<java.lang.String> requestedIds)
           
 ContentStream getContent(long offset, long length)
          retrieve the content of a document
 boolean hasContent()
          return true if this object has content or false if there is no content attached.
 void setContent(ContentStream content, boolean mustPersist)
          Assign content do a document.
 
Methods inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.AbstractMultiFilingImpl
addParent, getParents, getParents, getPathSegment, hasParent, move, removeParent, rename
 
Methods inherited from class org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
createSystemBasePropertiesWhenCreated, getAcl, getAllowableActions, getChangeToken, getCreatedAt, getCreatedBy, getId, getModifiedAt, getModifiedBy, getName, getObjectRelationships, 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.StoredObject
createSystemBasePropertiesWhenCreated, getAcl, getAllowableActions, getChangeToken, getCreatedAt, getCreatedBy, getId, getModifiedAt, getModifiedBy, getName, getObjectRelationships, getProperties, getRepositoryId, getTypeId, persist, rename, setCreatedAt, setCreatedBy, setCustomProperties, setModifiedAtNow, setModifiedBy, setName, setProperties, setRepositoryId, setTypeId, updateSystemBasePropertiesWhenModified
 
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
 

Method Detail

getContent

public ContentStream getContent(long offset,
                                long length)
Description copied from interface: Content
retrieve the content of a document

Specified by:
getContent in interface Content
Returns:
object containing mime-type, length and a stream with content

setContent

public void setContent(ContentStream content,
                       boolean mustPersist)
Description copied from interface: Content
Assign content do a document. Existing content gets overwritten. The document is not yet persisted in the new state.

Specified by:
setContent in interface Content
Parameters:
content - content to be assigned to the document.
mustPersist - persist document (set to false if content is set during creation of a document)

fillProperties

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

hasContent

public boolean hasContent()
Description copied from interface: Content
return true if this object has content or false if there is no content attached.

Specified by:
hasContent in interface Content
Returns:


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