|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 | |
---|---|
java.util.List |
findAll()
Find all objects currently persisted of a particular type. |
java.util.List |
findAllSorted(java.lang.String s)
Find all objects currently persisted of a particular type and sort results by named property. |
long |
findLatestVersionsCount()
Returns the number of results for the latest versions of the current persistent class. |
java.util.Iterator |
findLatestVersionsIterator()
Returns an iterator for the latest versions of the current persistent class. |
java.util.List |
findPagesWithHistoricalTitle(java.lang.String pageTitle)
|
java.util.List<AbstractPage> |
findPagesWithHistoricalTitleInAllPermittedSpacesExcept(java.lang.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. |
java.util.List<AbstractPage> |
findPagesWithHistoricalTitleInPermittedSpace(java.lang.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. |
java.util.List |
findPreviousVersions(long originalContentId)
|
java.util.Iterator |
getAllCurrentEntities()
|
int |
getAuthoredPagesCountByUser(java.lang.String username)
|
ContentEntityObject |
getById(long id)
|
int |
getCommentCountOnPage(long id)
Count the number of comments on the passed in page. |
java.util.List |
getContentAuthoredByUser(java.lang.String username)
|
java.util.List |
getDescendentIds(Page page)
|
java.util.List<Page> |
getDescendents(Page page)
|
ContentEntityObject |
getFirstVersionAfter(long originalVersionContentId,
int version)
|
ContentEntityObject |
getFirstVersionBefore(long originalVersionContentId,
int version)
|
java.util.List<ContentEntityObject> |
getLastEditedVersionsOf(ContentEntityObject content)
Retrieves all the last edited versions for each user who has contributed to the specified piece of content. |
java.util.List |
getLockedContentBySpace(java.lang.String spaceKey)
|
java.lang.String |
getObjectType(long id)
|
java.util.List |
getOrphanedPages(java.lang.String spaceKey)
|
Page |
getPage(Space space,
java.lang.String pageTitle)
Get the page by space and title. |
Page |
getPage(java.lang.String spaceKey,
java.lang.String pageTitle)
Deprecated. |
Page |
getPage(java.lang.String spaceKey,
java.lang.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. |
java.util.List |
getPageInTrash(java.lang.String spaceKey,
java.lang.String title)
|
java.util.List |
getPages(Space space,
boolean currentOnly)
|
java.util.List |
getPagesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
|
java.util.List |
getPagesStartingWith(Space space,
java.lang.String s)
|
Page |
getPageWithComments(Space space,
java.lang.String pageTitle)
Get the page by space and title, and perform an eager load of the comments and their children. |
java.util.List |
getPermissionPages(Space space)
|
java.lang.Class |
getPersistentClass()
|
java.util.Iterator |
getRecentlyAddedEntities(java.lang.String spaceKey,
int maxResults)
|
java.util.List |
getRecentlyAddedPages(int maxCount,
java.lang.String spaceKey)
|
java.util.List |
getRecentlyAuthoredPagesByUser(java.lang.String username,
int maxCount)
|
java.util.Iterator |
getRecentlyModifiedEntities(int maxResults)
|
java.util.Iterator |
getRecentlyModifiedEntities(java.lang.String spaceKey,
int maxResults)
|
java.util.Iterator |
getRecentlyModifiedEntitiesForUser(java.lang.String username)
|
java.util.List |
getRecentlyModifiedForChangeDigest(java.util.Date fromDate)
Retrieves a list of ContentEntityObject s that have been newly added or modified
since the date specified. |
java.util.List |
getRecentlyUpdatedPages(int maxCount,
java.lang.String spaceKey)
|
java.util.List<Page> |
getTopLevelPages(Space space)
|
java.util.List |
getTrashedContent(java.lang.String spaceKey)
|
java.util.List |
getUndefinedPages(java.lang.String spaceKey)
|
ContentEntityObject |
getVersion(long originalVersionContentId,
int version)
|
java.util.List |
getVersionHistorySummary(long originalContentId)
|
void |
refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
Refreshes the object again with the fresh data from db. |
void |
remove(com.atlassian.core.bean.EntityObject object)
Remove object from persistence. |
void |
removeFromPageKeyCache(java.lang.String spaceKey,
java.lang.String pageTitle)
Deprecated. |
void |
replicate(java.lang.Object objectToReplicate)
Replicate the object. |
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)
saves the object. |
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, java.lang.String pageTitle)
PageDao
getPage
in interface PageDao
space
- The space the page belongs topageTitle
- The title of the page
public Page getPageWithComments(Space space, java.lang.String pageTitle)
PageDao
getPageWithComments
in interface PageDao
space
- The space the page belongs topageTitle
- The title of the page
@Deprecated public void removeFromPageKeyCache(java.lang.String spaceKey, java.lang.String pageTitle)
removeFromPageKeyCache
in interface PageDao
public void remove(com.atlassian.core.bean.EntityObject object)
ObjectDao
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)
ObjectDao
saveRaw
in interface ObjectDao
public java.util.List findAll()
ObjectDao
findAll
in interface ObjectDao
public java.util.List findAllSorted(java.lang.String s)
ObjectDao
findAllSorted
in interface ObjectDao
public long findLatestVersionsCount()
VersionedObjectDao
findLatestVersionsCount
in interface VersionedObjectDao
public java.util.Iterator findLatestVersionsIterator()
VersionedObjectDao
findLatestVersionsIterator
in interface VersionedObjectDao
public java.util.List findPagesWithHistoricalTitle(java.lang.String pageTitle)
findPagesWithHistoricalTitle
in interface PageDao
public java.util.List findPreviousVersions(long originalContentId)
findPreviousVersions
in interface ContentEntityObjectDao
public java.util.List<AbstractPage> findPagesWithHistoricalTitleInPermittedSpace(java.lang.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 java.util.List<AbstractPage> findPagesWithHistoricalTitleInAllPermittedSpacesExcept(java.lang.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 java.util.Iterator getAllCurrentEntities()
getAllCurrentEntities
in interface ContentEntityObjectDao
public int getAuthoredPagesCountByUser(java.lang.String username)
getAuthoredPagesCountByUser
in interface PageDao
public ContentEntityObject getById(long id)
getById
in interface ContentEntityObjectDao
public java.util.List getContentAuthoredByUser(java.lang.String username)
getContentAuthoredByUser
in interface ContentEntityObjectDao
public java.util.List getDescendentIds(Page page)
getDescendentIds
in interface PageDao
public java.util.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 java.util.List getLockedContentBySpace(java.lang.String spaceKey)
getLockedContentBySpace
in interface ContentEntityObjectDao
public java.lang.String getObjectType(long id)
getObjectType
in interface ContentEntityObjectDao
public java.util.List getOrphanedPages(java.lang.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 java.util.List getPageInTrash(java.lang.String spaceKey, java.lang.String title)
getPageInTrash
in interface PageDao
public java.util.List getPages(Space space, boolean currentOnly)
getPages
in interface PageDao
public java.util.List getPagesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
getPagesCreatedOrUpdatedSinceDate
in interface PageDao
public java.util.List getPagesStartingWith(Space space, java.lang.String s)
getPagesStartingWith
in interface PageDao
public java.util.List getPermissionPages(Space space)
getPermissionPages
in interface PageDao
public java.lang.Class getPersistentClass()
getPersistentClass
in interface ObjectDao
public java.util.Iterator getRecentlyAddedEntities(java.lang.String spaceKey, int maxResults)
getRecentlyAddedEntities
in interface ContentEntityObjectDao
public java.util.List getRecentlyAddedPages(int maxCount, java.lang.String spaceKey)
getRecentlyAddedPages
in interface PageDao
public java.util.List getRecentlyAuthoredPagesByUser(java.lang.String username, int maxCount)
getRecentlyAuthoredPagesByUser
in interface PageDao
public java.util.Iterator getRecentlyModifiedEntities(int maxResults)
getRecentlyModifiedEntities
in interface ContentEntityObjectDao
public java.util.Iterator getRecentlyModifiedEntities(java.lang.String spaceKey, int maxResults)
getRecentlyModifiedEntities
in interface ContentEntityObjectDao
public java.util.Iterator getRecentlyModifiedEntitiesForUser(java.lang.String username)
getRecentlyModifiedEntitiesForUser
in interface ContentEntityObjectDao
public java.util.List getRecentlyModifiedForChangeDigest(java.util.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 java.util.List getRecentlyUpdatedPages(int maxCount, java.lang.String spaceKey)
getRecentlyUpdatedPages
in interface PageDao
public java.util.List<Page> getTopLevelPages(Space space)
getTopLevelPages
in interface PageDao
public java.util.List getTrashedContent(java.lang.String spaceKey)
getTrashedContent
in interface ContentEntityObjectDao
public java.util.List getUndefinedPages(java.lang.String spaceKey)
getUndefinedPages
in interface PageDao
public ContentEntityObject getVersion(long originalVersionContentId, int version)
getVersion
in interface ContentEntityObjectDao
public java.util.List getVersionHistorySummary(long originalContentId)
getVersionHistorySummary
in interface ContentEntityObjectDao
public void refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
ObjectDao
refresh
in interface ObjectDao
public void replicate(java.lang.Object objectToReplicate)
ObjectDao
replicate
in interface ObjectDao
@Deprecated public Page getPage(java.lang.String spaceKey, java.lang.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(java.lang.String spaceKey, java.lang.String pageTitle)
getPage
in interface PageDao
public java.util.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 |