Package org.nuxeo.ecm.core.blob
Interface DocumentBlobProvider
-
- All Known Implementing Classes:
AbstractLiveConnectBlobProvider
,BoxBlobProvider
,GoogleDriveBlobProvider
public interface DocumentBlobProvider
- Since:
- 9.2
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ManagedBlob
freezeVersion(ManagedBlob blob, Document doc)
Returns a new managed blob pointing to a fixed version of the original blob.default InputStream
getConvertedStream(ManagedBlob blob, String mimeType, DocumentModel doc)
Gets anInputStream
for a conversion to the given MIME type.
-
-
-
Method Detail
-
freezeVersion
default ManagedBlob freezeVersion(ManagedBlob blob, Document doc) throws IOException
Returns a new managed blob pointing to a fixed version of the original blob.- Parameters:
blob
- the original managed blobdoc
- the document that holds the blob- Returns:
- a managed blob with fixed version, or
null
if no change is needed - Throws:
IOException
- Since:
- 7.3
-
getConvertedStream
default InputStream getConvertedStream(ManagedBlob blob, String mimeType, DocumentModel doc) throws IOException
Gets anInputStream
for a conversion to the given MIME type.Like all
InputStream
, the result must be closed when done with it to avoid resource leaks.- Parameters:
blob
- the managed blobmimeType
- the MIME type to convert todoc
- the document that holds the blob- Returns:
- the stream, or
null
if no conversion is available for the given MIME type - Throws:
IOException
- Since:
- 7.3
-
-