Interface DocumentBlobProvider

All Known Implementing Classes:
AbstractLiveConnectBlobProvider, BoxBlobProvider, GoogleDriveBlobProvider

public interface DocumentBlobProvider
Interface for a provider of Blobs interacting with Documents.
Since:
9.2
  • Method Details

    • 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 blob
      doc - 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 an InputStream 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 blob
      mimeType - the MIME type to convert to
      doc - 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