public interface Inheritable
Node
or Page
) that supports hierarchy-based content
inheritance.Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<String> |
getAsHrefInherited(String propertyName)
Given a property on this node containing the path of another resource, get the href to the resource, using
inheritance if the value does not exist on this component.
|
com.google.common.base.Optional<String> |
getAsHrefInherited(String propertyName,
boolean strict)
Given a property on this node containing the path of another resource, get the href to the resource, using
inheritance if the value does not exist on this component.
|
com.google.common.base.Optional<String> |
getAsHrefInherited(String propertyName,
boolean strict,
boolean mapped)
Given a property on this node containing the path of another resource, get the href to the resource, using
inheritance if the value does not exist on this component.
|
com.google.common.base.Optional<Link> |
getAsLinkInherited(String propertyName)
Given a property on this node containing the path of another resource, get a link to the resource, using
inheritance if the value does not exist on this component.
|
com.google.common.base.Optional<Link> |
getAsLinkInherited(String propertyName,
boolean strict)
Given a property on this node containing the path of another resource, get a link to the resource, using
inheritance if the value does not exist on this component.
|
com.google.common.base.Optional<Link> |
getAsLinkInherited(String propertyName,
boolean strict,
boolean mapped)
Given a property on this node containing the path of another resource, get a link to the resource, using
inheritance if the value does not exist on this component.
|
<T> List<T> |
getAsListInherited(String propertyName,
Class<T> type)
Get a multi-valued property from the current node as a list of the given type, using inheritance if the value
does not exist on this component.
|
com.google.common.base.Optional<PageDecorator> |
getAsPageInherited(String propertyName)
Get a page from the value of the given property, using inheritance if the value does not exist on this component.
|
<AdapterType> |
getAsTypeInherited(String propertyName,
Class<AdapterType> type)
Get an
Optional type instance for a property on this resource containing the path of another
Resource in the repository, using inheritance if the value does not exist on this component.. |
com.google.common.base.Optional<String> |
getImageReferenceInherited() |
com.google.common.base.Optional<String> |
getImageReferenceInherited(boolean isSelf) |
com.google.common.base.Optional<String> |
getImageReferenceInherited(String name) |
com.google.common.base.Optional<String> |
getImageSourceInherited()
Get the image source for the default image (named "image") for this node.
|
com.google.common.base.Optional<String> |
getImageSourceInherited(int width)
Get the image source for the default image (named "image") for this node for the given width.
|
com.google.common.base.Optional<String> |
getImageSourceInherited(String name)
Get the image source for this node for the named image.
|
com.google.common.base.Optional<String> |
getImageSourceInherited(String name,
int width)
Get the image source for this node for the named image and given width.
|
<T> com.google.common.base.Optional<T> |
getInherited(String propertyName,
Class<T> type)
Get a property value from the current node.
|
<T> T |
getInherited(String propertyName,
T defaultValue)
Get a property value from the current node.
|
com.google.common.base.Optional<String> getAsHrefInherited(String propertyName)
propertyName
- name of property containing a valid content pathOptional
hrefcom.google.common.base.Optional<String> getAsHrefInherited(String propertyName, boolean strict)
true
argument
when appending ".html" to the resource path is desired only for valid CQ pages and not external paths.propertyName
- name of property containing a valid content pathstrict
- if true, strict resource resolution will be applied and only valid CQ content paths will have
".html" appendedOptional
hrefcom.google.common.base.Optional<String> getAsHrefInherited(String propertyName, boolean strict, boolean mapped)
true
argument
when appending ".html" to the resource path is desired only for valid CQ pages and not external paths. Setting
mapped
to true
will map the path value, if it exists, through the Sling Resource
Resolver.propertyName
- name of property containing a valid content pathstrict
- if true, strict resource resolution will be applied and only valid CQ content paths will have
".html" appendedmapped
- if true, the property value will be routed through the Resource Resolver to determine the mapped
path for the value. For example, if a mapping from "/content/" to "/" exists in the Apache Sling Resource
Resolver Factory OSGi configuration, getting the mapped href for the path "/content/citytechinc" will return
"/citytechinc.html".Optional
hrefcom.google.common.base.Optional<Link> getAsLinkInherited(String propertyName)
propertyName
- name of property containing a valid content pathOptional
link object, or null if the property does not contain a valid content pathcom.google.common.base.Optional<Link> getAsLinkInherited(String propertyName, boolean strict)
true
argument
when including an extension for the link is desired only for valid CQ pages and not external paths.propertyName
- name of property containing a valid content pathstrict
- if true, strict resource resolution will be applied and only valid CQ content paths will have an
extensionOptional
link object, or null if the property does not contain a valid content pathcom.google.common.base.Optional<Link> getAsLinkInherited(String propertyName, boolean strict, boolean mapped)
true
argument
when including an extension for the link is desired only for valid CQ pages and not external paths. Setting
mapped
to true
will map the path value, if it exists, through the Sling Resource
Resolver.propertyName
- name of property containing a valid content pathstrict
- if true, strict resource resolution will be applied and only valid CQ content paths will have an
extensionmapped
- if true, the property value will be routed through the Resource Resolver to determine the mapped
path for the value. For example, if a mapping from "/content/" to "/" exists in the Apache Sling Resource
Resolver Factory OSGi configuration, the Link
path will be "/citytechinc" rather than
"/content/citytechinc".Optional
link object, or null if the property does not contain a valid content path<T> List<T> getAsListInherited(String propertyName, Class<T> type)
T
- property typepropertyName
- name of multi-valued propertytype
- property typecom.google.common.base.Optional<PageDecorator> getAsPageInherited(String propertyName)
propertyName
- property nameOptional
page for property value<AdapterType> com.google.common.base.Optional<AdapterType> getAsTypeInherited(String propertyName, Class<AdapterType> type)
Optional
type instance for a property on this resource containing the path of another
Resource
in the repository, using inheritance if the value does not exist on this component..AdapterType
- adapter class that is adaptable from Resource
propertyName
- name of property containing a resource pathtype
- type to adapt from resourceOptional
instance of the specified type, or absent if either the property does not exist or
the resource does not adapt to the provided typecom.google.common.base.Optional<String> getImageReferenceInherited(boolean isSelf)
Optional
inherited image referencecom.google.common.base.Optional<String> getImageReferenceInherited()
Optional
inherited image referencecom.google.common.base.Optional<String> getImageReferenceInherited(String name)
name
- image nameOptional
inherited image referencecom.google.common.base.Optional<String> getImageSourceInherited()
com.google.common.base.Optional<String> getImageSourceInherited(int width)
width
- image widthcom.google.common.base.Optional<String> getImageSourceInherited(String name)
name
- image name (name of image as defined in dialog)com.google.common.base.Optional<String> getImageSourceInherited(String name, int width)
name
- image name (name of image as defined in dialog)width
- image width<T> T getInherited(String propertyName, T defaultValue)
T
- result typepropertyName
- property to getdefaultValue
- value if no result is found<T> com.google.common.base.Optional<T> getInherited(String propertyName, Class<T> type)
Optional
if not. This
returns the same value as the underlying ValueMap
wrapped in an Optional
instance
instead of returning null.T
- typepropertyName
- property nametype
- property typeOptional
of the given type containing the property value or absent if no value is foundCopyright © 2019 ICF Next. All rights reserved.