Class DocumentBlobHolder
java.lang.Object
org.nuxeo.ecm.core.api.blobholder.AbstractBlobHolder
org.nuxeo.ecm.core.api.blobholder.DocumentBlobHolder
- All Implemented Interfaces:
BlobHolder
- Direct Known Subclasses:
DocumentStringBlobHolder
,MailMessageBlobHolder
,PictureBlobHolder
,PictureBookBlobHolder
BlobHolder
implementation based on a DocumentModel
and a XPath.- Author:
- tiry
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionDocumentBlobHolder
(DocumentModel doc, String xPath) protected
DocumentBlobHolder
(DocumentModel doc, String xPath, List<Blob> blobList) -
Method Summary
Modifier and TypeMethodDescriptionasDirectBlobHolder
(int index) Returns a newDocumentBlobHolder
for the blob at the givenindex
wheregetBlob()
andgetXpath()
will return information about the blob.Computes the blob list, with the main blob first.protected String
getBlob()
Returns the Blob held inside the object.getBlobs()
Returns a list of blobs, if holder implementation supports multiple blobs.protected String
getFullXPath
(Property property) Gets the full xpath for a property, including schema prefix in all cases.getHash()
Returns a hash for the held blob.Returns the held blob modification date.Returns all properties as a Map.getProperty
(String name) Returns a named property.getXpath()
void
Sets a blob in the object.Methods inherited from class org.nuxeo.ecm.core.api.blobholder.AbstractBlobHolder
getFilePath, getMD5Digest
-
Field Details
-
doc
-
xPath
-
blobList
-
-
Constructor Details
-
DocumentBlobHolder
-
DocumentBlobHolder
-
-
Method Details
-
getBasePath
- Specified by:
getBasePath
in classAbstractBlobHolder
-
getBlob
Description copied from interface:BlobHolder
Returns the Blob held inside the object. -
setBlob
Description copied from interface:BlobHolder
Sets a blob in the object.The underlying document must be saved by the caller.
- Specified by:
setBlob
in interfaceBlobHolder
- Overrides:
setBlob
in classAbstractBlobHolder
-
getModificationDate
Description copied from interface:BlobHolder
Returns the held blob modification date. -
getHash
Description copied from interface:BlobHolder
Returns a hash for the held blob.- Specified by:
getHash
in interfaceBlobHolder
- Overrides:
getHash
in classAbstractBlobHolder
-
getProperty
Description copied from interface:BlobHolder
Returns a named property. -
getProperties
Description copied from interface:BlobHolder
Returns all properties as a Map. -
getBlobs
Description copied from interface:BlobHolder
Returns a list of blobs, if holder implementation supports multiple blobs.- Specified by:
getBlobs
in interfaceBlobHolder
- Overrides:
getBlobs
in classAbstractBlobHolder
-
asDirectBlobHolder
Returns a newDocumentBlobHolder
for the blob at the givenindex
wheregetBlob()
andgetXpath()
will return information about the blob.- Parameters:
index
- the blob index- Returns:
- the new blob holder
- Throws:
IndexOutOfBoundsException
- if the index is invalid- Since:
- 9.3
-
computeBlobList
Computes the blob list, with the main blob first.- Returns:
- the blob properties
- Since:
- 9.3
-
getFullXPath
Gets the full xpath for a property, including schema prefix in all cases.- Since:
- 9.3
-
getXpath
- Since:
- 7.3
-
getDocument
- Since:
- 7.4
-