|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao
public class CachingPageDao
This maintains a cache of (space key, page title) -> (page id) mappings. All page ids cached refer to current pages. When a page is marked for deletion, it is removed from this cache.
Constructor Summary | |
---|---|
CachingPageDao(PageDao delegateDao,
PageIdCache pageIdCache)
|
Method Summary | |
---|---|
List |
findAll()
|
List |
findAllSorted(String s)
|
long |
findLatestVersionsCount()
Returns the number of results for the latest versions of the current persistent class. |
Iterator |
findLatestVersionsIterator()
Returns an iterator for the latest versions of the current persistent class. |
List |
findPagesWithHistoricalTitle(String pageTitle)
|
List<AbstractPage> |
findPagesWithHistoricalTitleInAllPermittedSpacesExcept(String pageTitle,
Space space,
int maxResultCount)
Searches for pages in all spaces except the one specified, looking for those that have the given title in a previous version, and returns the first maxResultCount results. |
List<AbstractPage> |
findPagesWithHistoricalTitleInPermittedSpace(String pageTitle,
Space space,
int maxResultCount)
Searches for pages in the space specified, looking for those that have the given title in a previous version, and returns the first maxResultCount results. |
List |
findPreviousVersions(long originalContentId)
|
Iterator |
getAllCurrentEntities()
|
int |
getAuthoredPagesCountByUser(String username)
|
ContentEntityObject |
getById(long id)
|
int |
getCommentCountOnPage(long id)
Count the number of comments on the passed in page. |
List |
getContentAuthoredByUser(String username)
|
List |
getDescendentIds(Page page)
|
List<Page> |
getDescendents(Page page)
|
ContentEntityObject |
getFirstVersionAfter(long originalVersionContentId,
int version)
|
ContentEntityObject |
getFirstVersionBefore(long originalVersionContentId,
int version)
|
List<ContentEntityObject> |
getLastEditedVersionsOf(ContentEntityObject content)
Retrieves all the last edited versions for each user who has contributed to the specified piece of content. |
List |
getLockedContentBySpace(String spaceKey)
|
String |
getObjectType(long id)
|
List |
getOrphanedPages(String spaceKey)
|
Page |
getPage(Space space,
String pageTitle)
Get the page by space and title. |
Page |
getPage(String spaceKey,
String pageTitle)
Deprecated. |
Page |
getPage(String spaceKey,
String pageTitle,
boolean eagerLoadComments)
Deprecated. |
Page |
getPageById(long id)
Get the page with the given id. |
Page |
getPageByIdWithComments(long id)
Get the page with the given id, and perform an eager load of the comments and their children. |
List |
getPageInTrash(String spaceKey,
String title)
|
List |
getPages(Space space,
boolean currentOnly)
|
List |
getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)
|
List |
getPagesStartingWith(Space space,
String s)
|
Page |
getPageWithComments(Space space,
String pageTitle)
Get the page by space and title, and perform an eager load of the comments and their children. |
List |
getPermissionPages(Space space)
|
Class |
getPersistentClass()
|
Iterator |
getRecentlyAddedEntities(String spaceKey,
int maxResults)
|
List |
getRecentlyAddedPages(int maxCount,
String spaceKey)
|
List |
getRecentlyAuthoredPagesByUser(String username,
int maxCount)
|
Iterator |
getRecentlyModifiedEntities(int maxResults)
|
Iterator |
getRecentlyModifiedEntities(String spaceKey,
int maxResults)
|
Iterator |
getRecentlyModifiedEntitiesForUser(String username)
|
List |
getRecentlyModifiedForChangeDigest(Date fromDate)
Retrieves a list of ContentEntityObject s that have been newly added or modified
since the date specified. |
List |
getRecentlyUpdatedPages(int maxCount,
String spaceKey)
|
List<Page> |
getTopLevelPages(Space space)
|
List |
getTrashedContent(String spaceKey)
|
List |
getUndefinedPages(String spaceKey)
|
ContentEntityObject |
getVersion(long originalVersionContentId,
int version)
|
List |
getVersionHistorySummary(long originalContentId)
|
void |
refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
|
void |
remove(com.atlassian.core.bean.EntityObject object)
|
void |
removeFromPageKeyCache(String spaceKey,
String pageTitle)
Deprecated. |
void |
replicate(Object objectToReplicate)
|
void |
save(com.atlassian.core.bean.EntityObject objectToSave)
|
void |
save(com.atlassian.core.bean.EntityObject objectToSave,
com.atlassian.core.bean.EntityObject originalObject)
|
void |
saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingPageDao(PageDao delegateDao, PageIdCache pageIdCache)
Method Detail |
---|
public Page getPage(Space space, String pageTitle)
PageDao
getPage
in interface PageDao
space
- The space the page belongs topageTitle
- The title of the page
public Page getPageWithComments(Space space, String pageTitle)
PageDao
getPageWithComments
in interface PageDao
space
- The space the page belongs topageTitle
- The title of the page
@Deprecated public void removeFromPageKeyCache(String spaceKey, String pageTitle)
removeFromPageKeyCache
in interface PageDao
public void remove(com.atlassian.core.bean.EntityObject object)
remove
in interface ObjectDao
public void save(com.atlassian.core.bean.EntityObject objectToSave, com.atlassian.core.bean.EntityObject originalObject)
save
in interface VersionedObjectDao
public void save(com.atlassian.core.bean.EntityObject objectToSave)
save
in interface ObjectDao
public void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
saveRaw
in interface ObjectDao
public List findAll()
findAll
in interface ObjectDao
public List findAllSorted(String s)
findAllSorted
in interface ObjectDao
public long findLatestVersionsCount()
VersionedObjectDao
findLatestVersionsCount
in interface VersionedObjectDao
public Iterator findLatestVersionsIterator()
VersionedObjectDao
findLatestVersionsIterator
in interface VersionedObjectDao
public List findPagesWithHistoricalTitle(String pageTitle)
findPagesWithHistoricalTitle
in interface PageDao
public List findPreviousVersions(long originalContentId)
findPreviousVersions
in interface ContentEntityObjectDao
public List<AbstractPage> findPagesWithHistoricalTitleInPermittedSpace(String pageTitle, Space space, int maxResultCount)
PageDao
findPagesWithHistoricalTitleInPermittedSpace
in interface PageDao
pageTitle
- title of a page in a previous version.space
- Space to search. Must not be null.maxResultCount
- maximum pages to returnpublic List<AbstractPage> findPagesWithHistoricalTitleInAllPermittedSpacesExcept(String pageTitle, Space space, int maxResultCount)
PageDao
findPagesWithHistoricalTitleInAllPermittedSpacesExcept
in interface PageDao
pageTitle
- title of a page in a previous version.space
- Space to exclude from search. If null, all spaces are searched.maxResultCount
- maximum pages to returnpublic Iterator getAllCurrentEntities()
getAllCurrentEntities
in interface ContentEntityObjectDao
public int getAuthoredPagesCountByUser(String username)
getAuthoredPagesCountByUser
in interface PageDao
public ContentEntityObject getById(long id)
getById
in interface ContentEntityObjectDao
public List getContentAuthoredByUser(String username)
getContentAuthoredByUser
in interface ContentEntityObjectDao
public List getDescendentIds(Page page)
getDescendentIds
in interface PageDao
public List<Page> getDescendents(Page page)
getDescendents
in interface PageDao
public ContentEntityObject getFirstVersionAfter(long originalVersionContentId, int version)
getFirstVersionAfter
in interface ContentEntityObjectDao
public ContentEntityObject getFirstVersionBefore(long originalVersionContentId, int version)
getFirstVersionBefore
in interface ContentEntityObjectDao
public List getLockedContentBySpace(String spaceKey)
getLockedContentBySpace
in interface ContentEntityObjectDao
public String getObjectType(long id)
getObjectType
in interface ContentEntityObjectDao
public List getOrphanedPages(String spaceKey)
getOrphanedPages
in interface PageDao
public Page getPageById(long id)
PageDao
getPageById
in interface PageDao
id
- of the page to load
public Page getPageByIdWithComments(long id)
PageDao
getPageByIdWithComments
in interface PageDao
id
- of the page to load
public int getCommentCountOnPage(long id)
PageDao
getCommentCountOnPage
in interface PageDao
public List getPageInTrash(String spaceKey, String title)
getPageInTrash
in interface PageDao
public List getPages(Space space, boolean currentOnly)
getPages
in interface PageDao
public List getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)
getPagesCreatedOrUpdatedSinceDate
in interface PageDao
public List getPagesStartingWith(Space space, String s)
getPagesStartingWith
in interface PageDao
public List getPermissionPages(Space space)
getPermissionPages
in interface PageDao
public Class getPersistentClass()
getPersistentClass
in interface ObjectDao
public Iterator getRecentlyAddedEntities(String spaceKey, int maxResults)
getRecentlyAddedEntities
in interface ContentEntityObjectDao
public List getRecentlyAddedPages(int maxCount, String spaceKey)
getRecentlyAddedPages
in interface PageDao
public List getRecentlyAuthoredPagesByUser(String username, int maxCount)
getRecentlyAuthoredPagesByUser
in interface PageDao
public Iterator getRecentlyModifiedEntities(int maxResults)
getRecentlyModifiedEntities
in interface ContentEntityObjectDao
public Iterator getRecentlyModifiedEntities(String spaceKey, int maxResults)
getRecentlyModifiedEntities
in interface ContentEntityObjectDao
public Iterator getRecentlyModifiedEntitiesForUser(String username)
getRecentlyModifiedEntitiesForUser
in interface ContentEntityObjectDao
public List getRecentlyModifiedForChangeDigest(Date fromDate)
ContentEntityObjectDao
ContentEntityObject
s that have been newly added or modified
since the date specified. This list excludes drafts, space descriptions and mail.
getRecentlyModifiedForChangeDigest
in interface ContentEntityObjectDao
fromDate
- content modified after this date will be returned
ContentEntityObject
s that have been newly added or modified
since the date specifiedpublic List getRecentlyUpdatedPages(int maxCount, String spaceKey)
getRecentlyUpdatedPages
in interface PageDao
public List<Page> getTopLevelPages(Space space)
getTopLevelPages
in interface PageDao
public List getTrashedContent(String spaceKey)
getTrashedContent
in interface ContentEntityObjectDao
public List getUndefinedPages(String spaceKey)
getUndefinedPages
in interface PageDao
public ContentEntityObject getVersion(long originalVersionContentId, int version)
getVersion
in interface ContentEntityObjectDao
public List getVersionHistorySummary(long originalContentId)
getVersionHistorySummary
in interface ContentEntityObjectDao
public void refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
refresh
in interface ObjectDao
public void replicate(Object objectToReplicate)
replicate
in interface ObjectDao
@Deprecated public Page getPage(String spaceKey, String pageTitle, boolean eagerLoadComments)
PageDao
getPage
in interface PageDao
spaceKey
- to match withpageTitle
- to match witheagerLoadComments
- true if comments should be loaded eagerly
@Deprecated public Page getPage(String spaceKey, String pageTitle)
getPage
in interface PageDao
public List<ContentEntityObject> getLastEditedVersionsOf(ContentEntityObject content)
ContentEntityObjectDao
getLastEditedVersionsOf
in interface ContentEntityObjectDao
content
- content (must be the latest version)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |