|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Inheritable
An accessible instance (such as a Node or Page) that supports hierarchy-based content
inheritance.
| Method Summary | ||
|---|---|---|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
|
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. |
|
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. |
|
|
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.. |
|
Optional<String> |
getImageReferenceInherited()
|
|
Optional<String> |
getImageReferenceInherited(String name)
|
|
Optional<String> |
getImageSourceInherited()
Get the image source for the default image (named "image") for this node. |
|
Optional<String> |
getImageSourceInherited(int width)
Get the image source for the default image (named "image") for this node for the given width. |
|
Optional<String> |
getImageSourceInherited(String name)
Get the image source for this node for the named image. |
|
Optional<String> |
getImageSourceInherited(String name,
int width)
Get the image source for this node for the named image and given width. |
|
|
getInherited(String propertyName,
Class<T> type)
Get a property value from the current node. |
|
|
getInherited(String propertyName,
T defaultValue)
Get a property value from the current node. |
|
| Method Detail |
|---|
Optional<String> getAsHrefInherited(String propertyName)
propertyName - name of property containing a valid content path
Optional href
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" appended
Optional href
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 hrefOptional<Link> getAsLinkInherited(String propertyName)
propertyName - name of property containing a valid content path
Optional link object, or null if the property does not contain a valid content path
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
extension
Optional link object, or null if the property does not contain a valid content path
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 type
Optional<PageDecorator> getAsPageInherited(String propertyName)
propertyName - property name
Optional page for property value
<AdapterType> 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 ResourcepropertyName - name of property containing a resource pathtype - type to adapt from resource
Optional instance of the specified type, or absent if either the property does not exist or
the resource does not adapt to the provided typeOptional<String> getImageReferenceInherited()
Optional inherited image referenceOptional<String> getImageReferenceInherited(String name)
name - image name
Optional inherited image referenceOptional<String> getImageSourceInherited()
Optional<String> getImageSourceInherited(int width)
width - image width
Optional<String> getImageSourceInherited(String name)
name - image name (name of image as defined in dialog)
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> 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 type
Optional of the given type containing the property value or absent if no value is found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||