public interface DraftDao
Modifier and Type | Method and Description |
---|---|
int |
countDrafts(String creatorName) |
List<Draft> |
findAll()
Returns all drafts stored in the data store.
|
List<Draft> |
findByCreatorName(String creatorName)
Returns the drafts stored against the given username.
|
List<Draft> |
getAllDraftsForSpace(String spaceKey)
Deprecated.
since 5.7. No replacement.
|
Draft |
getDraft(long draftId)
Returns the draft with the given ID, or null if no draft is found with that ID.
|
Draft |
getDraft(Long pageId,
String owner,
String type,
String spaceKey)
Deprecated.
since 5.2. Use
getDraft(String, com.atlassian.confluence.user.ConfluenceUser, String, String) instead. |
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.
|
Draft |
getDraft(String pageId,
String owner,
String type,
String spaceKey)
Deprecated.
since 5.2. Use
getDraft(String, com.atlassian.confluence.user.ConfluenceUser, String, String) instead. |
void |
remove(Draft draft)
Removes a draft based on its page ID, owner and type.
|
void |
remove(long id)
Deprecated.
since 5.7. Use
remove(Draft) |
void |
removeAll()
Deprecated.
since 5.7. No replacement.
|
void |
saveOrUpdate(Draft draft)
Saves the draft.
|
void |
updateSpaceKey(String newSpaceKey,
String oldSpaceKey)
Deprecated.
since 5.7. No replacement.
|
void saveOrUpdate(Draft draft) throws IllegalArgumentException
IllegalArgumentException
- if the draft has no page ID, owner or type.Draft getDraft(String pageId, ConfluenceUser owner, String type, String spaceKey)
pageId
- the id of the page which this draft is associated withowner
- the owner of the drafttype
- 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@Deprecated Draft getDraft(String pageId, String owner, String type, String spaceKey)
getDraft(String, com.atlassian.confluence.user.ConfluenceUser, String, String)
instead.@Deprecated Draft getDraft(Long pageId, String owner, String type, String spaceKey)
getDraft(String, com.atlassian.confluence.user.ConfluenceUser, String, String)
instead.Draft getDraft(long draftId)
void remove(Draft draft)
@Deprecated void remove(long id)
remove(Draft)
List<Draft> findByCreatorName(String creatorName)
@Deprecated void updateSpaceKey(String newSpaceKey, String oldSpaceKey)
newSpaceKey
- the new space keyoldSpaceKey
- the old space key@Deprecated void removeAll()
@Deprecated List<Draft> getAllDraftsForSpace(String spaceKey)
spaceKey
- int countDrafts(String creatorName)
Copyright © 2003–2017 Atlassian. All rights reserved.