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 -
Method Summary
Modifier and TypeMethodDescriptiongetBlobProvider(String repositoryName) Decides whichBlobProviderto use to read a blob from the given repository if no prefix is specified in the blob key.getBlobProvider(Document doc, Blob blob, String xpath) Decides whichBlobProviderto use to write the given blob, and whether the provider id should be added as prefix to the managed blob key.Gets the provider ids to which this dispatcher can dispatch.voidinitialize(Map<String, String> properties) Initializes this blob dispatcher.booleandefault voidnotifyAfterCopy(Document doc) Notifies the blob dispatcher that the document has been copied.default voidNotifies the blob dispatcher that the document is about to be removed.voidnotifyChanges(Document doc, Set<String> xpaths) Notifies the blob dispatcher that a set of xpaths have changed on a document.default voidnotifyMakeRecord(Document doc) Notifies the blob dispatcher that the document was made a record.
-
Method Details
-
initialize
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
Decides whichBlobProviderto 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
Decides whichBlobProviderto 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
boolean isUseRepositoryName()- Returns:
- true if the blobs are dispatched to the provider with the same name than the repository.
- Since:
- 2023
-
notifyChanges
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
Notifies the blob dispatcher that the document was made a record.- Parameters:
doc- the document- Since:
- 11.1
-
notifyAfterCopy
Notifies the blob dispatcher that the document has been copied.- Parameters:
doc- the new document, the result of the copy- Since:
- 11.1
-
notifyBeforeRemove
Notifies the blob dispatcher that the document is about to be removed.- Parameters:
doc- the document- Since:
- 11.1
-