|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PageDecorator
Decorates the CQ Page interface with additional convenience methods for traversing the content hierarchy
and getters for Bedrock classes.
| Method Summary | |
|---|---|
PageDecorator |
getAbsoluteParent(int level)
Returns the absolute parent page. |
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(Predicate<PageDecorator> predicate)
Get the child pages of the current page filtered using the given predicate. |
Optional<ComponentNode> |
getComponentNode()
Get the component node for the "jcr:content" node for this page. |
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. |
Optional<String> |
getTitle(TitleType titleType)
Get the title with the given type for this page. |
| Methods inherited from interface com.day.cq.wcm.api.Page |
|---|
canUnlock, getContentResource, getContentResource, getDepth, 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, unlock |
| Methods inherited from interface org.apache.sling.api.adapter.Adaptable |
|---|
adaptTo |
| Methods inherited from interface com.day.cq.commons.LabeledResource |
|---|
getDescription |
| Methods inherited from interface com.citytechinc.aem.bedrock.api.Accessible |
|---|
asMap, get, get, getAsHref, getAsHref, getAsHref, getAsLink, getAsLink, getAsLink, getAsList, getAsPage, getAsType, getImageReference, getImageReference, getImageRendition, getImageRendition |
| Methods inherited from interface com.citytechinc.aem.bedrock.api.Inheritable |
|---|
getAsHrefInherited, getAsHrefInherited, getAsHrefInherited, getAsLinkInherited, getAsLinkInherited, getAsLinkInherited, getAsListInherited, getAsPageInherited, getAsTypeInherited, getImageReferenceInherited, getImageReferenceInherited, getImageSourceInherited, getImageSourceInherited, getImageSourceInherited, getImageSourceInherited, getInherited, getInherited |
| Methods inherited from interface com.citytechinc.aem.bedrock.api.Linkable |
|---|
getHref, getHref, getLink, getLink, getLinkBuilder, getLinkBuilder |
| Methods inherited from interface com.citytechinc.aem.bedrock.api.ImageSource |
|---|
getImageSource, getImageSource, getImageSource, getImageSource, isHasImage, isHasImage |
| Methods inherited from interface com.citytechinc.aem.bedrock.api.Traversable |
|---|
findAncestor, findAncestorWithProperty, findAncestorWithPropertyValue, findDescendants |
| Method Detail |
|---|
List<PageDecorator> getChildren()
List<PageDecorator> getChildren(boolean displayableOnly)
displayableOnly - if true, only pages that are not hidden in navigation will be returned
List<PageDecorator> getChildren(Predicate<PageDecorator> predicate)
predicate - predicate to filter pages on
Optional<ComponentNode> getComponentNode()
Optional<ComponentNode> getComponentNode(String relativePath)
ImageLink getImageLink(String imageSource)
imageSource - image source to set on the returned image link
Link getLink(TitleType titleType)
titleType - type of title to set on link
Link 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 builder
LinkBuilder 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 link
NavigationLink 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()
Optional<String> getTitle(TitleType titleType)
Optional is returned.
titleType - type of title to retrieve
OptionalPageDecorator 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 Pagelevel - hierarchy level of the parent page to retrieve
nullPageManagerDecorator getPageManager()
getPageManager in interface PagePageDecorator getParent()
getParent in interface 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 Pagelevel - hierarchy level of the parent page to retrieve
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||