|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.hibernate.HibernateObjectDao
com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateDraftDao
public class HibernateDraftDao
Database storage for drafts. Does not permit anonymous drafts (i.e. those with a null username), which should be stored in non-permanent storage like the HTTP session.
SessionDraftDao| Field Summary |
|---|
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Fields inherited from interface bucket.core.persistence.ObjectDao |
|---|
NON_CACHEABLE |
| Constructor Summary | |
|---|---|
HibernateDraftDao()
|
|
| Method Summary | |
|---|---|
int |
countDrafts(String creatorName)
|
List<Draft> |
findByCreatorName(String creatorName)
Returns the drafts stored against the given username. |
List<Draft> |
getAllDraftsForSpace(String spaceKey)
Deprecated. |
protected Draft |
getByClassId(long id)
Retrieve the object with a particular id from the database. |
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 creatorName,
String draftType,
String spaceKey)
Deprecated. |
Draft |
getDraft(String pageId,
ConfluenceUser creator,
String draftType,
String spaceKey)
Finds and returns a draft object with all the specified properties or null if none is found. |
Draft |
getDraft(String pageId,
String creatorName,
String draftType,
String spaceKey)
Deprecated. |
Class |
getPersistentClass()
|
void |
remove(Draft draft)
Removes a draft based on its page ID, owner and type. |
void |
remove(long id)
Deprecated. |
void |
removeAll()
Deprecated. |
void |
saveOrUpdate(Draft draft)
Saves the draft. |
void |
setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
|
void |
setSharedDraftsDarkFeatureHelper(SharedDraftsDarkFeatureHelper sharedDraftsDarkFeatureHelper)
|
void |
updateSpaceKey(String newSpaceKey,
String oldSpaceKey)
Deprecated. |
| Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
|---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.confluence.pages.persistence.dao.DraftDao |
|---|
findAll |
| Constructor Detail |
|---|
public HibernateDraftDao()
| Method Detail |
|---|
public Class getPersistentClass()
getPersistentClass in interface ObjectDaoprotected Draft getByClassId(long id)
HibernateObjectDao
getByClassId in class HibernateObjectDaoid - the id of the object to look up
public void saveOrUpdate(Draft draft)
throws IllegalArgumentException
DraftDao
saveOrUpdate in interface DraftDaoIllegalArgumentException - if the draft has no page ID, owner or type.
public Draft getDraft(String pageId,
ConfluenceUser creator,
String draftType,
String spaceKey)
DraftDao
getDraft in interface DraftDaopageId - the id of the page which this draft is associated withcreator - the owner of the draftdraftType - 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
public Draft getDraft(String pageId,
String creatorName,
String draftType,
String spaceKey)
getDraft in interface DraftDao
@Deprecated
public Draft getDraft(Long pageId,
String creatorName,
String draftType,
String spaceKey)
getDraft in interface DraftDao@Deprecated public List<Draft> getAllDraftsForSpace(String spaceKey)
getAllDraftsForSpace in interface DraftDaopublic Draft getDraft(long draftId)
DraftDao
getDraft in interface DraftDaopublic void remove(Draft draft)
DraftDao
remove in interface DraftDao@Deprecated public void remove(long id)
DraftDao
remove in interface DraftDaopublic List<Draft> findByCreatorName(String creatorName)
DraftDao
findByCreatorName in interface DraftDao
@Deprecated
public void updateSpaceKey(String newSpaceKey,
String oldSpaceKey)
DraftDao
updateSpaceKey in interface DraftDaonewSpaceKey - the new space keyoldSpaceKey - the old space key@Deprecated public void removeAll()
DraftDao
removeAll in interface DraftDaopublic int countDrafts(String creatorName)
countDrafts in interface DraftDaopublic void setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
public void setSharedDraftsDarkFeatureHelper(SharedDraftsDarkFeatureHelper sharedDraftsDarkFeatureHelper)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||