Package org.cid15.aem.veneer.api.page
Interface VeneeredPageManager
-
public interface VeneeredPageManagerDecorates the WCMPageManagerinterface with additional methods for finding pages using queries, tags, and template paths.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<VeneeredPage>findPages(String rootPath, String templatePath)Find all descendant pages of the given path matching the template path.List<VeneeredPage>findPages(String rootPath, Collection<String> tagIds, boolean matchOne)Find all descendant pages of the given path containing the specified tags.List<VeneeredPage>findPages(String rootPath, Predicate<VeneeredPage> predicate)Find all descendant pages of the given path that match the predicate.VeneeredPagegetContainingPage(String path)Returns the page that contains the resource at the given path.VeneeredPagegetContainingPage(Resource resource)Returns the page that contains this resource.VeneeredPagegetPage(com.day.cq.wcm.api.Page page)Decorate the given page.VeneeredPagegetPage(String path)Convenience method that returns the page at the given path.com.day.cq.wcm.api.PageManagergetPageManager()Get the underlying WCM page manager.List<VeneeredPage>search(Query query)Search for pages using a query.List<VeneeredPage>search(Query query, int limit)Search for pages using a query with the given result limit.
-
-
-
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 pathtagIds- set of tag IDsmatchOne- 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 pathtemplatePath- 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 pathpredicate- 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,nullis 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
nullif 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
nullif 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 querylimit- result limit- Returns:
- list of pages for the query result
-
-