|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DraftDao
Stores Confluence drafts in a data store.
Method Summary | |
---|---|
List<Draft> |
findAll()
Returns all drafts stored in the data store. |
List<Draft> |
findByCreatorName(String creatorName)
Returns the drafts stored against the given username. |
Draft |
getDraft(long draftId)
Returns the draft with the given ID, or null if no draft is found with that ID. |
Draft |
getDraft(String pageId,
String owner,
String type)
Finds and returns a draft object with all the specified properties or null if none is found. |
void |
remove(Draft draft)
Removes a draft based on its page ID, owner and type. |
void |
remove(long id)
Remove a draft based on its ID. |
void |
removeAll()
Removes all drafts in the data store. |
void |
saveOrUpdate(Draft draft)
Saves the draft. |
void |
updateSpaceKey(String newSpaceKey,
String oldSpaceKey)
Changes all drafts with a space key of oldSpaceKey to have newSpaceKey. |
Method Detail |
---|
void saveOrUpdate(Draft draft) throws IllegalArgumentException
IllegalArgumentException
- if the draft has no page ID, owner or type.Draft getDraft(String pageId, String owner, String type)
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()
Draft getDraft(long draftId)
void remove(Draft draft)
for a faster way to remove a draft when you know its ID
void remove(long id)
List<Draft> findByCreatorName(String creatorName)
void updateSpaceKey(String newSpaceKey, String oldSpaceKey)
newSpaceKey
- the new space keyoldSpaceKey
- the old space keyvoid removeAll()
List<Draft> findAll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |