public class DocumentBlobHolder extends AbstractBlobHolder
BlobHolder
implementation based on a DocumentModel
and a XPath.Modifier and Type | Field and Description |
---|---|
protected List<Blob> |
blobList |
protected DocumentModel |
doc |
protected String |
xPath |
protected String |
xPathFilename |
Constructor and Description |
---|
DocumentBlobHolder(DocumentModel doc,
String xPath) |
DocumentBlobHolder(DocumentModel doc,
String xPath,
String xPathFilename)
Constructor with filename property for compatibility (when filename was not stored on blob object)
|
Modifier and Type | Method and Description |
---|---|
protected String |
getBasePath() |
Blob |
getBlob()
Returns the Blob held inside the object.
|
List<Blob> |
getBlobs()
Returns a list of blobs, if holder implementation supports multiple blobs.
|
DocumentModel |
getDocument() |
String |
getHash()
Returns a hash for the held blob.
|
Calendar |
getModificationDate()
Returns the held blob modification date.
|
Map<String,Serializable> |
getProperties()
Returns all properties as a Map.
|
Serializable |
getProperty(String name)
Returns a named property.
|
String |
getXpath() |
void |
setBlob(Blob blob)
Sets a blob in the object.
|
getFilePath, getMD5Digest
protected final DocumentModel doc
protected String xPathFilename
public DocumentBlobHolder(DocumentModel doc, String xPath, String xPathFilename)
public DocumentBlobHolder(DocumentModel doc, String xPath)
protected String getBasePath()
getBasePath
in class AbstractBlobHolder
public Blob getBlob()
BlobHolder
getBlob
in interface BlobHolder
getBlob
in class AbstractBlobHolder
public void setBlob(Blob blob)
BlobHolder
The underlying document must be saved by the caller.
setBlob
in interface BlobHolder
setBlob
in class AbstractBlobHolder
public Calendar getModificationDate()
BlobHolder
getModificationDate
in interface BlobHolder
getModificationDate
in class AbstractBlobHolder
public String getHash()
BlobHolder
getHash
in interface BlobHolder
getHash
in class AbstractBlobHolder
public Serializable getProperty(String name)
BlobHolder
public Map<String,Serializable> getProperties()
BlobHolder
public List<Blob> getBlobs()
BlobHolder
getBlobs
in interface BlobHolder
getBlobs
in class AbstractBlobHolder
public DocumentModel getDocument()
Copyright © 2016 Nuxeo SA. All rights reserved.