Package org.nuxeo.ecm.core.blob
Interface DocumentBlobProvider
- All Known Implementing Classes:
AbstractLiveConnectBlobProvider,BoxBlobProvider,GoogleDriveBlobProvider
public interface DocumentBlobProvider
- Since:
- 9.2
-
Method Summary
Modifier and TypeMethodDescriptiondefault ManagedBlobfreezeVersion(ManagedBlob blob, Document doc) Returns a new managed blob pointing to a fixed version of the original blob.default InputStreamgetConvertedStream(ManagedBlob blob, String mimeType, DocumentModel doc) Gets anInputStreamfor a conversion to the given MIME type.
-
Method Details
-
freezeVersion
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
nullif no change is needed - Throws:
IOException- Since:
- 7.3
-
getConvertedStream
default InputStream getConvertedStream(ManagedBlob blob, String mimeType, DocumentModel doc) throws IOException Gets anInputStreamfor 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
nullif no conversion is available for the given MIME type - Throws:
IOException- Since:
- 7.3
-