Interface ContentReconciliationManager
-
- All Known Implementing Classes:
DefaultContentReconciliationManager
public interface ContentReconciliationManagerResponsible for triggering and managing content reconciliation for different save operations.- Since:
- 7.14.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleContentUpdateAfterSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate)This part of the content update must run after the content has an ID.voidhandleContentUpdateBeforeSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext)Prepares Synchrony flags for reconciliationIfNeeded.voidhandleEditorOnlyContentUpdateAfterSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate)Used for Editor only changes where-in storage doesn't change.voidhandleEditorOnlyContentUpdateBeforeSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext)Used for Editor only changes where-in storage doesn't change.booleanisReconciled(@NonNull ContentEntityObject content)voidmarkDraftSynchronised(@NonNull SpaceContentEntityObject draftEntity)Marks Synchrony Revision Source to synchrony.voidreconcileDraft(@NonNull SpaceContentEntityObject pageEntity, @NonNull SpaceContentEntityObject draftEntity)This method triggersSynchronyRecoveryEventif collab editing is turned on and data recovery is needed for a draft.voidreconcileIfNeeded(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext)This method triggersSynchronyRecoveryEventif collab editing is turned on and data recovery is needed.
-
-
-
Method Detail
-
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
void reconcileIfNeeded(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext)
This method triggersSynchronyRecoveryEventif collab editing is turned on and data recovery is needed. Recovery is needed when:contentis 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
saveContextis not equal toPageUpdateTrigger.LINK_REFACTORING
- Parameters:
content- content to be recoveredsaveContext- context of operation
-
isReconciled
boolean isReconciled(@NonNull ContentEntityObject content)
- 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 triggersSynchronyRecoveryEventif 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
void markDraftSynchronised(@NonNull SpaceContentEntityObject draftEntity)
Marks Synchrony Revision Source to synchrony.- Parameters:
draftEntity- Draft to be reconciled
-
-