Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.api.blobholder
Class DocumentBlobHolder

java.lang.Object
  extended by org.nuxeo.ecm.core.api.blobholder.AbstractBlobHolder
      extended by org.nuxeo.ecm.core.api.blobholder.DocumentBlobHolder
All Implemented Interfaces:
BlobHolder
Direct Known Subclasses:
DocumentStringBlobHolder, PictureBlobHolder, PictureBookBlobHolder

public class DocumentBlobHolder
extends AbstractBlobHolder

BlobHolder implementation based on a DocumentModel and a XPath.

Author:
tiry

Constructor Summary
DocumentBlobHolder(DocumentModel doc, java.lang.String xPath)
           
DocumentBlobHolder(DocumentModel doc, java.lang.String xPath, java.lang.String xPathFilename)
          Constructor with filename property for compatibility (when filename was not stored on blob object)
 
Method Summary
 Blob getBlob()
          Returns the Blob held inside the object.
 java.lang.String getHash()
          Returns a hash for the held blob.
 java.util.Calendar getModificationDate()
          Returns the held blob modification date.
 java.util.Map<java.lang.String,java.io.Serializable> getProperties()
          Returns all properties as a Map.
 java.io.Serializable getProperty(java.lang.String name)
          Returns a named property.
 void setBlob(Blob blob)
          Sets a blob in the object.
 
Methods inherited from class org.nuxeo.ecm.core.api.blobholder.AbstractBlobHolder
getBlobs, getFilePath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentBlobHolder

public DocumentBlobHolder(DocumentModel doc,
                          java.lang.String xPath,
                          java.lang.String xPathFilename)
Constructor with filename property for compatibility (when filename was not stored on blob object)


DocumentBlobHolder

public DocumentBlobHolder(DocumentModel doc,
                          java.lang.String xPath)
Method Detail

getBlob

public Blob getBlob()
             throws ClientException
Description copied from interface: BlobHolder
Returns the Blob held inside the object.

Specified by:
getBlob in interface BlobHolder
Specified by:
getBlob in class AbstractBlobHolder
Throws:
ClientException

setBlob

public void setBlob(Blob blob)
             throws ClientException
Description copied from interface: BlobHolder
Sets a blob in the object.

The underlying document must be saved by the caller.

Specified by:
setBlob in interface BlobHolder
Overrides:
setBlob in class AbstractBlobHolder
Throws:
ClientException

getModificationDate

public java.util.Calendar getModificationDate()
                                       throws ClientException
Description copied from interface: BlobHolder
Returns the held blob modification date.

Specified by:
getModificationDate in interface BlobHolder
Specified by:
getModificationDate in class AbstractBlobHolder
Throws:
ClientException

getHash

public java.lang.String getHash()
                         throws ClientException
Description copied from interface: BlobHolder
Returns a hash for the held blob.

Specified by:
getHash in interface BlobHolder
Overrides:
getHash in class AbstractBlobHolder
Throws:
ClientException

getProperty

public java.io.Serializable getProperty(java.lang.String name)
                                 throws ClientException
Description copied from interface: BlobHolder
Returns a named property.

Throws:
ClientException

getProperties

public java.util.Map<java.lang.String,java.io.Serializable> getProperties()
Description copied from interface: BlobHolder
Returns all properties as a Map.


Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.