Class 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 Detail

      • ContentFacade

        public ContentFacade()
    • 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.
      • 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)