|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PageManager
Manages the retrieval and manipulation both pages and blog entries. (Really this class manages "AbstractPage", but calling it AbstractPageManager would be just as confusing).
Field Summary |
---|
Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager |
---|
ITERATE_ALL |
Method Summary | |
---|---|
void |
appendPage(Page sourcePage,
Page targetPage)
Deprecated. since 2.9 use movePageAsChild(Page, Page) |
BlogPost |
findNextBlogPost(BlogPost post)
|
BlogPost |
findNextBlogPost(java.lang.String key,
java.util.Date time)
|
BlogPost |
findPreviousBlogPost(BlogPost post)
|
BlogPost |
findPreviousBlogPost(java.lang.String key,
java.util.Date time)
|
AbstractPage |
getAbstractPage(long id)
Retrieve the AbstractPage subclass with the given content ID. |
AttachmentManager |
getAttachmentManager()
|
int |
getAuthoredPagesCountByUser(java.lang.String username)
Get the number of pages that have been created by a particular user |
BlogPost |
getBlogPost(long id)
Retrieve the blog post with the given content ID. |
BlogPost |
getBlogPost(java.lang.String spaceKey,
java.lang.String pageTitle,
java.util.Calendar day)
Retrieve the latest version of a blog post by its space key, title, and the day on which it was published. |
BlogPost |
getBlogPost(java.lang.String spaceKey,
java.lang.String pageTitle,
java.util.Calendar day,
boolean eagerLoadComments)
Retrieve the latest version of a blog post by its space key, title, and the day on which it was published. |
java.util.List |
getBlogPosts(Space space,
boolean currentOnly)
|
java.util.List |
getBlogPosts(java.lang.String spaceKey,
java.util.Calendar postingDate,
int period)
|
java.util.Collection |
getDescendentIds(Page page)
|
java.util.List |
getDescendents(Page page)
|
NotificationManager |
getNotificationManager()
|
java.util.List |
getOrphanedPages(java.lang.String spaceKey)
Retrieve a list of pages in a given space that are not linked to. |
Page |
getPage(long id)
Retrieve the page with the given content ID. |
Page |
getPage(java.lang.String spaceKey,
java.lang.String pageTitle)
Retrieve the latest version of a page by its space key and title. |
Page |
getPage(java.lang.String spaceKey,
java.lang.String pageTitle,
boolean eagerLoadComments)
Deprecated. since 3.0, use getPageWithComments(String, String) instead. |
AbstractPage |
getPageByVersion(AbstractPage mostRecentPage,
int version)
returns the historical version of a page |
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 date)
Get the list of all pages created or updated since a particular date. |
java.util.List |
getPagesStartingWith(Space space,
java.lang.String s)
|
Page |
getPageWithComments(java.lang.String spaceKey,
java.lang.String pageTitle)
Retrieve the latest version of a page by its space key and title. |
java.util.List |
getPermissionPages(Space space)
Retrieve all pages within a particular space that have page level permissions applied to them. |
java.util.List |
getPossibleRedirects(java.lang.String pageTitle)
|
java.util.List |
getPossibleRedirectsForSpace(Space space,
java.lang.String pageTitle)
|
java.util.List |
getRecentlyAddedBlogPosts(int maxPosts,
java.util.Date timeSince,
java.lang.String spaceKey)
|
java.util.List |
getRecentlyAddedBlogPosts(int maxCount,
java.lang.String spaceKey)
Retrieve the most recently created blog posts in a given space. |
java.util.List |
getRecentlyAddedPages(int maxCount,
java.lang.String spaceKey)
Retrieve the most recently created pages in a given space. |
java.util.List |
getRecentlyUpdatedPages(int maxCount,
java.lang.String spaceKey)
Retrieve the most recently modified pages in a given space. |
java.util.List |
getTopLevelPages(Space space)
|
java.util.List |
getUndefinedPages(java.lang.String spaceKey)
Retrieve a list of link destinations in a given space that do not have pages. |
void |
movePage(Page sourcePage,
Page targetPage,
int offset)
Deprecated. since 2.9 use movePageAfter(Page, Page) or movePageBefore(Page, Page) |
void |
movePage(Page sourcePage,
Space targetSpace)
Deprecated. since 2.9 use movePageToTopLevel(Page, Space) |
void |
movePageAfter(Page page,
Page refPage)
Move the provided page (first argument) after the reference page (second argument). |
void |
movePageAsChild(Page page,
Page refPage)
Move the provided page (first argument) as a child of the reference page (second argument). |
void |
movePageBefore(Page page,
Page refPage)
Move the provided page (first argument) before the reference page (second argument). |
void |
movePageToTopLevel(Page page,
Space space)
Move a page to the top level of targetSpace . |
void |
removeAllBlogPosts(Space space)
|
void |
removeAllPages(Space space)
|
void |
removePageFromAncestorCollections(Page page)
Removes the page and its ancestors from the ancestor collection of all descendants. |
void |
renamePage(AbstractPage page,
java.lang.String newPageTitle)
|
void |
restorePage(AbstractPage page)
Restores a trashed page, effectively moving it out of the trash and promoting it back to being normal page. |
void |
revertChildPageOrder(Page parentPage)
Removes manual ordering of child pages. |
void |
setAttachmentManager(AttachmentManager attachmentManager)
|
void |
setChildPageOrder(Page parentPage,
java.util.List<java.lang.Long> childIds)
Sets ordering of child pages for a supplied page, based on a map of child ids to positions. |
void |
setNotificationManager(NotificationManager notificationManager)
|
boolean |
spaceHasBlogPosts(java.lang.String spaceKey)
|
void |
trashPage(AbstractPage page)
|
void |
updatePageInAncestorCollections(Page page,
Page parentPage)
Updates the ancestors of a page and all it's descendant pages with the new parent page and its ancestors. |
Method Detail |
---|
Page getPage(long id)
id
- the database content ID for the page to return
AbstractPage getAbstractPage(long id)
id
- the database content ID for the page to return
BlogPost getBlogPost(long id)
id
- the database content ID for the blog post to return
Page getPage(java.lang.String spaceKey, java.lang.String pageTitle)
Page getPageWithComments(java.lang.String spaceKey, java.lang.String pageTitle)
@Deprecated Page getPage(java.lang.String spaceKey, java.lang.String pageTitle, boolean eagerLoadComments)
getPageWithComments(String, String)
instead.
BlogPost getBlogPost(java.lang.String spaceKey, java.lang.String pageTitle, java.util.Calendar day)
BlogPost getBlogPost(java.lang.String spaceKey, java.lang.String pageTitle, java.util.Calendar day, boolean eagerLoadComments)
java.util.List getRecentlyAddedBlogPosts(int maxCount, java.lang.String spaceKey)
SmartListManager
provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
maxCount
- the maximum number of blog posts to retrievespaceKey
- the key of the space to retrieve the posts from, or null to retrieve posts from all spaces
java.util.List getRecentlyAddedPages(int maxCount, java.lang.String spaceKey)
SmartListManager
provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
maxCount
- the maximum number of pages to retrievespaceKey
- the key of the space to retrieve the pages from, or null to retrieve posts from all spaces
java.util.List getRecentlyUpdatedPages(int maxCount, java.lang.String spaceKey)
SmartListManager
provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
maxCount
- the maximum number of pages to retrievespaceKey
- the key of the space to retrieve the pages from, or null to retrieve posts from all spaces
java.util.List getOrphanedPages(java.lang.String spaceKey)
spaceKey
- the key of the space to look for orphans in, or null to search all spaces
java.util.List getUndefinedPages(java.lang.String spaceKey)
spaceKey
- the key of the space to look for undefined pages in, or null to search all spaces
java.util.List getPermissionPages(Space space)
space
- the space to search
int getAuthoredPagesCountByUser(java.lang.String username)
username
- the username of the user to search for
java.util.List getPagesCreatedOrUpdatedSinceDate(java.util.Date date)
date
- the date the pages must have been created or edited after
java.util.List getBlogPosts(java.lang.String spaceKey, java.util.Calendar postingDate, int period)
java.util.List getBlogPosts(Space space, boolean currentOnly)
java.util.List getPages(Space space, boolean currentOnly)
java.util.List getPagesStartingWith(Space space, java.lang.String s)
BlogPost findNextBlogPost(BlogPost post)
BlogPost findPreviousBlogPost(BlogPost post)
NotificationManager getNotificationManager()
void setNotificationManager(NotificationManager notificationManager)
AttachmentManager getAttachmentManager()
void setAttachmentManager(AttachmentManager attachmentManager)
void renamePage(AbstractPage page, java.lang.String newPageTitle)
java.util.List getPossibleRedirectsForSpace(Space space, java.lang.String pageTitle)
java.util.List getPossibleRedirects(java.lang.String pageTitle)
java.util.List getRecentlyAddedBlogPosts(int maxPosts, java.util.Date timeSince, java.lang.String spaceKey)
java.util.List getPageInTrash(java.lang.String spaceKey, java.lang.String title)
boolean spaceHasBlogPosts(java.lang.String spaceKey)
java.util.List getDescendents(Page page)
void updatePageInAncestorCollections(Page page, Page parentPage)
page
- the page being updated with new ancestorsparentPage
- the new parent page of the page being updatedvoid removePageFromAncestorCollections(Page page)
java.util.Collection getDescendentIds(Page page)
java.util.List getTopLevelPages(Space space)
AbstractPage getPageByVersion(AbstractPage mostRecentPage, int version)
mostRecentPage
- - must specify the most recent recent version of the page (page must be associated with a space)version
- - historical version to retrieve
void removeAllPages(Space space)
void removeAllBlogPosts(Space space)
BlogPost findPreviousBlogPost(java.lang.String key, java.util.Date time)
BlogPost findNextBlogPost(java.lang.String key, java.util.Date time)
void trashPage(AbstractPage page)
void restorePage(AbstractPage page)
page
- a trashed pagevoid movePage(Page sourcePage, Page targetPage, int offset)
movePageAfter(Page, Page)
or movePageBefore(Page, Page)
void movePageAfter(Page page, Page refPage)
page
- the page to moverefPage
- the page which the first page will be placed aftervoid movePageBefore(Page page, Page refPage)
page
- the page to moverefPage
- the page which the first page will be placed beforevoid movePageAsChild(Page page, Page refPage)
page
- the page to moverefPage
- the page which the first page will be made a child ofvoid movePageToTopLevel(Page page, Space space)
targetSpace
. If the top-level pages are manually ordered, the page
will be added to the end of the child pages.
page
- the page to movespace
- the space to move the page tovoid movePage(Page sourcePage, Space targetSpace)
movePageToTopLevel(Page, Space)
void appendPage(Page sourcePage, Page targetPage)
movePageAsChild(Page, Page)
void setChildPageOrder(Page parentPage, java.util.List<java.lang.Long> childIds)
parentPage
- the page for which children should be ordered.childIds
- children page IDs in the new ordervoid revertChildPageOrder(Page parentPage)
parentPage
- the page for which children should be unordered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |