|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.pages.persistence.dao.SessionDraftDao
public class SessionDraftDao
Stores drafts in the session, primarily for anonymous users.
| Constructor Summary | |
|---|---|
SessionDraftDao(javax.servlet.http.HttpSession session)
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionDraftDao(javax.servlet.http.HttpSession session)
| Method Detail |
|---|
public void saveOrUpdate(Draft draft)
DraftDao
saveOrUpdate in interface DraftDao
public Draft getDraft(String pageId,
String owner,
String type)
DraftDao
getDraft in interface DraftDaopageId - 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()
public Draft getDraft(long draftId)
DraftDao
getDraft in interface DraftDaopublic void remove(Draft draft)
DraftDao
remove in interface DraftDaofor a faster way to remove a draft when you know its IDpublic void remove(long id)
DraftDao
remove in interface DraftDaopublic List<Draft> findByCreatorName(String creatorName)
DraftDao
findByCreatorName in interface DraftDao
public void updateSpaceKey(String newSpaceKey,
String oldSpaceKey)
DraftDao
updateSpaceKey in interface DraftDaonewSpaceKey - the new space keyoldSpaceKey - the old space keypublic void removeAll()
DraftDao
removeAll in interface DraftDaopublic List<Draft> findAll()
DraftDao
findAll in interface DraftDao
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||