Interface ContentDraftManagerInternal

All Known Subinterfaces:
ContentEntityManagerInternal
All Known Implementing Classes:
DefaultCommentManager, DefaultContentEntityManager, DefaultCustomContentManager, DefaultPageManager

public interface ContentDraftManagerInternal
DMZ manager for common handling of drafts; see the package-info.java for rationale.
Since:
9.0
See Also:
  • Method Details

    • createDraft

      <T extends ContentEntityObject> T createDraft(T obj, SaveContext saveContext)
      This method sets the common properties of the ContentEntityObject to be saved as a draft
      Parameters:
      obj - - the ContentEntityObject to save as draft
      saveContext - - a SaveContext holding additional parameters for the manager to use when saving.
      Returns:
      the obj created as draft
      See Also:
    • findDraftFor

      <T extends ContentEntityObject> T findDraftFor(T ceo)
      Retrieves the draft for the given content if exists.
      Parameters:
      ceo - the entity object to retrieve the draft for
      Returns:
      the draft for the given content if exists, null otherwise
      See Also:
    • findAllDraftsFor

      <T extends ContentEntityObject> List<T> findAllDraftsFor(long contentId)
      Retrieves a list of drafts for the given content ID if any exist.
      Parameters:
      contentId - The content ID used to identify the drafts
      Returns:
      A non-null list of drafts with 0 or more elements
      Since:
      6.0.6
      See Also:
    • findDraftFor

      <T extends ContentEntityObject> T findDraftFor(long contentId)
      Retrieves the draft for the given content ID if it exists
      Parameters:
      contentId - The content ID used to identify the draft
      Returns:
      the draft for the given content ID if it exists, null otherwise
      See Also:
    • findUnpublishedContentWithUserContributions

      List<ContentEntityObject> findUnpublishedContentWithUserContributions(ConfluenceUser user)
      Retrieves the drafts for the given User IMPORTANT: this method doesn't return published shared drafts, only personal drafts and unpublished shared drafts
      Parameters:
      user - the owner of the drafts
      Returns:
      a list of ContentEntityObject with the ContentEntityObject.DRAFT status
    • findAllDraftsWithUnpublishedChangesForUser

      List<ContentEntityObject> findAllDraftsWithUnpublishedChangesForUser(ConfluenceUser creator)
      Retrieves the drafts for the given User
      Parameters:
      creator - the owner of the drafts
      Returns:
      a list of user's drafts (ContentEntityObject objects)