public class HibernatePageDao extends AbstractContentEntityObjectHibernateDao<Page> implements PageDaoInternal
HibernateObjectDao.CacheabilitycacheFactory, confluenceUserDao| Constructor and Description |
|---|
HibernatePageDao() |
| Modifier and Type | Method and Description |
|---|---|
int |
countAllPages()
Counts the total number of all page entities across all spaces, including non-current pages
|
int |
countCurrentPages()
Counts the total number of current pages across all spaces
|
int |
countDraftPages()
Counts the number of pages that are drafts.
|
int |
countPagesInSubtree(@NonNull Page page)
Return total descendant page including input page
|
int |
countPagesWithUnpublishedChanges()
Counts the number of published pages that have unpublished changes.
|
List<AbstractPage> |
findBlogsWithCurrentOrHistoricalTitleInAllPermittedSpacesExcept(SpacePermissionQueryBuilder permissionQueryBuilder,
String blogTitle,
Space space,
int maxResultCount)
Searches for blog posts in all spaces except the one specified, looking for those that have the given title in a
current or previous version, and returns the first maxResultCount results.
|
List<AbstractPage> |
findBlogsWithCurrentOrHistoricalTitleInPermittedSpace(SpacePermissionQueryBuilder permissionQueryBuilder,
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<ContentPermissionSummary> |
findContentPermissionSummaryByIds(Collection<Long> ids)
Get Content creator for bulk permission checking
|
PageResponse<Page> |
findCurrentPages(LimitedRequest request)
Find all current pages.
|
List<AbstractPage> |
findPagesWithCurrentOrHistoricalTitleInAllPermittedSpacesExcept(SpacePermissionQueryBuilder permissionQueryBuilder,
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> |
findPagesWithCurrentOrHistoricalTitleInPermittedSpace(SpacePermissionQueryBuilder permissionQueryBuilder,
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.
|
PageResponse<AbstractPage> |
getAbstractPages(org.joda.time.DateTime date,
List<ContentStatus> statuses,
LimitedRequest pageRequest,
com.google.common.base.Predicate<? super AbstractPage> filter)
Deprecated.
|
PageResponse<AbstractPage> |
getAbstractPages(List<ContentType> contentTypes,
List<ContentStatus> statuses,
LimitedRequest pageRequest,
com.google.common.base.Predicate<? super AbstractPage> filter)
Deprecated.
|
PageResponse<AbstractPage> |
getAbstractPages(Space space,
List<ContentType> contentTypes,
List<ContentStatus> statuses,
LimitedRequest pageRequest,
@Nullable com.google.common.base.Predicate<? super AbstractPage> filter)
Deprecated.
|
PageResponse<AbstractPage> |
getAbstractPages(Space space,
String title,
List<ContentStatus> statuses,
LimitedRequest pageRequest,
com.google.common.base.Predicate<? super AbstractPage> filter)
Deprecated.
|
PageResponse<AbstractPage> |
getAbstractPages(String title,
List<ContentStatus> statuses,
LimitedRequest pageRequest,
com.google.common.base.Predicate<? super AbstractPage> filter)
Deprecated.
|
PageResponse<AbstractPage> |
getAbstractPagesByCreationDate(org.joda.time.DateTime date,
LimitedRequest pageRequest,
com.google.common.base.Predicate<? super AbstractPage> filter)
Deprecated.
|
PageResponse<AbstractPage> |
getAbstractPagesByTitle(String title,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super AbstractPage> filter)
Deprecated.
|
PageResponse<Page> |
getAllChildren(Page page,
LimitedRequest pageRequest,
Depth depth)
Returns all children of a page (including drafts), limited to the pagination requested.
|
Map<Long,List<Long>> |
getAncestorsFor(Collection<Long> ids)
Get the list page ids of the ancestors of the given page ids.
|
int |
getAuthoredPagesCountByUser(String username) |
PageResponse<BlogPost> |
getBlogPosts(Space space,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super BlogPost> filter)
Deprecated.
|
PageResponse<Page> |
getChildren(Page page,
LimitedRequest pageRequest,
com.google.common.base.Predicate<? super Page> predicate,
Depth depth)
Deprecated.
|
int |
getCommentCountOnPage(long id)
Count the number of comments on the passed in page.
|
List<Long> |
getDescendantIds(Page page)
Finds the ids of all descendant pages of the given page
|
List<Long> |
getDescendantIds(Page page,
ContentStatus... contentStatus)
Finds the ids of all descendant pages of the given page
|
List<Page> |
getDescendants(Page page)
Finds all descendant pages (recursive) of the given page
|
List<String> |
getDescendantTitles(Page page)
Finds all descendant titles of the given page
|
PageResponse<Page> |
getDraftChildren(Page page,
LimitedRequest pageRequest,
Depth depth)
Returns the children of a page which have a status of DRAFT, limited to the pagination requested.
|
Integer |
getMaxSiblingPosition(Page page)
Gets the highest position value of all the page's siblings.
|
Date |
getOldestPageCreationDate()
Gets the creation date of the oldest page.
|
List<Page> |
getOrphanedPages(@Nullable String spaceKey) |
Page |
getPage(Space space,
String pageTitle)
Get the page by space and title.
|
Page |
getPage(Space space,
String pageTitle,
boolean eagerLoadComments) |
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.
|
long |
getPageCount(@NonNull String spaceKey)
Get total number of current pages in a space
|
Collection<Long> |
getPageIds(Space space)
Get the ids of all pages (current and historical) in the given space.
|
List<Page> |
getPageInTrash(String spaceKey,
String title) |
PageResponse<Page> |
getPages(LimitedRequest pageRequest,
com.google.common.base.Predicate<? super Page> filter)
Deprecated.
|
List<Page> |
getPages(Space space,
boolean currentOnly) |
PageResponse<Page> |
getPages(Space space,
LimitedRequest pageRequest,
com.google.common.base.Predicate<? super Page> filter)
Deprecated.
|
List<Page> |
getPagesByIds(Iterable<Long> ids)
Get the pages with the given ids.
|
List<Page> |
getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate) |
List<Page> |
getPagesStartingWith(Space space,
String s) |
Optional<PageStatisticsDTO> |
getPageStatistics()
Fetches statistics about pages
|
List<Page> |
getPagesWithPermissions(@NonNull Space space)
Get all current pages in a space and eagerly fetch permissions at the same time.
|
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) |
Class |
getPersistentClass()
Gets the type of
EntityObject this Dao works with. |
List<Page> |
getRecentlyAddedPages(int maxCount,
@Nullable String spaceKey) |
List<Page> |
getRecentlyAuthoredPagesByUser(String username,
int maxCount) |
List<Page> |
getRecentlyUpdatedPages(int maxCount,
@Nullable String spaceKey) |
List<Page> |
getTopLevelPages(Space space) |
PageResponse<Page> |
getTopLevelPages(Space space,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super Page> predicate)
Deprecated.
|
List<OutgoingLink> |
getUndefinedLinks(@Nullable String spaceKey) |
List<Page> |
getUndefinedPages(@Nullable String spaceKey)
Deprecated.
since 6.6.0, use
getUndefinedLinks(String) |
countContentBySpaceIdAndStatus, findAllDraftsFor, findAllLegacyDraftsFor, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findDraftFor, findHistoricalVersionsAfterVersion, findPreviousVersions, findUnpublishedContentWithUserContributions, getAllCurrentEntities, getByClassId, getById, getContentAuthoredByUser, getContributionStatusByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getObjectType, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getTrashedContents, getVersion, getVersionEditContributors, getVersionHistorySummary, getVersionHistorySummary, getVersionsLastEditedByUser, getVersionsLastEditedByUserNewfindAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, saveEntity, setCacheFactory, setConfluenceUserDao, updateEntityModificationData, updateModificationDataapplyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findByClassIds, findByClassIdsFiltered, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, getHibernateTemplate, getSession, getSessionFactory, index, indexEntity, refresh, refreshEntity, reIndex, reIndexEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, unIndexEntity, uniqueResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFilteredAbstractPages, getFilteredAbstractPages, getFilteredAbstractPages, getFilteredAbstractPages, getFilteredAbstractPages, getFilteredAbstractPagesByCreationDate, getFilteredAbstractPagesByTitle, getFilteredBlogPosts, getFilteredChildren, getFilteredPages, getFilteredPages, getFilteredTopLevelPagesfindContentBySpaceIdAndStatusAndFiltercountContentBySpaceIdAndStatus, findAllDraftsFor, findAllLegacyDraftsFor, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findDraftFor, findHistoricalVersionsAfterVersion, findPreviousVersions, findUnpublishedContentWithUserContributions, getAllCurrentEntities, getById, getContentAuthoredByUser, getContributionStatusByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getObjectType, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getTrashedContents, getVersion, getVersionEditContributors, getVersionHistorySummary, getVersionHistorySummary, getVersionsLastEditedByUser, getVersionsLastEditedByUserNewsaveEntityfindLatestVersionsCount, findLatestVersionsIterator, savefindAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntitypublic Page getPageById(long id)
PageDaogetPageById in interface PageDaoid - of the page to loadpublic List<Page> getPagesByIds(Iterable<Long> ids)
PageDaogetPagesByIds in interface PageDaopublic int getCommentCountOnPage(long id)
PageDaogetCommentCountOnPage in interface PageDaopublic Page getPageByIdWithComments(long id)
PageDaogetPageByIdWithComments in interface PageDaoid - of the page to loadpublic Page getPageWithComments(Space space, String pageTitle)
PageDaogetPageWithComments in interface PageDaospace - The space the page belongs topageTitle - The title of the pagepublic Page getPage(Space space, String pageTitle)
PageDaopublic List<Page> getPagesWithPermissions(@NonNull Space space)
PageDaogetPagesWithPermissions in interface PageDao@Deprecated public PageResponse<Page> getPages(LimitedRequest pageRequest, com.google.common.base.Predicate<? super Page> filter)
PageDaoInternal.getFilteredPages(LimitedRequest, java.util.function.Predicate)PageDao@Deprecated public PageResponse<Page> getPages(Space space, LimitedRequest pageRequest, com.google.common.base.Predicate<? super Page> filter)
PageDaoInternal.getFilteredPages(Space, LimitedRequest, java.util.function.Predicate)PageDao@Deprecated public PageResponse<BlogPost> getBlogPosts(Space space, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super BlogPost> filter)
PageDaoInternal.getFilteredBlogPosts(Space, LimitedRequest, java.util.function.Predicate)PageDaogetBlogPosts in interface PageDaospace - the space to locate the blog posts inlimitedRequest - the start and offset of the pages to retrievefilter - the predicate to filter the returned results by, may be null@Deprecated public PageResponse<AbstractPage> getAbstractPages(Space space, List<ContentType> contentTypes, List<ContentStatus> statuses, LimitedRequest pageRequest, @Nullable com.google.common.base.Predicate<? super AbstractPage> filter)
PageDaoInternal.getFilteredAbstractPages(Space, List, List, LimitedRequest, java.util.function.Predicate)PageDaogetAbstractPages in interface PageDaospace - the space to locate the page incontentTypes - list of content types to findstatuses - list of statuses the pages can be inpageRequest - the pagination requestfilter - the predicate to pages the returned results by, may be null@Deprecated public PageResponse<AbstractPage> getAbstractPages(List<ContentType> contentTypes, List<ContentStatus> statuses, LimitedRequest pageRequest, com.google.common.base.Predicate<? super AbstractPage> filter)
PageDaoInternal.getFilteredAbstractPages(List, List, LimitedRequest, java.util.function.Predicate) )}PageDaogetAbstractPages in interface PageDaocontentTypes - list of content types to findstatuses - list of statuses the pages can be inpageRequest - the start and offset of the pages to retrievefilter - the predicate to filter the returned results by, may be nullpublic Collection<Long> getPageIds(Space space)
PageDaogetPageIds in interface PageDaospace - space to retrieve page ids from, can not be null.@Deprecated public PageResponse<AbstractPage> getAbstractPagesByTitle(String title, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super AbstractPage> filter)
PageDaoInternal.getFilteredAbstractPagesByTitle(String, LimitedRequest, java.util.function.Predicate)PageDaogetAbstractPagesByTitle in interface PageDaotitle - the title of the page to matchlimitedRequest - the pagination requestedfilter - the predicate to apply to the results before returning@Deprecated public PageResponse<AbstractPage> getAbstractPagesByCreationDate(org.joda.time.DateTime date, LimitedRequest pageRequest, com.google.common.base.Predicate<? super AbstractPage> filter)
PageDaoInternal.getFilteredAbstractPagesByCreationDate(DateTime, LimitedRequest, java.util.function.Predicate)PageDaogetAbstractPagesByCreationDate in interface PageDaodate - - the creation date to matchpageRequest - the pagination requestfilter - the predicate to apply to the results before returning@Deprecated public PageResponse<AbstractPage> getAbstractPages(Space space, String title, List<ContentStatus> statuses, LimitedRequest pageRequest, com.google.common.base.Predicate<? super AbstractPage> filter)
PageDaoInternal.getFilteredAbstractPages(Space, String, List, LimitedRequest, java.util.function.Predicate)PageDaogetAbstractPages in interface PageDaospace - space the page belongs totitle - the title of the page to matchstatuses - list of statuses the content can be inpageRequest - the pagination requestedfilter - the predicate to apply to the results before returning@Deprecated public PageResponse<AbstractPage> getAbstractPages(String title, List<ContentStatus> statuses, LimitedRequest pageRequest, com.google.common.base.Predicate<? super AbstractPage> filter)
PageDaoInternal.getFilteredAbstractPages(String, List, LimitedRequest, java.util.function.Predicate)PageDaogetAbstractPages in interface PageDaotitle - the title of the page to matchstatuses - list of statuses the content can be inpageRequest - the pagination requestedfilter - the predicate to apply to the results before returning@Deprecated public PageResponse<AbstractPage> getAbstractPages(org.joda.time.DateTime date, List<ContentStatus> statuses, LimitedRequest pageRequest, com.google.common.base.Predicate<? super AbstractPage> filter)
PageDaoInternal.getFilteredAbstractPages(DateTime, List, LimitedRequest, java.util.function.Predicate)PageDaogetAbstractPages in interface PageDaodate - the creation date to matchstatuses - list of statuses the content can be inpageRequest - the pagination requestfilter - the predicate to apply to the results before returningpublic List<Page> getPagesStartingWith(Space space, String s)
getPagesStartingWith in interface PageDaopublic List<Page> getRecentlyAddedPages(int maxCount, @Nullable String spaceKey)
getRecentlyAddedPages in interface PageDaopublic List<Page> getRecentlyUpdatedPages(int maxCount, @Nullable String spaceKey)
getRecentlyUpdatedPages in interface PageDaopublic List<Page> getOrphanedPages(@Nullable String spaceKey)
getOrphanedPages in interface PageDao@Deprecated public List<Page> getUndefinedPages(@Nullable String spaceKey)
getUndefinedLinks(String)getUndefinedPages in interface PageDaopublic final List<OutgoingLink> getUndefinedLinks(@Nullable String spaceKey)
getUndefinedLinks in interface PageDaopublic List<Page> getPermissionPages(Space space)
getPermissionPages in interface PageDaopublic int getAuthoredPagesCountByUser(String username)
getAuthoredPagesCountByUser in interface PageDaopublic List<Page> getRecentlyAuthoredPagesByUser(String username, int maxCount)
getRecentlyAuthoredPagesByUser in interface PageDaopublic List<Page> getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)
getPagesCreatedOrUpdatedSinceDate in interface PageDaopublic Class getPersistentClass()
ObjectDaoInternalEntityObject this Dao works with.getPersistentClass in interface ObjectDaogetPersistentClass in interface ObjectDaoInternal<Page>public List<AbstractPage> findPagesWithCurrentOrHistoricalTitleInPermittedSpace(SpacePermissionQueryBuilder permissionQueryBuilder, String pageTitle, Space space, int maxResultCount)
PageDaoOnly pages in spaces the remote user is able to view will be returned.
findPagesWithCurrentOrHistoricalTitleInPermittedSpace in interface PageDaopageTitle - title of a page in a previous version.space - Space to search. Must not be null.maxResultCount - maximum pages to returnpublic List<AbstractPage> findBlogsWithCurrentOrHistoricalTitleInPermittedSpace(SpacePermissionQueryBuilder permissionQueryBuilder, String blogTitle, Space space, int maxResultCount)
PageDaoOnly blogs in spaces the remote user is able to view will be returned.
findBlogsWithCurrentOrHistoricalTitleInPermittedSpace in interface PageDaopermissionQueryBuilder - required to determine how to construct database queries for space permissions, for
the current userblogTitle - title of a page in a previous version.space - Space to search. Must not be null.maxResultCount - maximum pages to returnpublic List<AbstractPage> findBlogsWithCurrentOrHistoricalTitleInAllPermittedSpacesExcept(SpacePermissionQueryBuilder permissionQueryBuilder, String blogTitle, Space space, int maxResultCount)
PageDaoOnly pages in spaces the remote user is able to view will be returned.
findBlogsWithCurrentOrHistoricalTitleInAllPermittedSpacesExcept in interface PageDaoblogTitle - Title of the blog to findspace - Space to exclude from search. If null, all spaces are searched.maxResultCount - maximum blog posts to returnpublic List<AbstractPage> findPagesWithCurrentOrHistoricalTitleInAllPermittedSpacesExcept(SpacePermissionQueryBuilder permissionQueryBuilder, String pageTitle, Space space, int maxResultCount)
PageDaoOnly pages in spaces the remote user is able to view will be returned.
findPagesWithCurrentOrHistoricalTitleInAllPermittedSpacesExcept in interface PageDaopageTitle - 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 List<ContentPermissionSummary> findContentPermissionSummaryByIds(Collection<Long> ids)
PageDaofindContentPermissionSummaryByIds in interface PageDaoids - of Contentpublic int countCurrentPages()
PageDaocountCurrentPages in interface PageDaopublic PageResponse<Page> findCurrentPages(LimitedRequest request)
PageDaoInternalfindCurrentPages in interface PageDaoInternalrequest - the limited pagination request.public int countDraftPages()
PageDaocountDraftPages in interface PageDaopublic int countPagesWithUnpublishedChanges()
PageDaocountPagesWithUnpublishedChanges in interface PageDaopublic long getPageCount(@NonNull String spaceKey)
PageDaogetPageCount in interface PageDaospaceKey - the space to look for posts inpublic Optional<PageStatisticsDTO> getPageStatistics()
PageDaogetPageStatistics in interface PageDaopublic int countAllPages()
PageDaocountAllPages in interface PageDaopublic List<Page> getPageInTrash(String spaceKey, String title)
getPageInTrash in interface PageDaopublic List<Page> getDescendants(Page page)
PageDaogetDescendants in interface PageDaopublic int countPagesInSubtree(@NonNull Page page)
PageDaocountPagesInSubtree in interface PageDaopublic Map<Long,List<Long>> getAncestorsFor(Collection<Long> ids)
PageDaogetAncestorsFor in interface PageDaoids - the list of page ids to get ancestor page ids forpublic List<String> getDescendantTitles(Page page)
PageDaogetDescendantTitles in interface PageDaopublic List<Long> getDescendantIds(Page page)
PageDaogetDescendantIds in interface PageDaopublic List<Long> getDescendantIds(Page page, ContentStatus... contentStatus)
PageDaogetDescendantIds in interface PageDaopublic List<Page> getTopLevelPages(Space space)
getTopLevelPages in interface PageDao@Deprecated public PageResponse<Page> getTopLevelPages(Space space, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super Page> predicate)
PageDaoInternal.getFilteredTopLevelPages(Space, LimitedRequest, java.util.function.Predicate)getTopLevelPages in interface PageDao@Deprecated public PageResponse<Page> getChildren(Page page, LimitedRequest pageRequest, com.google.common.base.Predicate<? super Page> predicate, Depth depth)
PageDaoInternal.getFilteredChildren(Page, LimitedRequest, java.util.function.Predicate, Depth)PageDaogetChildren in interface PageDaopage - the page to find children forpageRequest - the pagination requestedpredicate - predicate used to entitiesdepth - the depth to return children topublic PageResponse<Page> getDraftChildren(Page page, LimitedRequest pageRequest, Depth depth)
PageDaogetDraftChildren in interface PageDaopage - the page to find children forpageRequest - the pagination requesteddepth - the depth to return children topublic PageResponse<Page> getAllChildren(Page page, LimitedRequest pageRequest, Depth depth)
PageDaogetAllChildren in interface PageDaopage - the page to find children forpageRequest - the pagination requesteddepth - the depth to return children topublic Integer getMaxSiblingPosition(Page page)
PageDaogetMaxSiblingPosition in interface PageDaopage - The page whose siblings from which to get the max positionpublic Date getOldestPageCreationDate()
ContentEntityObjectDaogetOldestPageCreationDate in interface ContentEntityObjectDao<Page>getOldestPageCreationDate in class AbstractContentEntityObjectHibernateDao<Page>Copyright © 2003–2019 Atlassian. All rights reserved.