public interface PageManagerDecorator
extends com.day.cq.wcm.api.PageManager
PageManager interface with additional methods for finding pages using queries, tags,
and template paths.| Modifier and Type | Method and Description |
|---|---|
PageDecorator |
copy(com.day.cq.wcm.api.Page page,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict)
Copies the given page to the new destination and automatically saves the modifications
|
PageDecorator |
copy(com.day.cq.wcm.api.Page page,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict,
boolean autoSave)
Copies the given page to the new destination
|
PageDecorator |
create(String parentPath,
String pageName,
String template,
String title)
Creates a new page at the given path using the provided template as content template.
|
PageDecorator |
create(String parentPath,
String pageName,
String template,
String title,
boolean autoSave)
Creates a new page at the given path using the provided template as content template.
|
List<PageDecorator> |
findPages(String rootPath,
Collection<String> tagIds,
boolean matchOne)
Find all descendant pages of the given path containing the specified tags.
|
List<PageDecorator> |
findPages(String rootPath,
com.google.common.base.Predicate<PageDecorator> predicate)
Find all descendant pages of the given path that match the predicate.
|
List<PageDecorator> |
findPages(String rootPath,
String templatePath)
Find all descendant pages of the given path matching the template path.
|
PageDecorator |
getContainingPage(org.apache.sling.api.resource.Resource resource)
Returns the page that contains this resource.
|
PageDecorator |
getContainingPage(String path)
Returns the page that contains the resource at the given path.
|
PageDecorator |
getPage(com.day.cq.wcm.api.Page page)
Decorate the given page.
|
PageDecorator |
getPage(String path)
Convenience method that returns the page at the given path.
|
PageDecorator |
move(com.day.cq.wcm.api.Page page,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict,
String[] adjustRefs)
Moves the given page to the new destination.
|
PageDecorator |
move(com.day.cq.wcm.api.Page page,
String destination,
String beforeName,
boolean shallow,
boolean resolveConflict,
String[] adjustRefs,
String[] publishRefs)
Moves the given page to the new destination.
|
PageDecorator |
restore(String path,
String revisionId)
Restore a revision of some page.
|
PageDecorator |
restoreTree(String path,
Calendar date)
Restore a tree.
|
List<PageDecorator> |
search(Query query)
Search for pages using a query.
|
List<PageDecorator> |
search(Query query,
int limit)
Search for pages using a query with the given result limit.
|
copy, copy, copy, createRevision, createRevision, delete, delete, delete, delete, getBlueprints, getChildRevisions, getChildRevisions, getChildRevisions, getRevisions, getRevisions, getTemplate, getTemplates, move, move, order, order, order, order, restoreTree, touchPageDecorator copy(com.day.cq.wcm.api.Page page, String destination, String beforeName, boolean shallow, boolean resolveConflict) throws com.day.cq.wcm.api.WCMException
copy in interface com.day.cq.wcm.api.PageManagerpage - the page to copydestination - the destinationbeforeName - the name of the next page. if null the page is ordered at the end.shallow - if true a non-recursive copy is performed.resolveConflict - if true resolves name conflict if destination already exists.com.day.cq.wcm.api.WCMException - if an error during this operation occurs.PageDecorator copy(com.day.cq.wcm.api.Page page, String destination, String beforeName, boolean shallow, boolean resolveConflict, boolean autoSave) throws com.day.cq.wcm.api.WCMException
copy in interface com.day.cq.wcm.api.PageManagerpage - the page to copydestination - the destinationbeforeName - the name of the next page. if null the page is ordered at the end.shallow - if true a non-recursive copy is performed.resolveConflict - if true resolves name conflict if destination already exists.autoSave - if true saves the modifications.com.day.cq.wcm.api.WCMException - if an error during this operation occurs.PageDecorator create(String parentPath, String pageName, String template, String title) throws com.day.cq.wcm.api.WCMException
create in interface com.day.cq.wcm.api.PageManagerparentPath - the path of the parent pagepageName - the name of the new pagetemplate - the template for the new pagetitle - the title of the new pagecom.day.cq.wcm.api.WCMException - if an error during this operation occurs.PageDecorator create(String parentPath, String pageName, String template, String title, boolean autoSave) throws com.day.cq.wcm.api.WCMException
create in interface com.day.cq.wcm.api.PageManagerparentPath - the path of the parent pagepageName - the name of the new pagetemplate - the template for the new pagetitle - the title of the new pageautoSave - if true saves the modifications.com.day.cq.wcm.api.WCMException - if an error during this operation occurs.List<PageDecorator> findPages(String rootPath, Collection<String> tagIds, boolean matchOne)
rootPath - root pathtagIds - set of tag IDsmatchOne - if true, 'OR' the specified tag IDs, 'AND' otherwiseList<PageDecorator> findPages(String rootPath, String templatePath)
rootPath - root pathtemplatePath - template pathList<PageDecorator> findPages(String rootPath, com.google.common.base.Predicate<PageDecorator> predicate)
rootPath - root pathpredicate - predicate to determine if a page should be included in the result listPageDecorator getContainingPage(org.apache.sling.api.resource.Resource resource)
getContainingPage in interface com.day.cq.wcm.api.PageManagerresource - resource to find the page fornull if not found.PageDecorator getContainingPage(String path)
getContainingPage in interface com.day.cq.wcm.api.PageManagerpath - path to find the page fornull if not found.PageDecorator getPage(com.day.cq.wcm.api.Page page)
page - non-null CQ pagePageDecorator getPage(String path)
null is returned.getPage in interface com.day.cq.wcm.api.PageManagerpath - path of the pagenullPageDecorator move(com.day.cq.wcm.api.Page page, String destination, String beforeName, boolean shallow, boolean resolveConflict, String[] adjustRefs) throws com.day.cq.wcm.api.WCMException
move in interface com.day.cq.wcm.api.PageManagerpage - the page to movedestination - the path of the new destinationbeforeName - the name of the next page. if null the page is ordered at the end.shallow - if true only the page content is movedresolveConflict - if true resolves name conflict if destination already exists.adjustRefs - list of paths to pages that refer to the moved one. those references will be adjusted.com.day.cq.wcm.api.WCMException - if an error during this operation occurs.PageDecorator move(com.day.cq.wcm.api.Page page, String destination, String beforeName, boolean shallow, boolean resolveConflict, String[] adjustRefs, String[] publishRefs) throws com.day.cq.wcm.api.WCMException
move in interface com.day.cq.wcm.api.PageManagerpage - the page to movedestination - the path of the new destinationbeforeName - the name of the next page. if null the page is ordered at the end.shallow - if true only the page content is movedresolveConflict - if true resolves name conflict if destination already exists.adjustRefs - list of paths to pages that refer to the moved one. those references will be adjusted.publishRefs - list of paths to publish in addition to the moved pagecom.day.cq.wcm.api.WCMException - if an error during this operation occurs.PageDecorator restore(String path, String revisionId) throws com.day.cq.wcm.api.WCMException
restore in interface com.day.cq.wcm.api.PageManagerpath - path to the page or to the parent pagerevisionId - revision id to restorecom.day.cq.wcm.api.WCMException - if an error during this operation occurs.PageDecorator restoreTree(String path, Calendar date) throws com.day.cq.wcm.api.WCMException
restoreTree in interface com.day.cq.wcm.api.PageManagerpath - path to pagedate - calendar date to restore tocom.day.cq.wcm.api.WCMException - if an error during this operation occurs.List<PageDecorator> search(Query query)
query - JCR queryList<PageDecorator> search(Query query, int limit)
query - JCR querylimit - result limitCopyright © 2019 ICF Next. All rights reserved.