com.atlassian.confluence.pages.PageManager |
Known Indirect Subclasses |
Manages the retrieval and manipulation both pages and blog entries. (Really this class manages "AbstractPage", but calling it AbstractPageManager would be just as confusing).
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.confluence.core.ContentEntityManager
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve the AbstractPage subclass with the given content ID.
| |||||||||||
Get the number of pages that have been created by a particular user
| |||||||||||
Retrieve the latest version of a blog post by its space key, title, and the day on which it was
published.
| |||||||||||
Retrieve the blog post with the given content ID.
| |||||||||||
Retrieve the latest version of a blog post by its space key, title, and the day on which it was
published.
| |||||||||||
Counts the number of comments on the page specified by the given id.
| |||||||||||
Retrieve a list of pages in a given space that are not linked to.
| |||||||||||
Retrieve the page with the given content ID.
| |||||||||||
Retrieve the latest version of a page by its space key and title.
| |||||||||||
This method is deprecated.
since 3.0, use
getPageWithComments(String, String) instead.
| |||||||||||
returns the historical version of a page
| |||||||||||
Get the ids of all pages (current and historical) in the given space.
| |||||||||||
Retrieve the latest version of a page by its space key and title.
| |||||||||||
Get the list of all pages created or updated since a particular date.
| |||||||||||
Retrieve all pages within a particular space that have page level permissions applied to them.
| |||||||||||
Searches for blogs in the space specified, looking for those that have the given title in a
previous version.
| |||||||||||
This method is deprecated.
Since 3.1. Use
getPossibleRedirectsInSpace(Space, String, int) or getPossibleRedirectsNotInSpace(Space, String, int)
| |||||||||||
This method is deprecated.
Since 3.1. Use
getPossibleRedirectsInSpace(Space, String, int) or getPossibleRedirectsNotInSpace(Space, String, int)
| |||||||||||
Searches for pages in the space specified, looking for those that have the given title in a
previous version.
| |||||||||||
Searches for pages in all spaces except the one specified, looking for those that have the given title in a
previous version.
| |||||||||||
Retrieve the most recently created blog posts in a given space.
| |||||||||||
Retrieve the most recently created pages in a given space.
| |||||||||||
Retrieve the most recently modified pages in a given space.
| |||||||||||
Get all the pages in a space that do not have a parent page.
| |||||||||||
Get the pages in a space that do not have a parent page.
| |||||||||||
Retrieve a list of link destinations in a given space that do not have pages.
| |||||||||||
Returns true if the page has been created or modified since the user last logged in.
| |||||||||||
Move the provided page (first argument) after the reference page (second argument).
| |||||||||||
Move the provided page (first argument) as a child of the reference page (second argument).
| |||||||||||
Move the provided page (first argument) before the reference page (second argument).
| |||||||||||
Move a page to the top level of
targetSpace . | |||||||||||
Removes all pages in the space.
| |||||||||||
Removes all pages in the space.
| |||||||||||
Removes the page and its ancestors from the ancestor collection of all descendants.
| |||||||||||
Call this function if you want to rename the page only.
| |||||||||||
Call this function if you want to rename the page only, and don't want notifications generated.
| |||||||||||
Restores a trashed page, effectively moving it out of the trash and promoting it back to being normal page.
| |||||||||||
Removes manual ordering of child pages.
| |||||||||||
Sets ordering of child pages for a supplied page, based on a map of child ids to positions.
| |||||||||||
Updates the ancestors of a page and all it's descendant pages with the new parent page
and its ancestors.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.confluence.core.ContentEntityManager
|
Retrieve the AbstractPage subclass with the given content ID. This will return either a page or a blogpost, depending on the type of the database entity.
id | the database content ID for the page to return |
---|
Get the number of pages that have been created by a particular user
username | the username of the user to search for |
---|
Retrieve the latest version of a blog post by its space key, title, and the day on which it was published. Blog posts that are not current (i.e. in the trash) will not be returned. If eager load comments is true, the comments and their immediate children will also be eagerly loaded for this BlogPost.
Both the space key and page title matches are case-insensitive.Retrieve the blog post with the given content ID.
id | the database content ID for the blog post to return |
---|
Retrieve the latest version of a blog post by its space key, title, and the day on which it was published. Blog posts that are not current (i.e. in the trash) will not be returned.
Both the space key and page title matches are case-insensitive.Counts the number of comments on the page specified by the given id.
pageId | the id to check for comments on |
---|
Retrieve a list of pages in a given space that are not linked to. If no space key is supplied, the search is performed across all spaces. Only the latest version of each page is returned. Pages that are not current (i.e. in the trash) are not returned.
The orphaned pages search is not 100% accurate, as the algorithm used to track links doesn't account for all links. Hopefully this can be fixed with future versions of the wiki renderer that allow more accurate tracking of link destinations.spaceKey | the key of the space to look for orphans in, or null to search all spaces |
---|
Retrieve the page with the given content ID.
id | the database content ID for the page to return |
---|
Retrieve the latest version of a page by its space key and title. Pages that are not current (i.e. in the trash) will not be returned.
Both the space key and page title matches are case-insensitive.
This method is deprecated.
since 3.0, use getPageWithComments(String, String)
instead.
Retrieve the latest version of a page by its space key and title. Pages that are not current (i.e. in the trash) will not be returned. Additionally, this method will eager load comments for the page if eagerLoadComments is true.
Both the space key and page title matches are case-insensitive.returns the historical version of a page
mostRecentPage | - must specify the most recent recent version of the page (page must be associated with a space) |
---|---|
version | - historical version to retrieve |
Get the ids of all pages (current and historical) in the given space.
space | space to retrieve page ids from, can not be null. |
---|
Retrieve the latest version of a page by its space key and title. Pages that are not current (i.e. in the trash) will not be returned. This method will eager load comments for the page.
Both the space key and page title matches are case-insensitive.Get the list of all pages created or updated since a particular date.
date | the date the pages must have been created or edited after |
---|
Retrieve all pages within a particular space that have page level permissions applied to them. Only the latest version of each page is returned. Pages that are not current (i.e. in the trash) are not returned.
space | the space to search |
---|
Searches for blogs in the space specified, looking for those that have the given title in a previous version.
space | Space to search. Must not be null. |
---|---|
blogTitle | title of a blog in a previous version. |
maxResultCount | maximum blogs to return |
This method is deprecated.
Since 3.1. Use getPossibleRedirectsInSpace(Space, String, int)
or getPossibleRedirectsNotInSpace(Space, String, int)
This method is deprecated.
Since 3.1. Use getPossibleRedirectsInSpace(Space, String, int)
or getPossibleRedirectsNotInSpace(Space, String, int)
Searches for pages in the space specified, looking for those that have the given title in a previous version.
space | Space to search. Must not be null. |
---|---|
pageTitle | title of a page in a previous version. |
maxResultCount | maximum pages to return |
Searches for pages in all spaces except the one specified, looking for those that have the given title in a previous version.
space | Space to exclude from search. If null, all spaces are searched. |
---|---|
pageTitle | title of a page in a previous version. |
maxResultCount | maximum pages to return |
Retrieve the most recently created blog posts in a given space. If no space key is supplied, the most recent blog posts from all spaces are returned. Only the latest version of each post is returned. Posts that are not current (i.e. in the trash) are not included.
For queries like this, you're probably much better off using theSearchManager
maxCount | the maximum number of blog posts to retrieve |
---|---|
spaceKey | the key of the space to retrieve the posts from, or null to retrieve posts from all spaces |
Retrieve the most recently created pages in a given space. If no space key is supplied, the most recent pages from all spaces are returned. Only the latest version of each page is returned. Pages that are not current (i.e. in the trash) are not included.
For queries like this, you're probably much better off using theSearchManager
maxCount | the maximum number of pages to retrieve |
---|---|
spaceKey | the key of the space to retrieve the pages from, or null to retrieve posts from all spaces |
Retrieve the most recently modified pages in a given space. If no space key is supplied, the most recent pages from all spaces are returned. Only the latest version of each page is returned. Pages that are not current (i.e. in the trash) are not included.
For queries like this, you're probably much better off using theSearchManager
maxCount | the maximum number of pages to retrieve |
---|---|
spaceKey | the key of the space to retrieve the pages from, or null to retrieve posts from all spaces |
Get all the pages in a space that do not have a parent page. Since there can be an arbitrary number of such pages it is NOT RECOMMENDED to call this method. Use the builder method instead.
Get the pages in a space that do not have a parent page. This method returns a list builder that can be used to paginate the results efficiently.
This method will return only pages the current user can view.space | the space in which to look for pages |
---|
Retrieve a list of link destinations in a given space that do not have pages.
The undefined pages search is not 100% accurate, as the algorithm used to track links doesn't account for all links. Hopefully this can be fixed with future versions of the wiki renderer that allow more accurate tracking of link destinations.spaceKey | the key of the space to look for undefined pages in, or null to search all spaces |
---|
Returns true if the page has been created or modified since the user last logged in. If the user has no last login time, returns false. For an anonymous user returns false.
page | the page in question |
---|---|
user | the user or null if it is the anonymous user |
Move the provided page (first argument) after the reference page (second argument). This may also mean moving the target page to another space, if the reference page is in another space.
page | the page to move |
---|---|
refPage | the page which the first page will be placed after |
Move the provided page (first argument) as a child of the reference page (second argument). This may also mean moving the target page to another space, if the reference page is in another space.
The location of the page in the reference page's children is dependent on their existing order. If they are not explicitly ordered, the page will have a default location in the list. If the children have an existing order, the page will be added as the last child of the reference page.page | the page to move |
---|---|
refPage | the page which the first page will be made a child of |
Move the provided page (first argument) before the reference page (second argument). This may also mean moving the target page to another space, if the reference page is in another space.
page | the page to move |
---|---|
refPage | the page which the first page will be placed before |
Move a page to the top level of 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 move |
---|---|
space | the space to move the page to |
Removes all pages in the space. This can be a lengthy operation and should be performed in a long running task.
space | the space to remove pages from. |
---|---|
progress | progress meter to report progress on, can not be null. |
Removes all pages in the space. This can be a lengthy operation and should be performed in a long running task.
space | the space to remove pages from. |
---|
Removes the page and its ancestors from the ancestor collection of all descendants.
Call this function if you want to rename the page only. If you want to update not only the title, but the content and other attributes, modify the entity and call save instead.
page | to rename |
---|---|
newPageTitle | new title for page |
Call this function if you want to rename the page only, and don't want notifications generated. If you want to update not only the title, but the content and other attributes, modify the entity and call save instead.
page | to rename |
---|---|
newPageTitle | new title for page |
Restores a trashed page, effectively moving it out of the trash and promoting it back to being normal page.
page | a trashed page |
---|
Removes manual ordering of child pages.
parentPage | the page for which children should be unordered. |
---|
Sets ordering of child pages for a supplied page, based on a map of child ids to positions.
parentPage | the page for which children should be ordered. |
---|---|
childIds | children page IDs in the new order |
Updates the ancestors of a page and all it's descendant pages with the new parent page and its ancestors.
page | the page being updated with new ancestors |
---|---|
parentPage | the new parent page of the page being updated |