Package com.atlassian.confluence.dmz
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 Summary
Modifier and TypeMethodDescription<T extends ContentEntityObject>
TcreateDraft(T obj, SaveContext saveContext) This method sets the common properties of theContentEntityObjectto be saved as a draft<T extends ContentEntityObject>
List<T>findAllDraftsFor(long contentId) Retrieves a list of drafts for the given content ID if any exist.Retrieves the drafts for the givenUser<T extends ContentEntityObject>
TfindDraftFor(long contentId) Retrieves the draft for the given content ID if it exists<T extends ContentEntityObject>
TfindDraftFor(T ceo) Retrieves the draft for the given content if exists.Retrieves the drafts for the givenUserIMPORTANT: this method doesn't return published shared drafts, only personal drafts and unpublished shared drafts
-
Method Details
-
createDraft
This method sets the common properties of theContentEntityObjectto be saved as a draft- Parameters:
obj- - theContentEntityObjectto save as draftsaveContext- - aSaveContextholding additional parameters for the manager to use when saving.- Returns:
- the obj created as draft
- See Also:
-
findDraftFor
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
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
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
Retrieves the drafts for the givenUserIMPORTANT: 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
ContentEntityObjectwith theContentEntityObject.DRAFTstatus
-
findAllDraftsWithUnpublishedChangesForUser
Retrieves the drafts for the givenUser- Parameters:
creator- the owner of the drafts- Returns:
- a list of user's drafts (
ContentEntityObjectobjects)
-