Package com.atlassian.confluence.util
Class ContentFacade
- java.lang.Object
-
- com.atlassian.confluence.util.ContentFacade
-
public class ContentFacade extends Object
Just a typical facade - it's useful for avoiding the duplication of behaviours across various actions, helper classes, etc.. There are some circumstances where injecting five or six different managers in different classes or contexts to answer common questions concerning content is inconvenient.
Additionally, by centralizing such miscellaneous calls here, we avoid duplication of behaviours across classes and improve the testability of the common questions asked of the content managers.
-
-
Constructor Summary
Constructors Constructor Description ContentFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PageManager
getPageManager()
List<Page>
getRecentlyUpdatedPagesForUserOnSpaceSince(com.atlassian.user.User user, String spaceKey, Date previousLoginDate)
List
getRecentlyUpdatedPagesForUserSince(com.atlassian.user.User user, Date previousLoginDate)
SettingsManager
getSettingsManager()
com.atlassian.renderer.WikiStyleRenderer
getWikiStyleRenderer()
void
setPageManager(PageManager pageManager)
void
setPermissionManager(PermissionManager permissionManager)
void
setSettingsManager(SettingsManager settingsManager)
void
setSpaceManager(SpaceManager spaceManager)
void
setWikiStyleRenderer(com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer)
boolean
spaceHasBlogPosts(String spaceKey)
-
-
-
Method Detail
-
spaceHasBlogPosts
public boolean spaceHasBlogPosts(String spaceKey)
- Parameters:
spaceKey
-- Returns:
- true if the given space key correlates to a space containing blog content
-
getRecentlyUpdatedPagesForUserOnSpaceSince
public List<Page> getRecentlyUpdatedPagesForUserOnSpaceSince(com.atlassian.user.User user, String spaceKey, Date previousLoginDate)
- Returns:
- a list of pages, added or updated since the
user
last logged in, which they are permitted to see.
-
getRecentlyUpdatedPagesForUserSince
public List getRecentlyUpdatedPagesForUserSince(com.atlassian.user.User user, Date previousLoginDate)
- Returns:
- a list of pages, added or updated since the
user
last logged in, which they are permitted to see.
-
getPageManager
public PageManager getPageManager()
-
getSettingsManager
public SettingsManager getSettingsManager()
-
getWikiStyleRenderer
public com.atlassian.renderer.WikiStyleRenderer getWikiStyleRenderer()
-
setPageManager
public void setPageManager(PageManager pageManager)
-
setSettingsManager
public void setSettingsManager(SettingsManager settingsManager)
-
setWikiStyleRenderer
public void setWikiStyleRenderer(com.atlassian.renderer.WikiStyleRenderer wikiStyleRenderer)
-
setPermissionManager
public void setPermissionManager(PermissionManager permissionManager)
-
setSpaceManager
public void setSpaceManager(SpaceManager spaceManager)
-
-