Package org.nuxeo.ecm.liveconnect.update
Interface BatchUpdateBlobProvider
-
- All Known Implementing Classes:
AbstractLiveConnectBlobProvider
,BoxBlobProvider
,GoogleDriveBlobProvider
public interface BatchUpdateBlobProvider
Interface to batch update documents provided by implementing provider. The methodprocessDocumentsUpdate()
is called byBlobProviderDocumentsUpdateListener
.The implementation of
processDocumentsUpdate()
must schedule aBlobProviderDocumentsUpdateWork
with the document ids to be checked and updated if needed.The @{link BlobProviderDocumentsUpdateWork} will then call the implementation of
checkChangesAndUpdateBlob(List)
.Note that it is recommended to schedule many workers dealing with a smaller amount of documents (using
MAX_RESULT
) rather than a single one processing all document brought by the provider.- Since:
- 7.3
-
-
Field Summary
Fields Modifier and Type Field Description static long
MAX_RESULT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<DocumentModel>
checkChangesAndUpdateBlob(List<DocumentModel> documents)
Check the given list of document for change and update if needed.void
processDocumentsUpdate()
Trigger the documents update for the implementing providers.
-
-
-
Field Detail
-
MAX_RESULT
static final long MAX_RESULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkChangesAndUpdateBlob
List<DocumentModel> checkChangesAndUpdateBlob(List<DocumentModel> documents)
Check the given list of document for change and update if needed. Note that session.save still needs to be called on changed documents.- Parameters:
documents
- to be checked for update- Returns:
- the list of DocumentModel that have changed
-
processDocumentsUpdate
void processDocumentsUpdate()
Trigger the documents update for the implementing providers.
-
-