Interface ChangeDraftUpdate

All Known Implementing Classes:
ChangeDraftNotesUpdate

public interface ChangeDraftUpdate
An interface for updating draft comments.
  • Method Details

    • putDraftComment

      void putDraftComment(HumanComment c)
      Creates a draft comment.
    • markDraftCommentAsPublished

      void markDraftCommentAsPublished(HumanComment c)
      Marks a comment for deletion. Called when the comment is deleted because the user published it.

      NOTE for implementers: The actual deletion of a published draft should only happen after the published comment is successfully updated. For more context, see NoteDbUpdateManager.execute(boolean).

      TODO(nitzan) - add generalized support for the above sync issue. The implementation should support deletion of published drafts from multiple ChangeDraftUpdateFactory instances.

    • addDraftCommentForDeletion

      void addDraftCommentForDeletion(HumanComment c)
      Marks a comment for deletion. Called when the comment is deleted because the user removed it.
    • addAllDraftCommentsForDeletion

      void addAllDraftCommentsForDeletion(List<Comment> comments)
      Marks all comments for deletion. Called when there are inconsistencies between the published comments storage and the drafts one.