|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.core.DefaultContentEntityManager
com.atlassian.confluence.pages.DefaultPageManager
public class DefaultPageManager
Field Summary |
---|
Fields inherited from class com.atlassian.confluence.core.DefaultContentEntityManager |
---|
contentEntityObjectDao, eventManager, indexer, linkManager |
Fields inherited from interface com.atlassian.confluence.core.ContentEntityManager |
---|
ITERATE_ALL |
Constructor Summary | |
---|---|
DefaultPageManager()
|
Method Summary | |
---|---|
void |
appendPage(Page sourcePage,
Page targetParent)
Move the source page to the end of targetPage's children list. |
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 postTitle,
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 postTitle,
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)
Retrieve the latest version of a page by its space key and title. |
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 previousLoginDate)
Get the list of all pages created or updated since a particular date. |
java.util.List |
getPagesStartingWith(Space space,
java.lang.String s)
|
PermissionManager |
getPermissionManager()
|
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)
Move the source page to a position relative to the target page. |
void |
movePage(Page sourcePage,
Space targetSpace)
Move a page to the top level of targetSpace . |
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes *CreateEvents s. |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes *RemoveEvent s. |
protected void |
publishUpdateEvent(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
This method publishes *UpdateEvent s. |
void |
removeAllBlogPosts(Space space)
|
void |
removeAllPages(Space space)
removes all the pages in a space (including all dependencies like attachments and notifications) |
void |
removePageFromAncestorCollections(Page page)
Removes the page from the ancestor collection of every child page. |
void |
renamePage(AbstractPage page,
java.lang.String newPageTitle)
Call this function if you want to rename the page only. |
void |
restorePage(AbstractPage page)
|
void |
saveContentEntity(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
In order to create a history for this object, we need to pass in the modified as well as the original version of the object. |
void |
setAbstractPageDao(AbstractPageDao abstractPageDao)
|
void |
setAttachmentManager(AttachmentManager attachmentManager)
|
void |
setBlogPostDao(BlogPostDao blogPostDao)
|
void |
setContentPropertyManager(ContentPropertyManager contentPropertyManager)
|
void |
setIndexer(ConfluenceIndexer indexer)
|
void |
setNotificationManager(NotificationManager notificationManager)
|
boolean |
spaceHasBlogPosts(java.lang.String spaceKey)
|
void |
trashPage(AbstractPage page)
|
void |
updatePageInAncestorCollections(Page pageBeingUpdated,
Page newParentPage)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPageManager()
Method Detail |
---|
public void renamePage(AbstractPage page, java.lang.String newPageTitle)
renamePage
in interface PageManager
page
- newPageTitle
- public java.util.List getBlogPosts(Space space, boolean currentOnly)
getBlogPosts
in interface PageManager
public java.util.List getPossibleRedirectsForSpace(Space space, java.lang.String pageTitle)
getPossibleRedirectsForSpace
in interface PageManager
public java.util.List getPossibleRedirects(java.lang.String pageTitle)
getPossibleRedirects
in interface PageManager
public java.util.List getRecentlyAddedBlogPosts(int maxPosts, java.util.Date timeSince, java.lang.String spaceKey)
getRecentlyAddedBlogPosts
in interface PageManager
public void setBlogPostDao(BlogPostDao blogPostDao)
public Page getPage(long id)
PageManager
getPage
in interface PageManager
id
- the database content ID for the page to return
public AbstractPage getAbstractPage(long id)
PageManager
getAbstractPage
in interface PageManager
id
- the database content ID for the page to return
public BlogPost getBlogPost(long id)
PageManager
getBlogPost
in interface PageManager
id
- the database content ID for the blog post to return
public Page getPage(java.lang.String spaceKey, java.lang.String pageTitle)
PageManager
getPage
in interface PageManager
public Page getPage(java.lang.String spaceKey, java.lang.String pageTitle, boolean eagerLoadComments)
PageManager
getPage
in interface PageManager
public java.util.List getPageInTrash(java.lang.String spaceKey, java.lang.String title)
getPageInTrash
in interface PageManager
public boolean spaceHasBlogPosts(java.lang.String spaceKey)
spaceHasBlogPosts
in interface PageManager
public java.util.List getDescendents(Page page)
getDescendents
in interface PageManager
public void updatePageInAncestorCollections(Page pageBeingUpdated, Page newParentPage)
updatePageInAncestorCollections
in interface PageManager
public void removePageFromAncestorCollections(Page page)
removePageFromAncestorCollections
in interface PageManager
page
- public void removeAllPages(Space space)
removeAllPages
in interface PageManager
space
- public void removeAllBlogPosts(Space space)
removeAllBlogPosts
in interface PageManager
public java.util.Collection getDescendentIds(Page page)
getDescendentIds
in interface PageManager
public java.util.List getTopLevelPages(Space space)
getTopLevelPages
in interface PageManager
public BlogPost findPreviousBlogPost(java.lang.String key, java.util.Date time)
findPreviousBlogPost
in interface PageManager
public BlogPost findNextBlogPost(java.lang.String key, java.util.Date time)
findNextBlogPost
in interface PageManager
public void trashPage(AbstractPage page)
trashPage
in interface PageManager
public void restorePage(AbstractPage page)
restorePage
in interface PageManager
public void movePage(Page sourcePage, Space targetSpace)
PageManager
targetSpace
.
movePage
in interface PageManager
public void movePage(Page sourcePage, Page targetPage, int offset)
movePage
in interface PageManager
public void appendPage(Page sourcePage, Page targetParent)
appendPage
in interface PageManager
public AbstractPage getPageByVersion(AbstractPage mostRecentPage, int version)
PageManager
getPageByVersion
in interface PageManager
mostRecentPage
- - must specify the most recent recent version of the page (page must be associated with a space)version
- - historical version to retrieve
public BlogPost getBlogPost(java.lang.String spaceKey, java.lang.String postTitle, java.util.Calendar day)
PageManager
getBlogPost
in interface PageManager
public BlogPost getBlogPost(java.lang.String spaceKey, java.lang.String postTitle, java.util.Calendar day, boolean eagerLoadComments)
PageManager
getBlogPost
in interface PageManager
public java.util.List getRecentlyAddedBlogPosts(int maxCount, java.lang.String spaceKey)
PageManager
SmartListManager
provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
getRecentlyAddedBlogPosts
in interface PageManager
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
public java.util.List getRecentlyAddedPages(int maxCount, java.lang.String spaceKey)
PageManager
SmartListManager
provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
getRecentlyAddedPages
in interface PageManager
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
public java.util.List getRecentlyUpdatedPages(int maxCount, java.lang.String spaceKey)
PageManager
SmartListManager
provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
getRecentlyUpdatedPages
in interface PageManager
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
public java.util.List getOrphanedPages(java.lang.String spaceKey)
PageManager
getOrphanedPages
in interface PageManager
spaceKey
- the key of the space to look for orphans in, or null to search all spaces
public java.util.List getUndefinedPages(java.lang.String spaceKey)
PageManager
getUndefinedPages
in interface PageManager
spaceKey
- the key of the space to look for undefined pages in, or null to search all spaces
public java.util.List getPermissionPages(Space space)
PageManager
getPermissionPages
in interface PageManager
space
- the space to search
public void saveContentEntity(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
ContentEntityManager
saveContentEntity
in interface ContentEntityManager
saveContentEntity
in class DefaultContentEntityManager
saveContext
- - a SaveContext
holding additional parameters for the manager to use when saving.protected void publishCreateEvent(ContentEntityObject obj)
DefaultContentEntityManager
*CreateEvents
s.
Specific content entity object manager that need to publish those events should override this method.
publishCreateEvent
in class DefaultContentEntityManager
obj
- the created content entity objectprotected void publishUpdateEvent(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)
DefaultContentEntityManager
*UpdateEvent
s.
Specific content entity object manager that need to publish those events should override this method.
publishUpdateEvent
in class DefaultContentEntityManager
obj
- the updated content entity objectorigObj
- the old version of the content entity object, for history purposesaveContext
- the associated SaveContext
protected void publishRemoveEvent(ContentEntityObject obj)
DefaultContentEntityManager
*RemoveEvent
s.
Specific content entity object manager that need to publish those events should override this method.
publishRemoveEvent
in class DefaultContentEntityManager
obj
- the removed content entity objectpublic int getAuthoredPagesCountByUser(java.lang.String username)
PageManager
getAuthoredPagesCountByUser
in interface PageManager
username
- the username of the user to search for
public java.util.List getPagesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
PageManager
getPagesCreatedOrUpdatedSinceDate
in interface PageManager
previousLoginDate
- the date the pages must have been created or edited after
public java.util.List getBlogPosts(java.lang.String spaceKey, java.util.Calendar postingDate, int period)
getBlogPosts
in interface PageManager
public java.util.List getPages(Space space, boolean currentOnly)
getPages
in interface PageManager
public java.util.List getPagesStartingWith(Space space, java.lang.String s)
getPagesStartingWith
in interface PageManager
public BlogPost findPreviousBlogPost(BlogPost post)
findPreviousBlogPost
in interface PageManager
public BlogPost findNextBlogPost(BlogPost post)
findNextBlogPost
in interface PageManager
public NotificationManager getNotificationManager()
getNotificationManager
in interface PageManager
public void setNotificationManager(NotificationManager notificationManager)
setNotificationManager
in interface PageManager
public AttachmentManager getAttachmentManager()
getAttachmentManager
in interface PageManager
public void setAttachmentManager(AttachmentManager attachmentManager)
setAttachmentManager
in interface PageManager
public void setIndexer(ConfluenceIndexer indexer)
setIndexer
in class DefaultContentEntityManager
public void setContentPropertyManager(ContentPropertyManager contentPropertyManager)
public void setAbstractPageDao(AbstractPageDao abstractPageDao)
public PermissionManager getPermissionManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |