public class DefaultContentReconciliationManager extends Object implements ContentReconciliationManager
DefaultPageManager & DefaultAttachmentManager
with a level of reused reconciliation lifecycle. See:
Collaborative editing: server side business for more information.| Constructor and Description |
|---|
DefaultContentReconciliationManager(CollaborativeEditingHelper collaborativeEditingHelper,
com.atlassian.event.api.EventPublisher eventPublisher,
SynchronizationManager synchronizationManager,
org.springframework.transaction.PlatformTransactionManager transactionManager,
Supplier<? extends ContentEntityManagerInternal> contentEntityManager) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 ceo) |
void |
markDraftSynchronised(@NonNull SpaceContentEntityObject draft)
Marks Synchrony Revision Source to synchrony.
|
void |
reconcileDraft(@NonNull SpaceContentEntityObject page,
@NonNull SpaceContentEntityObject draft)
This method triggers
SynchronyRecoveryEvent if collab editing is turned on and data recovery is needed
for a draft. |
void |
reconcileIfNeeded(@NonNull ContentEntityObject content,
@Nullable SaveContext saveContext)
This method triggers
SynchronyRecoveryEvent if collab editing is turned on and data recovery is needed. |
public DefaultContentReconciliationManager(CollaborativeEditingHelper collaborativeEditingHelper, com.atlassian.event.api.EventPublisher eventPublisher, SynchronizationManager synchronizationManager, org.springframework.transaction.PlatformTransactionManager transactionManager, Supplier<? extends ContentEntityManagerInternal> contentEntityManager)
public void handleContentUpdateBeforeSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext)
ContentReconciliationManagerhandleContentUpdateBeforeSave in interface ContentReconciliationManagercontent - the content needs to be updatedsaveContext - the current save contextpublic void handleEditorOnlyContentUpdateBeforeSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext)
ContentReconciliationManagerhandleEditorOnlyContentUpdateBeforeSave in interface ContentReconciliationManagercontent - the content needs to be updatedsaveContext - the current save contextpublic void handleContentUpdateAfterSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate)
ContentReconciliationManagerhandleContentUpdateAfterSave in interface ContentReconciliationManagercontent - the content has just been updatedsaveContext - the current save contextlastUpdateDate - the last updated date of updated content before content being updatedpublic void handleEditorOnlyContentUpdateAfterSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate)
ContentReconciliationManagerhandleEditorOnlyContentUpdateAfterSave in interface ContentReconciliationManagercontent - the content has just been updatedsaveContext - the current save contextlastUpdateDate - the last updated date of updated content before content being updatedpublic void reconcileIfNeeded(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext)
ContentReconciliationManagerSynchronyRecoveryEvent 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'sync-rev-source' content property is not empty and not equals to neither 'synchrony' or 'synchrony-ack') ANDsaveContext is not equal to PageUpdateTrigger.LINK_REFACTORINGreconcileIfNeeded in interface ContentReconciliationManagercontent - content to be recoveredsaveContext - context of operationpublic boolean isReconciled(@NonNull ContentEntityObject ceo)
isReconciled in interface ContentReconciliationManagerceo - content to be checked for reconciliationpublic void reconcileDraft(@NonNull SpaceContentEntityObject page, @NonNull SpaceContentEntityObject draft)
ContentReconciliationManagerSynchronyRecoveryEvent if collab editing is turned on and data recovery is needed
for a draft.reconcileDraft in interface ContentReconciliationManagerpage - Page whose draft reconciliation is neededdraft - Draft to be reconciledpublic void markDraftSynchronised(@NonNull SpaceContentEntityObject draft)
ContentReconciliationManagermarkDraftSynchronised in interface ContentReconciliationManagerdraft - Draft to be reconciledCopyright © 2003–2022 Atlassian. All rights reserved.