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 |
| Modifier | Constructor and Description |
|---|---|
|
DocumentBlobHolder(DocumentModel doc,
String xPath) |
protected |
DocumentBlobHolder(DocumentModel doc,
String xPath,
List<Blob> blobList) |
| Modifier and Type | Method and Description |
|---|---|
DocumentBlobHolder |
asDirectBlobHolder(int index)
Returns a new
DocumentBlobHolder for the blob at the given index where getBlob() and
getXpath() will return information about the blob. |
protected List<Property> |
computeBlobList()
Computes the blob list, with the main blob first.
|
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() |
protected String |
getFullXPath(Property property)
Gets the full xpath for a property, including schema prefix in all cases.
|
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, getMD5Digestprotected final DocumentModel doc
public DocumentBlobHolder(DocumentModel doc, String xPath)
protected DocumentBlobHolder(DocumentModel doc, String xPath, List<Blob> blobList)
protected String getBasePath()
getBasePath in class AbstractBlobHolderpublic Blob getBlob()
BlobHoldergetBlob in interface BlobHoldergetBlob in class AbstractBlobHolderpublic void setBlob(Blob blob)
BlobHolderThe underlying document must be saved by the caller.
setBlob in interface BlobHoldersetBlob in class AbstractBlobHolderpublic Calendar getModificationDate()
BlobHoldergetModificationDate in interface BlobHoldergetModificationDate in class AbstractBlobHolderpublic String getHash()
BlobHoldergetHash in interface BlobHoldergetHash in class AbstractBlobHolderpublic Serializable getProperty(String name)
BlobHolderpublic Map<String,Serializable> getProperties()
BlobHolderpublic List<Blob> getBlobs()
BlobHoldergetBlobs in interface BlobHoldergetBlobs in class AbstractBlobHolderpublic DocumentBlobHolder asDirectBlobHolder(int index) throws IndexOutOfBoundsException
DocumentBlobHolder for the blob at the given index where getBlob() and
getXpath() will return information about the blob.index - the blob indexIndexOutOfBoundsException - if the index is invalidprotected List<Property> computeBlobList()
protected String getFullXPath(Property property)
public DocumentModel getDocument()
Copyright © 2019 Nuxeo. All rights reserved.