Package org.nuxeo.ecm.core.blob
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BlobDispatcher.BlobDispatch
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description String
getBlobProvider(String repositoryName)
Decides whichBlobProvider
to use to read a blob from the given repository if no prefix is specified in the blob key.default BlobDispatcher.BlobDispatch
getBlobProvider(Document doc, Blob blob)
Deprecated.since 9.1, usegetBlobProvider(Document, Blob, String)
insteadBlobDispatcher.BlobDispatch
getBlobProvider(Document doc, Blob blob, String xpath)
Decides whichBlobProvider
to use to write the given blob, and whether the provider id should be added as prefix to the managed blob key.Collection<String>
getBlobProviderIds()
Gets the provider ids to which this dispatcher can dispatch.void
initialize(Map<String,String> properties)
Initializes this blob dispatcher.default boolean
isUseRepositoryName()
default void
notifyAfterCopy(Document doc)
Notifies the blob dispatcher that the document has been copied.default void
notifyBeforeRemove(Document doc)
Notifies the blob dispatcher that the document is about to be removed.void
notifyChanges(Document doc, Set<String> xpaths)
Notifies the blob dispatcher that a set of xpaths have changed on a document.default void
notifyMakeRecord(Document doc)
Notifies the blob dispatcher that the document was made a record.
-
-
-
Method Detail
-
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 whichBlobProvider
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
@Deprecated default BlobDispatcher.BlobDispatch getBlobProvider(Document doc, Blob blob)
Deprecated.since 9.1, usegetBlobProvider(Document, Blob, String)
insteadDecides whichBlobProvider
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 blobblob
- the blob- Returns:
- the blob provider id and whether it should be added as prefix
-
getBlobProvider
BlobDispatcher.BlobDispatch getBlobProvider(Document doc, Blob blob, String xpath)
Decides whichBlobProvider
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 blobblob
- the blobxpath
- 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 documentxpaths
- 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
-
-