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)
ContentReconciliationManager
handleContentUpdateBeforeSave
in interface ContentReconciliationManager
content
- the content needs to be updatedsaveContext
- the current save contextpublic void handleEditorOnlyContentUpdateBeforeSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext)
ContentReconciliationManager
handleEditorOnlyContentUpdateBeforeSave
in interface ContentReconciliationManager
content
- the content needs to be updatedsaveContext
- the current save contextpublic void handleContentUpdateAfterSave(@NonNull ContentEntityObject content, @Nullable SaveContext saveContext, @NonNull Optional<Date> lastUpdateDate)
ContentReconciliationManager
handleContentUpdateAfterSave
in interface ContentReconciliationManager
content
- 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)
ContentReconciliationManager
handleEditorOnlyContentUpdateAfterSave
in interface ContentReconciliationManager
content
- 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)
ContentReconciliationManager
SynchronyRecoveryEvent
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_REFACTORING
reconcileIfNeeded
in interface ContentReconciliationManager
content
- content to be recoveredsaveContext
- context of operationpublic boolean isReconciled(@NonNull ContentEntityObject ceo)
isReconciled
in interface ContentReconciliationManager
ceo
- content to be checked for reconciliationpublic void reconcileDraft(@NonNull SpaceContentEntityObject page, @NonNull SpaceContentEntityObject draft)
ContentReconciliationManager
SynchronyRecoveryEvent
if collab editing is turned on and data recovery is needed
for a draft.reconcileDraft
in interface ContentReconciliationManager
page
- Page whose draft reconciliation is neededdraft
- Draft to be reconciledpublic void markDraftSynchronised(@NonNull SpaceContentEntityObject draft)
ContentReconciliationManager
markDraftSynchronised
in interface ContentReconciliationManager
draft
- Draft to be reconciledCopyright © 2003–2023 Atlassian. All rights reserved.
View cookie preferences