Interface BlobDispatcher

  • All Known Implementing Classes:
    DefaultBlobDispatcher

    public interface BlobDispatcher
    Interface for a dispatcher of blobs to different blob providers according to metadata.
    Since:
    7.3
    • Method Detail

      • initialize

        void initialize​(Map<String,​String> properties)
        Initializes this blob dispatcher.
      • getBlobProviderIds

        Collection<String> getBlobProviderIds()
        Gets the provider ids to which this dispatcher can dispatch.

        Blobs already having a provider id not listed here won't be touched on write.

        Returns:
        a collection containing the provider ids
      • getBlobProvider

        String getBlobProvider​(String repositoryName)
        Decides which BlobProvider to use to read a blob from the given repository if no prefix is specified in the blob key.
        Parameters:
        repositoryName - the repository name
        Returns:
        the blob provider id
      • getBlobProvider

        BlobDispatcher.BlobDispatch getBlobProvider​(Document doc,
                                                    Blob blob,
                                                    String xpath)
        Decides which BlobProvider to use to write the given blob, and whether the provider id should be added as prefix to the managed blob key.
        Parameters:
        doc - the document containing the blob
        blob - the blob
        xpath - the xpath of the blob in the document
        Returns:
        the blob provider id and whether it should be added as prefix
        Since:
        9.1
      • isUseRepositoryName

        default boolean isUseRepositoryName()
        Returns:
        true if the blobs are dispatched to the provider with the same name than the repository.
        Since:
        2023
      • notifyChanges

        void notifyChanges​(Document doc,
                           Set<String> xpaths)
        Notifies the blob dispatcher that a set of xpaths have changed on a document.
        Parameters:
        doc - the document
        xpaths - the set of changed xpaths
        Since:
        7.3
      • notifyMakeRecord

        default void notifyMakeRecord​(Document doc)
        Notifies the blob dispatcher that the document was made a record.
        Parameters:
        doc - the document
        Since:
        11.1
      • notifyAfterCopy

        default void notifyAfterCopy​(Document doc)
        Notifies the blob dispatcher that the document has been copied.
        Parameters:
        doc - the new document, the result of the copy
        Since:
        11.1
      • notifyBeforeRemove

        default void notifyBeforeRemove​(Document doc)
        Notifies the blob dispatcher that the document is about to be removed.
        Parameters:
        doc - the document
        Since:
        11.1