Interface ContentReconciliationManager
- All Known Implementing Classes:
DefaultContentReconciliationManager
public interface ContentReconciliationManager
Responsible for triggering and managing content reconciliation for different save operations.
- Since:
- 7.14.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleContentUpdateAfterSave
(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate) This part of the content update must run after the content has an ID.void
handleContentUpdateBeforeSave
(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext) Prepares Synchrony flags for reconciliationIfNeeded.void
handleEditorOnlyContentUpdateAfterSave
(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate) Used for Editor only changes where-in storage doesn't change.void
handleEditorOnlyContentUpdateBeforeSave
(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext) Used for Editor only changes where-in storage doesn't change.boolean
isReconciled
(@NonNull ContentEntityObject content) void
markDraftSynchronised
(@NonNull SpaceContentEntityObject draftEntity) Marks Synchrony Revision Source to synchrony.void
reconcileDraft
(@NonNull SpaceContentEntityObject pageEntity, @NonNull SpaceContentEntityObject draftEntity) This method triggersSynchronyRecoveryEvent
if collab editing is turned on and data recovery is needed for a draft.void
reconcileIfNeeded
(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext) This method triggersSynchronyRecoveryEvent
if collab editing is turned on and data recovery is needed.
-
Method Details
-
handleContentUpdateBeforeSave
void handleContentUpdateBeforeSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext) Prepares Synchrony flags for reconciliationIfNeeded. This should be called just before saving Content.- Parameters:
content
- the content needs to be updatedsaveContext
- the current save context
-
handleEditorOnlyContentUpdateBeforeSave
void handleEditorOnlyContentUpdateBeforeSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext) Used for Editor only changes where-in storage doesn't change. Ex: AttachmentCreate Prepares Synchrony flags for reconciliationIfNeeded. This should be called just before saving Content.- Parameters:
content
- the content needs to be updatedsaveContext
- the current save context
-
handleContentUpdateAfterSave
void handleContentUpdateAfterSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate) This part of the content update must run after the content has an ID.- Parameters:
content
- the content has just been updatedsaveContext
- the current save contextlastUpdateDate
- the last updated date of updated content before content being updated
-
handleEditorOnlyContentUpdateAfterSave
void handleEditorOnlyContentUpdateAfterSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate) Used for Editor only changes where-in storage doesn't change. Ex: AttachmentCreate This part of the content update must run after the content has an ID.- Parameters:
content
- the content has just been updatedsaveContext
- the current save contextlastUpdateDate
- the last updated date of updated content before content being updated
-
reconcileIfNeeded
This method triggersSynchronyRecoveryEvent
if collab editing is turned on and data recovery is needed. Recovery is needed when:content
is the latest version of the page or blog post AND- content is not reconciled (
'sync-rev-source'
content property is not empty and not equals to neither'synchrony'
or'synchrony-ack'
) AND - update trigger of
saveContext
is not equal toPageUpdateTrigger.LINK_REFACTORING
- Parameters:
content
- content to be recoveredsaveContext
- context of operation
-
isReconciled
- Parameters:
content
- content to be checked for reconciliation- Returns:
- true if sync-rev-source is set to appropriate values in content's properties.
-
reconcileDraft
void reconcileDraft(@NonNull SpaceContentEntityObject pageEntity, @NonNull SpaceContentEntityObject draftEntity) This method triggersSynchronyRecoveryEvent
if collab editing is turned on and data recovery is needed for a draft.- Parameters:
pageEntity
- Page whose draft reconciliation is neededdraftEntity
- Draft to be reconciled
-
markDraftSynchronised
Marks Synchrony Revision Source to synchrony.- Parameters:
draftEntity
- Draft to be reconciled
-