Interface DraftDao

    • Method Detail

      • getDraft

        Draft getDraft​(String pageId,
                       ConfluenceUser owner,
                       String type,
                       String spaceKey)
        Finds and returns a draft object with all the specified properties or null if none is found.
        pageId - the id of the page which this draft is associated with
        owner - the owner of the draft
        type - the type of draft, which is usually the result of calling ContentEntityObject.getType()
        spaceKey - space key, if relevant for the draft. This is used to enable NEW page drafts across multiple spaces
        a draft object with all the specified properties or null if no valid draft could be found
      • getDraft

        Draft getDraft​(long draftId)
        Returns the draft with the given ID, or null if no draft is found with that ID.
      • remove

        void remove​(Draft draft)
        Removes a draft based on its page ID, owner and type. Does nothing if such a draft is not found in the data store.
      • findByCreatorName

        List<Draft> findByCreatorName​(String creatorName)
        Returns the drafts stored against the given username.
      • findAll

        List<Draft> findAll()
        Returns all drafts stored in the data store.
      • countDrafts

        int countDrafts​(String creatorName)
        count of number of drafts for this daos owner