|
||||||||||
| 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 | |
|---|---|
BlogPost |
findNextBlogPost(BlogPost post)
|
BlogPost |
findNextBlogPost(String key,
Date time)
|
BlogPost |
findPreviousBlogPost(BlogPost post)
|
BlogPost |
findPreviousBlogPost(String key,
Date time)
|
AbstractPage |
getAbstractPage(long id)
Retrieve the AbstractPage subclass with the given content ID. |
AttachmentManager |
getAttachmentManager()
|
int |
getAuthoredPagesCountByUser(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(String spaceKey,
String postTitle,
Calendar day)
Retrieve the latest version of a blog post by its space key, title, and the day on which it was published. |
List |
getBlogPosts(Space space,
boolean currentOnly)
|
List |
getBlogPosts(String spaceKey,
Calendar postingDate,
int period)
|
Collection |
getDescendentIds(Page page)
|
List |
getDescendents(Page page)
|
NotificationManager |
getNotificationManager()
|
List |
getOrphanedPages(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(String spaceKey,
String pageTitle)
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 |
List |
getPageInTrash(String spaceKey,
String title)
|
List |
getPages(Space space,
boolean currentOnly)
|
List |
getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)
Get the list of all pages created or updated since a particular date. |
List |
getPagesStartingWith(Space space,
String s)
|
List |
getPermissionPages(Space space)
Retrieve all pages within a particular space that have page level permissions applied to them. |
List |
getPossibleRedirects(String pageTitle)
|
List |
getPossibleRedirectsForSpace(Space space,
String pageTitle)
|
List |
getRecentlyAddedBlogPosts(int maxPosts,
Date timeSince,
String spaceKey)
|
List |
getRecentlyAddedBlogPosts(int maxCount,
String spaceKey)
Retrieve the most recently created blog posts in a given space. |
List |
getRecentlyAddedPages(int maxCount,
String spaceKey)
Retrieve the most recently created pages in a given space. |
List |
getRecentlyUpdatedPages(int maxCount,
String spaceKey)
Retrieve the most recently modified pages in a given space. |
List |
getTopLevelPages(Space space)
|
List |
getUndefinedPages(String spaceKey)
Retrieve a list of link destinations in a given space that do not have pages. |
protected void |
publishCreateEvent(ContentEntityObject obj)
This method publishes *CreateEventss. |
protected void |
publishRemoveEvent(ContentEntityObject obj)
This method publishes *RemoveEvents. |
protected void |
publishUpdateEvent(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
This method publishes *UpdateEvents. |
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,
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 |
setAttachmentManager(AttachmentManager attachmentManager)
|
void |
setBlogPostDao(BlogPostDao blogPostDao)
|
void |
setCacheManager(CacheManager cacheManager)
|
void |
setContentPropertyManager(ContentPropertyManager contentPropertyManager)
|
void |
setIndexer(ConfluenceIndexer indexer)
|
void |
setNotificationManager(NotificationManager notificationManager)
|
boolean |
spaceHasBlogPosts(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,
String newPageTitle)
renamePage in interface PageManagerpage - newPageTitle -
public List getBlogPosts(Space space,
boolean currentOnly)
getBlogPosts in interface PageManager
public List getPossibleRedirectsForSpace(Space space,
String pageTitle)
getPossibleRedirectsForSpace in interface PageManagerpublic List getPossibleRedirects(String pageTitle)
getPossibleRedirects in interface PageManager
public List getRecentlyAddedBlogPosts(int maxPosts,
Date timeSince,
String spaceKey)
getRecentlyAddedBlogPosts in interface PageManagerpublic void setBlogPostDao(BlogPostDao blogPostDao)
public Page getPage(long id)
PageManager
getPage in interface PageManagerid - the database content ID for the page to return
public AbstractPage getAbstractPage(long id)
PageManager
getAbstractPage in interface PageManagerid - the database content ID for the page to return
public BlogPost getBlogPost(long id)
PageManager
getBlogPost in interface PageManagerid - the database content ID for the blog post to return
public Page getPage(String spaceKey,
String pageTitle)
PageManager
getPage in interface PageManager
public List getPageInTrash(String spaceKey,
String title)
getPageInTrash in interface PageManagerpublic boolean spaceHasBlogPosts(String spaceKey)
spaceHasBlogPosts in interface PageManagerpublic List getDescendents(Page page)
getDescendents in interface PageManager
public void updatePageInAncestorCollections(Page pageBeingUpdated,
Page newParentPage)
updatePageInAncestorCollections in interface PageManagerpublic void removePageFromAncestorCollections(Page page)
removePageFromAncestorCollections in interface PageManagerpage - public void removeAllPages(Space space)
removeAllPages in interface PageManagerspace - public void removeAllBlogPosts(Space space)
removeAllBlogPosts in interface PageManagerpublic Collection getDescendentIds(Page page)
getDescendentIds in interface PageManagerpublic List getTopLevelPages(Space space)
getTopLevelPages in interface PageManager
public BlogPost findPreviousBlogPost(String key,
Date time)
findPreviousBlogPost in interface PageManager
public BlogPost findNextBlogPost(String key,
Date time)
findNextBlogPost in interface PageManagerpublic void trashPage(AbstractPage page)
trashPage in interface PageManagerpublic void restorePage(AbstractPage page)
restorePage in interface PageManager
public AbstractPage getPageByVersion(AbstractPage mostRecentPage,
int version)
PageManager
getPageByVersion in interface PageManagermostRecentPage - - 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(String spaceKey,
String postTitle,
Calendar day)
PageManager
getBlogPost in interface PageManager
public List getRecentlyAddedBlogPosts(int maxCount,
String spaceKey)
PageManagerSmartListManager provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
getRecentlyAddedBlogPosts in interface PageManagermaxCount - 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 List getRecentlyAddedPages(int maxCount,
String spaceKey)
PageManagerSmartListManager provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
getRecentlyAddedPages in interface PageManagermaxCount - 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 List getRecentlyUpdatedPages(int maxCount,
String spaceKey)
PageManagerSmartListManager provides a more flexible (and more efficient) way
to perform this query, including accounting for user permissions.
getRecentlyUpdatedPages in interface PageManagermaxCount - 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 List getOrphanedPages(String spaceKey)
PageManager
getOrphanedPages in interface PageManagerspaceKey - the key of the space to look for orphans in, or null to search all spaces
public List getUndefinedPages(String spaceKey)
PageManager
getUndefinedPages in interface PageManagerspaceKey - the key of the space to look for undefined pages in, or null to search all spaces
public List getPermissionPages(Space space)
PageManager
getPermissionPages in interface PageManagerspace - the space to search
public void saveContentEntity(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
ContentEntityManager
saveContentEntity in interface ContentEntityManagersaveContentEntity in class DefaultContentEntityManagersaveContext - - a SaveContext holding additional parameters for the manager to use when saving.protected void publishCreateEvent(ContentEntityObject obj)
DefaultContentEntityManager*CreateEventss.
Specific content entity object manager that need to publish those events should override this method.
Default implmentation doesn't do anything
publishCreateEvent in class DefaultContentEntityManagerobj - the created content entity object
protected void publishUpdateEvent(ContentEntityObject obj,
ContentEntityObject origObj,
SaveContext saveContext)
DefaultContentEntityManager*UpdateEvents.
Specific content entity object manager that need to publish those events should override this method.
Default implmentation doesn't do anything
publishUpdateEvent in class DefaultContentEntityManagerobj - the updated content entity objectorigObj - the old version of the content entity object, for history purposesaveContext - the associated SaveContextprotected void publishRemoveEvent(ContentEntityObject obj)
DefaultContentEntityManager*RemoveEvents.
Specific content entity object manager that need to publish those events should override this method.
Default implmentation doesn't do anything
publishRemoveEvent in class DefaultContentEntityManagerobj - the removed content entity objectpublic int getAuthoredPagesCountByUser(String username)
PageManager
getAuthoredPagesCountByUser in interface PageManagerusername - the username of the user to search for
public List getPagesCreatedOrUpdatedSinceDate(Date previousLoginDate)
PageManager
getPagesCreatedOrUpdatedSinceDate in interface PageManagerpreviousLoginDate - the date the pages must have been created or edited after
public List getBlogPosts(String spaceKey,
Calendar postingDate,
int period)
getBlogPosts in interface PageManager
public List getPages(Space space,
boolean currentOnly)
getPages in interface PageManager
public List getPagesStartingWith(Space space,
String s)
getPagesStartingWith in interface PageManagerpublic BlogPost findPreviousBlogPost(BlogPost post)
findPreviousBlogPost in interface PageManagerpublic BlogPost findNextBlogPost(BlogPost post)
findNextBlogPost in interface PageManagerpublic NotificationManager getNotificationManager()
getNotificationManager in interface PageManagerpublic void setNotificationManager(NotificationManager notificationManager)
setNotificationManager in interface PageManagerpublic AttachmentManager getAttachmentManager()
getAttachmentManager in interface PageManagerpublic void setAttachmentManager(AttachmentManager attachmentManager)
setAttachmentManager in interface PageManagerpublic void setIndexer(ConfluenceIndexer indexer)
setIndexer in class DefaultContentEntityManagerpublic void setCacheManager(CacheManager cacheManager)
public void setContentPropertyManager(ContentPropertyManager contentPropertyManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||