com.atlassian.confluence.pages.persistence.dao
Interface PageDao

All Superinterfaces:
ContentEntityObjectDao, ObjectDao, VersionedObjectDao
All Known Implementing Classes:
CachingPageDao, HibernatePageDao

public interface PageDao
extends ContentEntityObjectDao


Method Summary
 List<AbstractPage> findBlogsWithHistoricalTitleInPermittedSpace(String blogTitle, Space space, int maxResultCount)
          Searches for blogs in the space specified, looking for those that have the given title in a previous version, and returns the first maxResultCount results.
 List<Page> findPagesWithHistoricalTitle(String pageTitle)
          Deprecated. since 3.1. Use #findPagesWithHistoricalTitleInPermittedSpace or #findPagesWithHistoricalTitleInAllPermittedSpacesExcept .
 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.
 int getAuthoredPagesCountByUser(String username)
           
 int getCommentCountOnPage(long id)
          Count the number of comments on the passed in page.
 List<Long> getDescendentIds(Page page)
           
 List<Page> getDescendents(Page page)
           
 Integer getMaxSiblingPosition(Page page)
          Gets the highest position value of all the page's siblings.
 List<Page> getOrphanedPages(String spaceKey)
           
 Page getPage(Space space, String pageTitle)
          Get the page by space and title.
 Page getPage(String spaceKey, String pageTitle)
          Deprecated. since 3.0, use getPage(Space, String)
 Page getPage(String spaceKey, String pageTitle, boolean eagerLoadComments)
          Deprecated. since 3.0, use getPageWithComments(Space, String)
 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<Page> getPageInTrash(String spaceKey, String title)
           
 List<Page> getPages(Space space, boolean currentOnly)
           
 List<Page> getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)
           
 List<Page> 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<Page> getPermissionPages(Space space)
           
 List<Page> getRecentlyAddedPages(int maxCount, String spaceKey)
           
 List<Page> getRecentlyAuthoredPagesByUser(String username, int maxCount)
           
 List<Page> getRecentlyUpdatedPages(int maxCount, String spaceKey)
           
 List<Page> getTopLevelPages(Space space)
           
 List<Page> getUndefinedPages(String spaceKey)
           
 void removeFromPageKeyCache(String spaceKey, String pageTitle)
          Deprecated. since 3.0
 
Methods inherited from interface com.atlassian.confluence.core.persistence.ContentEntityObjectDao
countContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findPreviousVersions, getAllCurrentEntities, getById, getContentAuthoredByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getLockedContentBySpace, getObjectType, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionHistorySummary
 
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

getPageById

Page getPageById(long id)
Get the page with the given id.

Parameters:
id - of the page to load
Returns:
the page with the given id, or null if no such page exists

getPageByIdWithComments

Page getPageByIdWithComments(long id)
Get the page with the given id, and perform an eager load of the comments and their children. This can be used as a performance optimisation when it is known that all comments will be displayed.

Parameters:
id - of the page to load
Returns:
the page with the given id, or null if no such page exists

getCommentCountOnPage

int getCommentCountOnPage(long id)
Count the number of comments on the passed in page.


getPage

@Deprecated
Page getPage(String spaceKey,
                        String pageTitle)
Deprecated. since 3.0, use getPage(Space, String)


getPage

@Deprecated
Page getPage(String spaceKey,
                        String pageTitle,
                        boolean eagerLoadComments)
Deprecated. since 3.0, use getPageWithComments(Space, String)

Get the page by space key and title, and perform an eager load of the comments and their children. This can be used as a performance optimisation when it is known that all comments will be displayed.

Parameters:
spaceKey - to match with
pageTitle - to match with
eagerLoadComments - true if comments should be loaded eagerly
Returns:
the page

getPage

Page getPage(Space space,
             String pageTitle)
Get the page by space and title.

Parameters:
space - The space the page belongs to
pageTitle - The title of the page
Returns:
the page with the given title in the given space, or null if no such page exists

getPageWithComments

Page getPageWithComments(Space space,
                         String pageTitle)
Get the page by space and title, and perform an eager load of the comments and their children. This can be used as a performance optimisation when it is known that all comments will be displayed.

Parameters:
space - The space the page belongs to
pageTitle - The title of the page
Returns:
the page with the given title in the given space, or null if no such page exists

getPages

List<Page> getPages(Space space,
                    boolean currentOnly)

getPagesStartingWith

List<Page> getPagesStartingWith(Space space,
                                String s)

getRecentlyAddedPages

List<Page> getRecentlyAddedPages(int maxCount,
                                 String spaceKey)

getRecentlyUpdatedPages

List<Page> getRecentlyUpdatedPages(int maxCount,
                                   String spaceKey)

getOrphanedPages

List<Page> getOrphanedPages(String spaceKey)

getUndefinedPages

List<Page> getUndefinedPages(String spaceKey)

getPermissionPages

List<Page> getPermissionPages(Space space)

getAuthoredPagesCountByUser

int getAuthoredPagesCountByUser(String username)

getRecentlyAuthoredPagesByUser

List<Page> getRecentlyAuthoredPagesByUser(String username,
                                          int maxCount)

getPagesCreatedOrUpdatedSinceDate

List<Page> getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)

removeFromPageKeyCache

@Deprecated
void removeFromPageKeyCache(String spaceKey,
                                       String pageTitle)
Deprecated. since 3.0


findPagesWithHistoricalTitle

@Deprecated
List<Page> findPagesWithHistoricalTitle(String pageTitle)
Deprecated. since 3.1. Use #findPagesWithHistoricalTitleInPermittedSpace or #findPagesWithHistoricalTitleInAllPermittedSpacesExcept .


findPagesWithHistoricalTitleInPermittedSpace

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.

Only pages in spaces the remote user is able to view will be returned.

Parameters:
pageTitle - title of a page in a previous version.
space - Space to search. Must not be null.
maxResultCount - maximum pages to return

findBlogsWithHistoricalTitleInPermittedSpace

List<AbstractPage> findBlogsWithHistoricalTitleInPermittedSpace(String blogTitle,
                                                                Space space,
                                                                int maxResultCount)
Searches for blogs in the space specified, looking for those that have the given title in a previous version, and returns the first maxResultCount results.

Only blogs in spaces the remote user is able to view will be returned.

Parameters:
blogTitle - title of a page in a previous version.
space - Space to search. Must not be null.
maxResultCount - maximum pages to return
Returns:
a list of pages that have the given title in a previous version

findPagesWithHistoricalTitleInAllPermittedSpacesExcept

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.

Only pages in spaces the remote user is able to view will be returned.

Parameters:
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 return

getPageInTrash

List<Page> getPageInTrash(String spaceKey,
                          String title)

getDescendents

List<Page> getDescendents(Page page)

getDescendentIds

List<Long> getDescendentIds(Page page)

getTopLevelPages

List<Page> getTopLevelPages(Space space)

getMaxSiblingPosition

Integer getMaxSiblingPosition(Page page)
Gets the highest position value of all the page's siblings. This is useful when we need to find what position to assign to a new page that should go to the bottom.

Parameters:
page - The page whose siblings from which to get the max position
Returns:
The highest position value of all the page's siblings
Since:
3.5.12


Copyright © 2003-2011 Atlassian. All Rights Reserved.