Class ScopeFactory


  • public class ScopeFactory
    extends Object
    Helper factory class for creating Scope objects in velocity
    • Field Detail

      • ALL_PAGES

        public static final Scope ALL_PAGES
        A scope that matches all pages within any space and any wiki
      • ALL_SPACES

        public static final Scope ALL_SPACES
        A scope that matches all spaces within any wiki
      • ALL_WIKIS

        public static final Scope ALL_WIKIS
        A scope that matches all wikis within the application
      • ALL

        public static final Scope ALL
        A scope that matches the entire application as a unit
    • Constructor Detail

      • ScopeFactory

        public ScopeFactory()
    • Method Detail

      • createPageScope

        public static Scope createPageScope​(String pageName)
        Creates a new scope associated with the specified page.
        Parameters:
        pageName - A page name
        Returns:
        A new Scope instance
      • createSpaceScope

        public static Scope createSpaceScope​(String spaceName)
        Creates a new scope associated with the specified space and matching all its pages.
        Parameters:
        spaceName - A space name
        Returns:
        A new Scope instance
      • createSpaceScope

        public static Scope createSpaceScope​(String spaceName,
                                             boolean deep)
        Creates a new scope associated with the specified space.
        Parameters:
        spaceName - A space name
        deep - true for matching all its pages; false for matching this space as a unit
        Returns:
        A new Scope instance
      • createWikiScope

        public static Scope createWikiScope​(String wikiName)
        Creates a new scope associated with the specified wiki and matching all its spaces.
        Parameters:
        wikiName - A wiki name
        Returns:
        A new Scope instance
      • createWikiScope

        public static Scope createWikiScope​(String wikiName,
                                            boolean deep)
        Creates a new scope associated with the specified wiki.
        Parameters:
        wikiName - A wiki name
        deep - true for matching all its spaces; false for matching this wiki as a unit
        Returns:
        A new Scope instance
      • getALL_PAGES

        public static Scope getALL_PAGES()
        Helper method for accessing ALL_PAGES static field in velocity
      • getALL_SPACES

        public static Scope getALL_SPACES()
        Helper method for accessing ALL_SPACES static field in velocity
      • getALL_WIKIS

        public static Scope getALL_WIKIS()
        Helper method for accessing ALL_WIKIS static field in velocity
      • getALL

        public static Scope getALL()
        Helper method for accessing ALL static field in velocity