Interface VeneeredPageManager


  • public interface VeneeredPageManager
    Decorates the WCM PageManager interface with additional methods for finding pages using queries, tags, and template paths.
    • Method Detail

      • getPageManager

        com.day.cq.wcm.api.PageManager getPageManager()
        Get the underlying WCM page manager.
        Returns:
        page manager
      • findPages

        List<VeneeredPage> findPages​(String rootPath,
                                     Collection<String> tagIds,
                                     boolean matchOne)
        Find all descendant pages of the given path containing the specified tags.
        Parameters:
        rootPath - root path
        tagIds - set of tag IDs
        matchOne - if true, 'OR' the specified tag IDs, 'AND' otherwise
        Returns:
        pages containing specified tags
      • findPages

        List<VeneeredPage> findPages​(String rootPath,
                                     String templatePath)
        Find all descendant pages of the given path matching the template path.
        Parameters:
        rootPath - root path
        templatePath - template path
        Returns:
        pages matching specified template
      • findPages

        List<VeneeredPage> findPages​(String rootPath,
                                     Predicate<VeneeredPage> predicate)
        Find all descendant pages of the given path that match the predicate.
        Parameters:
        rootPath - root path
        predicate - predicate to determine if a page should be included in the result list
        Returns:
        pages matching filter criteria
      • getPage

        VeneeredPage getPage​(String path)
        Convenience method that returns the page at the given path. If the resource at that path does not exist or is not adaptable to Page, null is returned.
        Parameters:
        path - path of the page
        Returns:
        page or null
      • getPage

        VeneeredPage getPage​(com.day.cq.wcm.api.Page page)
        Decorate the given page.
        Parameters:
        page - non-null CQ page
        Returns:
        decorated page
      • getContainingPage

        VeneeredPage getContainingPage​(Resource resource)
        Returns the page that contains this resource. If the resource is a page the resource is returned. Otherwise it walks up the parent resources until a page is found.
        Parameters:
        resource - resource to find the page for
        Returns:
        page or null if not found.
      • getContainingPage

        VeneeredPage getContainingPage​(String path)
        Returns the page that contains the resource at the given path. If the path addresses a page, that page is returned. Otherwise it walks up the parent resources until a page is found.
        Parameters:
        path - path to find the page for
        Returns:
        page or null if not found.
      • search

        List<VeneeredPage> search​(Query query)
        Search for pages using a query.
        Parameters:
        query - JCR query
        Returns:
        list of pages for the query result
      • search

        List<VeneeredPage> search​(Query query,
                                  int limit)
        Search for pages using a query with the given result limit.
        Parameters:
        query - JCR query
        limit - result limit
        Returns:
        list of pages for the query result