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
 java.util.List findPagesWithHistoricalTitle(java.lang.String pageTitle)
          Deprecated. since 3.1. Use #findPagesWithHistoricalTitleInPermittedSpace or #findPagesWithHistoricalTitleInAllPermittedSpacesExcept .
 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.
 int getAuthoredPagesCountByUser(java.lang.String username)
           
 int getCommentCountOnPage(long id)
          Count the number of comments on the passed in page.
 java.util.List getDescendentIds(Page page)
           
 java.util.List<Page> getDescendents(Page page)
           
 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. since 3.0, use getPage(Space, String)
 Page getPage(java.lang.String spaceKey, java.lang.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.
 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.util.List getRecentlyAddedPages(int maxCount, java.lang.String spaceKey)
           
 java.util.List getRecentlyAuthoredPagesByUser(java.lang.String username, int maxCount)
           
 java.util.List getRecentlyUpdatedPages(int maxCount, java.lang.String spaceKey)
           
 java.util.List<Page> getTopLevelPages(Space space)
           
 java.util.List getUndefinedPages(java.lang.String spaceKey)
           
 void removeFromPageKeyCache(java.lang.String spaceKey, java.lang.String pageTitle)
          Deprecated. since 3.0
 
Methods inherited from interface com.atlassian.confluence.core.persistence.ContentEntityObjectDao
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, 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(java.lang.String spaceKey,
                        java.lang.String pageTitle)
Deprecated. since 3.0, use getPage(Space, String)


getPage

@Deprecated
Page getPage(java.lang.String spaceKey,
                        java.lang.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,
             java.lang.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,
                         java.lang.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

java.util.List getPages(Space space,
                        boolean currentOnly)

getPagesStartingWith

java.util.List getPagesStartingWith(Space space,
                                    java.lang.String s)

getRecentlyAddedPages

java.util.List getRecentlyAddedPages(int maxCount,
                                     java.lang.String spaceKey)

getRecentlyUpdatedPages

java.util.List getRecentlyUpdatedPages(int maxCount,
                                       java.lang.String spaceKey)

getOrphanedPages

java.util.List getOrphanedPages(java.lang.String spaceKey)

getUndefinedPages

java.util.List getUndefinedPages(java.lang.String spaceKey)

getPermissionPages

java.util.List getPermissionPages(Space space)

getAuthoredPagesCountByUser

int getAuthoredPagesCountByUser(java.lang.String username)

getRecentlyAuthoredPagesByUser

java.util.List getRecentlyAuthoredPagesByUser(java.lang.String username,
                                              int maxCount)

getPagesCreatedOrUpdatedSinceDate

java.util.List getPagesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)

removeFromPageKeyCache

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


findPagesWithHistoricalTitle

@Deprecated
java.util.List findPagesWithHistoricalTitle(java.lang.String pageTitle)
Deprecated. since 3.1. Use #findPagesWithHistoricalTitleInPermittedSpace or #findPagesWithHistoricalTitleInAllPermittedSpacesExcept .


findPagesWithHistoricalTitleInPermittedSpace

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.

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

findPagesWithHistoricalTitleInAllPermittedSpacesExcept

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.

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

java.util.List getPageInTrash(java.lang.String spaceKey,
                              java.lang.String title)

getDescendents

java.util.List<Page> getDescendents(Page page)

getDescendentIds

java.util.List getDescendentIds(Page page)

getTopLevelPages

java.util.List<Page> getTopLevelPages(Space space)


Copyright © 2003-2010 Atlassian. All Rights Reserved.