Interface BlobProvider

    • Method Detail

      • initialize

        void initialize​(String blobProviderId,
                        Map<String,​String> properties)
                 throws IOException
        Initializes the blob provider.
        Parameters:
        blobProviderId - the blob provider id for this binary manager
        properties - initialization properties
        Throws:
        IOException
        Since:
        7.3
      • close

        void close()
        Closes this blob provider and releases resources that may be held by it.
        Since:
        7.3
      • isRecordMode

        default boolean isRecordMode()
        Checks whether this blob provider uses "record mode".

        Record mode has the following characteristics:

        • transactional (blobs aren't actually written/deleted until the transaction commits, and transaction rollback is possible),
        • can replace or delete a document's blob.
        Since:
        11.1
      • isTransactional

        default boolean isTransactional()
        Checks whether this blob provider is transactional.

        A transactional blob provider only writes blobs to final storage at commit time.

        Since:
        11.1
      • isTransient

        default boolean isTransient()
        Checks whether this blob provider is transient: blobs may disappear after a while, so a caller should not rely on them being available forever.
        Since:
        10.1
      • allowByteRange

        default boolean allowByteRange()
        Checks whether this blob provider allows byte ranges in keys.
        Since:
        11.1
      • writeBlob

        default String writeBlob​(BlobContext blobContext)
                          throws IOException
        Writes a Blob to storage and returns information about it.

        Called to store a user-created blob.

        Parameters:
        blobContext - the blob context
        Returns:
        the blob key
        Throws:
        IOException
        Since:
        11.1
      • writeBlob

        String writeBlob​(Blob blob)
                  throws IOException
        Writes a Blob to storage and returns information about it.

        Called to store a user-created blob.

        Parameters:
        blob - the blob
        Returns:
        the blob key
        Throws:
        IOException
        Since:
        9.2
      • deleteBlob

        default void deleteBlob​(BlobContext blobContext)
        Deletes a blob from storage. Only meaningful for a record blob provider.
        Parameters:
        blobContext - the blob context
        Since:
        11.1
        See Also:
        isRecordMode()
      • supportsUserUpdate

        boolean supportsUserUpdate()
        Checks if user update is supported.

        A user update refers to the fact that a blob from this provider may be overwritten with another blob, wherever the original blob may occur (usually in a document property).

        Returns:
        true if user update is supported
        Since:
        7.10
      • supportsSync

        default boolean supportsSync()
        Checks if sync is supported.

        Sync refers to the fact that a blob from this provider may be synced with a remote system (like Nuxeo Drive) or with a process that updates things in the blob (like Binary Metadata, or WOPI).

        Returns:
        true if sync is supported
        Since:
        11.1
      • getFile

        default File getFile​(ManagedBlob blob)
        Gets a File (if one exists) for the data of a managed blob.
        Parameters:
        blob - the managed blob
        Returns:
        the file, or null if no underlying file is available
        Since:
        11.1
      • canConvert

        default boolean canConvert​(ManagedBlob blob,
                                   String mimeType)
        Checks if the conversion to the given mimeType is supported by the blob.
        Parameters:
        blob - the managed blob
        mimeType - the destination mime type
        Returns:
        true if this managed blob supports the conversion to the given mime type
        Since:
        10.1
      • isVersion

        default boolean isVersion​(ManagedBlob blob)
        Returns true if version of the blob is a version.

        Parameters:
        blob - the managed blob
        Returns:
        true if the blob is a version or a revision
        Since:
        7.3
      • getBinaryManager

        default BinaryManager getBinaryManager()
        Gets the associated binary manager, if any.
        Returns:
        the binary manager, or null
        Since:
        7.4
      • performsExternalAccessControl

        default boolean performsExternalAccessControl​(BlobInfo blobInfo)
        Checks if the blob provider performs external access control checks.
        Parameters:
        blobInfo - the blob information to be read
        Returns:
        true if the provider performs security checks before reading a blob, false otherwise
        Since:
        8.4
      • hasCreateFromKeyPermission

        default boolean hasCreateFromKeyPermission()
        Checks if current user has the rights to create blobs in the blob provider using a key.
        Since:
        10.2