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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionDocumentBlobHolder(DocumentModel doc, String xPath) protectedDocumentBlobHolder(DocumentModel doc, String xPath, List<Blob> blobList) -
Method Summary
Modifier and TypeMethodDescriptionasDirectBlobHolder(int index) Returns a newDocumentBlobHolderfor the blob at the givenindexwheregetBlob()andgetXpath()will return information about the blob.Computes the blob list, with the main blob first.protected StringgetBlob()Returns the Blob held inside the object.getBlobs()Returns a list of blobs, if holder implementation supports multiple blobs.protected StringgetFullXPath(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()voidSets 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:
getBasePathin classAbstractBlobHolder
-
getBlob
Description copied from interface:BlobHolderReturns the Blob held inside the object. -
setBlob
Description copied from interface:BlobHolderSets a blob in the object.The underlying document must be saved by the caller.
- Specified by:
setBlobin interfaceBlobHolder- Overrides:
setBlobin classAbstractBlobHolder
-
getModificationDate
Description copied from interface:BlobHolderReturns the held blob modification date. -
getHash
Description copied from interface:BlobHolderReturns a hash for the held blob.- Specified by:
getHashin interfaceBlobHolder- Overrides:
getHashin classAbstractBlobHolder
-
getProperty
Description copied from interface:BlobHolderReturns a named property. -
getProperties
Description copied from interface:BlobHolderReturns all properties as a Map. -
getBlobs
Description copied from interface:BlobHolderReturns a list of blobs, if holder implementation supports multiple blobs.- Specified by:
getBlobsin interfaceBlobHolder- Overrides:
getBlobsin classAbstractBlobHolder
-
asDirectBlobHolder
Returns a newDocumentBlobHolderfor the blob at the givenindexwheregetBlob()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
-