Class AddPageWizardHelper

    • Method Detail

      • getPageInfos

        public Map<String,​ObjectgetPageInfos​(String pageId,
                                                     int depth,
                                                     String separator)
        Get the page's properties
        Parameters:
        pageId - the page ID
        depth - number of parents to fetch to generate the title (0 to display only the page name)
        separator - separator between the parents (e.g. " > " to have "grandParent > parent > page")
        Returns:
        the properties
      • getPagesInfos

        public List<Map<String,​Object>> getPagesInfos​(List<String> pageIds,
                                                            int depth,
                                                            String separator)
        Get the page's properties
        Parameters:
        pageIds - the page IDs
        depth - number of parents to fetch to generate the title (0 to display only the page name)
        separator - separator between the parents (e.g. " > " to have "grandParent > parent > page")
        Returns:
        the properties
      • getPageDetails

        protected Map<String,​ObjectgetPageDetails​(AmetysObject page,
                                                          UserIdentity user,
                                                          int depth,
                                                          String separator)
        get the id, rights and formatted title of a page
        Parameters:
        page - page/sitemap to work on
        user - user to check rights
        depth - number of parents to fetch to generate the title (0 to display only the page name)
        separator - separator between the parents (e.g. " > " to have "grandParent > parent > page")
        Returns:
        a map with id (String), rights (Set<String>) and title (String)
      • getTags

        public List<Map<String,​Object>> getTags​(List<String> tagNames,
                                                      List<String> filters,
                                                      String targetType,
                                                      boolean showCategories,
                                                      String separator,
                                                      Map<String,​Object> contextualParameters)
        Get a the of tags from a list of root tags or tag providers
        Parameters:
        tagNames - name of root tags or provider where we want to get the list of contained tags
        filters - list of filters to disable, can contain PAGE_PRIVATE, CONTENT_PRIVATE, PAGE, CONTENT
        targetType - tag target type
        showCategories - true to display tags containing other tags. If false, only the non-parents tags will be listed
        separator - separator between the parents (e.g. " > " to have "grandParent > parent > page")
        contextualParameters - the contextual parameters
        Returns:
        a list with one item per requested tagName, each one containing name (String), title (String) and tags (List of Map<String, String>, each map containing a name and title)
      • isTagAvailable

        protected boolean isTagAvailable​(Tag tag,
                                         List<String> filters,
                                         String targetType)
        Check if we can use this tag
        Parameters:
        tag - tag to check
        filters - list of filters to disable, can contain PAGE_PRIVATE, CONTENT_PRIVATE, PAGE, CONTENT
        targetType - tag target type
        Returns:
        true if this tag is not impacted by the input filters