public interface PageDecorator extends com.day.cq.wcm.api.Page, Accessible, Inheritable, Linkable, ImageSource, Traversable<PageDecorator>
Page interface with additional convenience
methods for traversing the content hierarchy and getters for AEM Library
classes.| Modifier and Type | Method and Description |
|---|---|
PageDecorator |
getAbsoluteParent(int level)
Returns the absolute parent page.
|
com.google.common.base.Optional<PageDecorator> |
getChild(String name)
Get the child page of the current page by name.
|
List<PageDecorator> |
getChildren()
Get the child pages of the current page.
|
List<PageDecorator> |
getChildren(boolean displayableOnly)
Get the child pages of the current page, excluding children that are not
"displayable" (i.e.
|
List<PageDecorator> |
getChildren(com.google.common.base.Predicate<PageDecorator> predicate)
Get the child pages of the current page filtered using the given
predicate.
|
com.google.common.base.Optional<ComponentNode> |
getComponentNode()
Get the component node for the "jcr:content" node for this page.
|
com.google.common.base.Optional<ComponentNode> |
getComponentNode(String relativePath)
Get the component node for the node at the given path relative to the
"jcr:content" node for this page.
|
ImageLink |
getImageLink(String imageSource)
Get a link for this page with an attached image source.
|
Link |
getLink(TitleType titleType)
Get a link with a specified title type for this item.
|
Link |
getLink(TitleType titleType,
boolean mapped)
Get a link with a specified title type for this item.
|
LinkBuilder |
getLinkBuilder(TitleType titleType)
Get a link builder for the current resource path.
|
LinkBuilder |
getLinkBuilder(TitleType titleType,
boolean mapped)
Get a link builder for the current resource path.
|
NavigationLink |
getNavigationLink()
Get a navigation link for this page.
|
NavigationLink |
getNavigationLink(boolean isActive)
Get a navigation link for this page containing an active state.
|
NavigationLink |
getNavigationLink(boolean isActive,
boolean mapped)
Get a navigation link for this page containing an active state.
|
PageManagerDecorator |
getPageManager()
Convenience method that returns the manager of this page.
|
PageDecorator |
getParent()
Returns the parent page if it's resource adapts to page.
|
PageDecorator |
getParent(int level)
Returns the relative parent page.
|
String |
getTemplatePath()
Get the template path for this page.
|
com.google.common.base.Optional<String> |
getTitle(TitleType titleType)
Get the title with the given type for this page.
|
Iterator<PageDecorator> |
listChildPages()
List children of the current page.
|
Iterator<PageDecorator> |
listChildPages(com.google.common.base.Predicate<PageDecorator> predicate)
List child pages of the current page filtered using the given predicate.
|
Iterator<PageDecorator> |
listChildPages(com.google.common.base.Predicate<PageDecorator> predicate,
boolean deep)
List child pages of the current page filtered using the given predicate.
|
canUnlock, getContentResource, getContentResource, getDeleted, getDeletedBy, getDepth, getLanguage, getLanguage, getLastModified, getLastModifiedBy, getLockOwner, getName, getNavigationTitle, getOffTime, getOnTime, getPageTitle, getPath, getProperties, getProperties, getTags, getTemplate, getTitle, getVanityUrl, hasChild, hasContent, isHideInNav, isLocked, isValid, listChildren, listChildren, listChildren, lock, timeUntilValid, unlockasMap, get, get, getAsHref, getAsHref, getAsHref, getAsLink, getAsLink, getAsLink, getAsList, getAsPage, getAsType, getImageReference, getImageReference, getImageReference, getImageRendition, getImageRenditiongetAsHrefInherited, getAsHrefInherited, getAsHrefInherited, getAsLinkInherited, getAsLinkInherited, getAsLinkInherited, getAsListInherited, getAsPageInherited, getAsTypeInherited, getImageReferenceInherited, getImageReferenceInherited, getImageReferenceInherited, getImageSourceInherited, getImageSourceInherited, getImageSourceInherited, getImageSourceInherited, getInherited, getInheritedgetHref, getHref, getLink, getLink, getLinkBuilder, getLinkBuildergetImageSource, getImageSource, getImageSource, getImageSource, isHasImage, isHasImagefindAncestor, findAncestor, findAncestorWithProperty, findAncestorWithProperty, findAncestorWithPropertyValue, findAncestorWithPropertyValue, findDescendantsList<PageDecorator> getChildren()
List<PageDecorator> getChildren(boolean displayableOnly)
displayableOnly - if true, only pages that are not hidden in
navigation will be returnedList<PageDecorator> getChildren(com.google.common.base.Predicate<PageDecorator> predicate)
predicate - predicate to filter pagesIterator<PageDecorator> listChildPages()
Iterator<PageDecorator> listChildPages(com.google.common.base.Predicate<PageDecorator> predicate)
predicate - predicate to filter pagesIterator<PageDecorator> listChildPages(com.google.common.base.Predicate<PageDecorator> predicate, boolean deep)
predicate - predicate to filter pagesdeep - if true, recursively iterate over all descendant pagescom.google.common.base.Optional<PageDecorator> getChild(String name)
name - name of the childOptionalcom.google.common.base.Optional<ComponentNode> getComponentNode()
com.google.common.base.Optional<ComponentNode> getComponentNode(String relativePath)
relativePath - relative path to resourceImageLink getImageLink(String imageSource)
imageSource - image source to set on the returned image linkLink getLink(TitleType titleType)
titleType - type of title to set on linkLink getLink(TitleType titleType, boolean mapped)
titleType - type of title to set on linkmapped - if true, the Link path will be routed through
the resource resolver to determine the mapped path (e.g.
without leading "/content").LinkBuilder getLinkBuilder(TitleType titleType)
titleType - type of title to set on builderLinkBuilder getLinkBuilder(TitleType titleType, boolean mapped)
titleType - type of title to set on buildermapped - if true, the Link path will be routed through
the resource resolver to determine the mapped path (e.g.
without leading "/content").NavigationLink getNavigationLink()
NavigationLink getNavigationLink(boolean isActive)
isActive - active state to be set on returned linkNavigationLink getNavigationLink(boolean isActive, boolean mapped)
isActive - active state to be set on returned linkmapped - if true, the NavigationLink path will be
routed through the resource resolver to determine the mapped
path (e.g. without leading "/content").String getTemplatePath()
com.google.common.base.Optional<String> getTitle(TitleType titleType)
Optional is returned.titleType - type of title to retrieveOptionalPageDecorator getAbsoluteParent(int level)
null is returned.
Example (this path == /content/geometrixx/en/products)
| level | returned | | 0 | /content | | 1 | /content/geometrixx | | 2 | /content/geometrixx/en | | 3 | /content/geometrixx/en/products | | 4 | null |
getAbsoluteParent in interface com.day.cq.wcm.api.Pagelevel - hierarchy level of the parent page to retrievenullPageManagerDecorator getPageManager()
getPageManager in interface com.day.cq.wcm.api.PagePageDecorator getParent()
getParent in interface com.day.cq.wcm.api.PagenullPageDecorator getParent(int level)
null is returned.
Example (this path == /content/geometrixx/en/products)
| level | returned | | 0 | /content/geometrixx/en/products | | 1 | /content/geometrixx/en | | 2 | /content/geometrixx | | 3 | /content | | 4 | null |
getParent in interface com.day.cq.wcm.api.Pagelevel - hierarchy level of the parent page to retrievenullCopyright © 2019 ICF Next. All rights reserved.