public abstract class DelegateComponentNode extends Object implements ComponentNode
ComponentNode
instance. Use when instantiating component node
instances directly (i.e. not in the context of a JSP or Sightly request).Constructor and Description |
---|
DelegateComponentNode(ComponentNode componentNode) |
Modifier and Type | Method and Description |
---|---|
org.apache.sling.api.resource.ValueMap |
asMap() |
com.google.common.base.Optional<ComponentNode> |
findAncestor(com.google.common.base.Predicate<ComponentNode> predicate)
Find the first ancestor resource that matches the given predicate condition.
|
com.google.common.base.Optional<ComponentNode> |
findAncestor(com.google.common.base.Predicate<ComponentNode> predicate,
boolean excludeCurrentResource)
Find the first ancestor resource that matches the given predicate condition.
|
com.google.common.base.Optional<ComponentNode> |
findAncestorWithProperty(String propertyName)
Find the first ancestor resource containing the given property name.
|
com.google.common.base.Optional<ComponentNode> |
findAncestorWithProperty(String propertyName,
boolean excludeCurrentResource)
Find the first ancestor resource containing the given property name.
|
<T> com.google.common.base.Optional<ComponentNode> |
findAncestorWithPropertyValue(String propertyName,
T propertyValue)
Find the first ancestor resource where the given property name has the specified value.
|
<V> com.google.common.base.Optional<ComponentNode> |
findAncestorWithPropertyValue(String propertyName,
V propertyValue,
boolean excludeCurrentResource)
Find the first ancestor resource where the given property name has the specified value.
|
List<ComponentNode> |
findDescendants(com.google.common.base.Predicate<ComponentNode> predicate)
Get a list of descendant resources that match the given predicate condition.
|
<T> com.google.common.base.Optional<T> |
get(String propertyName,
Class<T> type)
Get a property value from the current node.
|
<T> T |
get(String propertyName,
T defaultValue)
Get a property value from the current node, returning the default value if the property does not exist.
|
com.google.common.base.Optional<String> |
getAsHref(String propertyName)
Given a property on this resource containing the path of another resource, get an
Optional
containing the href to the resource (i.e. |
com.google.common.base.Optional<String> |
getAsHref(String propertyName,
boolean strict)
Given a property on this resource containing the path of another resource, get an
Optional
containing the href to the resource. |
com.google.common.base.Optional<String> |
getAsHref(String propertyName,
boolean strict,
boolean mapped)
Given a property on this resource containing the path of another resource, get an
Optional
containing the href to the resource. |
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> |
getAsLink(String propertyName)
Given a property on this resource containing the path of another resource, get a link to the resource.
|
com.google.common.base.Optional<Link> |
getAsLink(String propertyName,
boolean strict)
Given a property on this resource containing the path of another resource, get a link to the resource.
|
com.google.common.base.Optional<Link> |
getAsLink(String propertyName,
boolean strict,
boolean mapped)
Given a property on this resource containing the path of another resource, get a link to the resource.
|
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> |
getAsList(String propertyName,
Class<T> type)
Get a multi-valued property from the current node as a list of the given type.
|
<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> |
getAsPage(String propertyName)
Get a page instance from the value of the given property.
|
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> |
getAsType(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. |
<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<ComponentNode> |
getComponentNode(String relativePath)
Get the component node for the resource at the given path relative to the current node.
|
com.google.common.base.Optional<ComponentNode> |
getComponentNodeInherited(String relativePath)
Get a child node relative to the current node, inheriting from a parent page if it does not exist.
|
List<ComponentNode> |
getComponentNodes()
Get a list of child nodes for the current node.
|
List<ComponentNode> |
getComponentNodes(com.google.common.base.Predicate<ComponentNode> predicate)
Get a predicate-filtered list of child nodes for the current node.
|
List<ComponentNode> |
getComponentNodes(String relativePath)
Get a list of child nodes for the resource at the given path relative to this node.
|
List<ComponentNode> |
getComponentNodes(String relativePath,
com.google.common.base.Predicate<ComponentNode> predicate)
Get a list of child nodes for the resource at the given path relative to this node, returning only the nodes that
meet the predicate criteria.
|
List<ComponentNode> |
getComponentNodes(String relativePath,
String resourceType)
Get a list of child nodes for the resource at the given path relative to this node, returning only the nodes that
have the specified resource type.
|
List<ComponentNode> |
getComponentNodesInherited(String relativePath)
Get the children of a node relative to the current node.
|
com.google.common.base.Optional<BasicNode> |
getDesignNode()
Get the design node for the current component.
|
String |
getHref()
Get the URL for this item.
|
String |
getHref(boolean mapped)
Get the mapped URL for this item.
|
String |
getId()
Get the unique ID for this resource based on the path.
|
com.google.common.base.Optional<String> |
getImageReference()
Get the referenced DAM asset path for the default image (named "image") for this component.
|
com.google.common.base.Optional<String> |
getImageReference(boolean isSelf)
Get the referenced DAM asset path for the default image (named "image") for this component.
|
com.google.common.base.Optional<String> |
getImageReference(String name) |
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> |
getImageRendition(String renditionName)
Get the DAM asset rendition path for the default image (named "image") for this component.
|
com.google.common.base.Optional<String> |
getImageRendition(String name,
String renditionName) |
com.google.common.base.Optional<String> |
getImageSource()
Get the image source for the default image (named "image") for this node.
|
com.google.common.base.Optional<String> |
getImageSource(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> |
getImageSource(String name)
Get the image source for this node for the named image.
|
com.google.common.base.Optional<String> |
getImageSource(String name,
int width)
Get the image source for this node for the named image and given width.
|
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.
|
int |
getIndex()
Get the index of this resource in relation to sibling nodes.
|
int |
getIndex(String resourceType)
Get the index of this node in relation to sibling nodes, ignoring resource types that do not match the specified
value.
|
<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.
|
Link |
getLink()
Get a link for this item.
|
Link |
getLink(boolean mapped)
Get a link for this item.
|
LinkBuilder |
getLinkBuilder()
Get a link builder for the current resource path.
|
LinkBuilder |
getLinkBuilder(boolean mapped)
Get a mapped link builder for the current resource path.
|
com.google.common.base.Optional<Node> |
getNode()
Get the JCR node for this instance.
|
com.google.common.base.Optional<ComponentNode> |
getParent()
Get the parent of this node.
|
String |
getPath()
Shortcut for getting the current resource path.
|
List<Property> |
getProperties(com.google.common.base.Predicate<Property> predicate)
Get a list of properties that apply for the given predicate.
|
org.apache.sling.api.resource.Resource |
getResource()
Get the underlying resource for this instance.
|
boolean |
isHasImage()
Check if the current resource has a default image.
|
boolean |
isHasImage(String name)
Check if the current resource has a named image.
|
public DelegateComponentNode(ComponentNode componentNode)
public final org.apache.sling.api.resource.ValueMap asMap()
asMap
in interface Accessible
public final com.google.common.base.Optional<ComponentNode> findAncestor(com.google.common.base.Predicate<ComponentNode> predicate)
Traversable
findAncestor
in interface Traversable<ComponentNode>
predicate
- predicate to match ancestor resources againstOptional
resource that matches the predicate conditionpublic com.google.common.base.Optional<ComponentNode> findAncestor(com.google.common.base.Predicate<ComponentNode> predicate, boolean excludeCurrentResource)
Traversable
findAncestor
in interface Traversable<ComponentNode>
predicate
- predicate to match ancestor resources againstexcludeCurrentResource
- if true, the current resource will be excluded (i.e. even if the current resource
matches the predicate criteria, it will not be returned)Optional
resource that matches the predicate conditionpublic final com.google.common.base.Optional<ComponentNode> findAncestorWithProperty(String propertyName)
Traversable
findAncestorWithProperty
in interface Traversable<ComponentNode>
propertyName
- property name to find on ancestor resourcesOptional
resource that contains the propertypublic com.google.common.base.Optional<ComponentNode> findAncestorWithProperty(String propertyName, boolean excludeCurrentResource)
Traversable
findAncestorWithProperty
in interface Traversable<ComponentNode>
propertyName
- property name to find on ancestor resourcesexcludeCurrentResource
- if true, the current resource will be excluded (i.e. even if the current resource
matches the predicate criteria, it will not be returned)Optional
resource that contains the propertypublic final <T> com.google.common.base.Optional<ComponentNode> findAncestorWithPropertyValue(String propertyName, T propertyValue)
Traversable
findAncestorWithPropertyValue
in interface Traversable<ComponentNode>
T
- type of valuepropertyName
- property name to find on ancestor resourcespropertyValue
- value of named property to matchOptional
resource that contains the property valuepublic <V> com.google.common.base.Optional<ComponentNode> findAncestorWithPropertyValue(String propertyName, V propertyValue, boolean excludeCurrentResource)
Traversable
findAncestorWithPropertyValue
in interface Traversable<ComponentNode>
V
- type of valuepropertyName
- property name to find on ancestor resourcespropertyValue
- value of named property to matchexcludeCurrentResource
- if true, the current resource will be excluded (i.e. even if the current resource
matches the predicate criteria, it will not be returned)Optional
resource that contains the property valuepublic final List<ComponentNode> findDescendants(com.google.common.base.Predicate<ComponentNode> predicate)
Traversable
findDescendants
in interface Traversable<ComponentNode>
predicate
- predicate to match descendant resources againstpublic final <T> T get(String propertyName, T defaultValue)
Accessible
get
in interface Accessible
T
- property typepropertyName
- property namedefaultValue
- default valuepublic final <T> com.google.common.base.Optional<T> get(String propertyName, Class<T> type)
Accessible
ValueMap
wrapped in an Optional
instance instead of returning null.get
in interface Accessible
T
- property typepropertyName
- property nametype
- property typeOptional
of the given type containing the property value or absent if the property does not
existpublic final com.google.common.base.Optional<String> getAsHref(String propertyName)
Accessible
Optional
containing the href to the resource (i.e. the content path with ".html" appended).getAsHref
in interface Accessible
propertyName
- name of property containing a valid content pathOptional
public final com.google.common.base.Optional<String> getAsHref(String propertyName, boolean strict)
Accessible
Optional
containing the href to the resource. Use this method with a true
argument when appending ".html" to
the resource path is desired only for valid CQ pages and not external paths.getAsHref
in interface Accessible
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
public final com.google.common.base.Optional<String> getAsHref(String propertyName, boolean strict, boolean mapped)
Accessible
Optional
containing the href to the resource. Use this method with a 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.getAsHref
in interface Accessible
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
public final com.google.common.base.Optional<String> getAsHrefInherited(String propertyName)
Inheritable
getAsHrefInherited
in interface Inheritable
propertyName
- name of property containing a valid content pathOptional
hrefpublic final com.google.common.base.Optional<String> getAsHrefInherited(String propertyName, boolean strict)
Inheritable
true
argument
when appending ".html" to the resource path is desired only for valid CQ pages and not external paths.getAsHrefInherited
in interface Inheritable
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
hrefpublic final com.google.common.base.Optional<String> getAsHrefInherited(String propertyName, boolean strict, boolean mapped)
Inheritable
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.getAsHrefInherited
in interface Inheritable
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
hrefpublic final com.google.common.base.Optional<Link> getAsLink(String propertyName)
Accessible
getAsLink
in interface Accessible
propertyName
- name of property containing a valid content pathOptional
link object, absent if property does not contain a valid content pathpublic final com.google.common.base.Optional<Link> getAsLink(String propertyName, boolean strict)
Accessible
true
argument when including an extension for the link is desired only for valid CQ
pages and not external paths.getAsLink
in interface Accessible
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, absent if property does not contain a valid content pathpublic final com.google.common.base.Optional<Link> getAsLink(String propertyName, boolean strict, boolean mapped)
Accessible
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.getAsLink
in interface Accessible
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, absent if property does not contain a valid content pathpublic final com.google.common.base.Optional<Link> getAsLinkInherited(String propertyName)
Inheritable
getAsLinkInherited
in interface Inheritable
propertyName
- name of property containing a valid content pathOptional
link object, or null if the property does not contain a valid content pathpublic final com.google.common.base.Optional<Link> getAsLinkInherited(String propertyName, boolean strict)
Inheritable
true
argument
when including an extension for the link is desired only for valid CQ pages and not external paths.getAsLinkInherited
in interface Inheritable
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 pathpublic final com.google.common.base.Optional<Link> getAsLinkInherited(String propertyName, boolean strict, boolean mapped)
Inheritable
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.getAsLinkInherited
in interface Inheritable
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 pathpublic final <T> List<T> getAsList(String propertyName, Class<T> type)
Accessible
getAsList
in interface Accessible
T
- property type, must be supported by ValueMap
propertyName
- name of multi-valued propertytype
- property typepublic final <T> List<T> getAsListInherited(String propertyName, Class<T> type)
Inheritable
getAsListInherited
in interface Inheritable
T
- property typepropertyName
- name of multi-valued propertytype
- property typepublic final com.google.common.base.Optional<PageDecorator> getAsPage(String propertyName)
Accessible
Optional
if the
path value for the given property name does not resolve to a valid CQ page.getAsPage
in interface Accessible
propertyName
- property nameOptional
page for property valuepublic final <AdapterType> com.google.common.base.Optional<AdapterType> getAsType(String propertyName, Class<AdapterType> type)
Accessible
Optional
type instance for a property on this resource containing the path of another
Resource
in the repository.getAsType
in interface Accessible
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 typepublic final com.google.common.base.Optional<String> getImageReference(boolean isSelf)
Accessible
getImageReference
in interface Accessible
isSelf
- if true, image reference property will be accessed from the current resource rather than a childOptional
image reference pathpublic final com.google.common.base.Optional<PageDecorator> getAsPageInherited(String propertyName)
Inheritable
getAsPageInherited
in interface Inheritable
propertyName
- property nameOptional
page for property valuepublic final <AdapterType> com.google.common.base.Optional<AdapterType> getAsTypeInherited(String propertyName, Class<AdapterType> type)
Inheritable
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..getAsTypeInherited
in interface Inheritable
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 typepublic final com.google.common.base.Optional<String> getImageReferenceInherited(boolean isSelf)
getImageReferenceInherited
in interface Inheritable
Optional
inherited image referencepublic final com.google.common.base.Optional<ComponentNode> getComponentNode(String relativePath)
ComponentNode
getComponentNode
in interface ComponentNode
relativePath
- relative path to componentOptional
node for componentpublic final List<ComponentNode> getComponentNodes()
ComponentNode
getComponentNodes
in interface ComponentNode
public final List<ComponentNode> getComponentNodes(com.google.common.base.Predicate<ComponentNode> predicate)
ComponentNode
getComponentNodes
in interface ComponentNode
predicate
- predicate used to filter nodespublic final List<ComponentNode> getComponentNodes(String relativePath)
ComponentNode
getComponentNodes
in interface ComponentNode
relativePath
- relative path to parent of desired nodespublic final List<ComponentNode> getComponentNodes(String relativePath, String resourceType)
ComponentNode
getComponentNodes
in interface ComponentNode
relativePath
- relative path to parent of desired nodesresourceType
- sling:resourceType of nodes to get from parent nodepublic final List<ComponentNode> getComponentNodes(String relativePath, com.google.common.base.Predicate<ComponentNode> predicate)
ComponentNode
getComponentNodes
in interface ComponentNode
relativePath
- relative path to parent of desired nodespredicate
- predicate used to filter nodespublic final com.google.common.base.Optional<BasicNode> getDesignNode()
ComponentNode
getDesignNode
in interface ComponentNode
Optional
design node for the current stylepublic final String getHref()
Linkable
public final String getHref(boolean mapped)
Linkable
public final String getId()
BasicNode
public final com.google.common.base.Optional<String> getImageReference()
Accessible
getImageReference
in interface Accessible
Optional
image reference pathpublic final com.google.common.base.Optional<String> getImageReference(String name)
getImageReference
in interface Accessible
name
- image nameOptional
image reference pathpublic final com.google.common.base.Optional<String> getImageReferenceInherited()
getImageReferenceInherited
in interface Inheritable
Optional
inherited image referencepublic final com.google.common.base.Optional<String> getImageReferenceInherited(String name)
getImageReferenceInherited
in interface Inheritable
name
- image nameOptional
inherited image referencepublic final com.google.common.base.Optional<String> getImageRendition(String renditionName)
Accessible
getImageRendition
in interface Accessible
renditionName
- rendition name for this asset (e.g. "cq5dam.thumbnail.140.100.png")Optional
image rendition pathpublic final com.google.common.base.Optional<String> getImageRendition(String name, String renditionName)
getImageRendition
in interface Accessible
name
- image namerenditionName
- rendition name for this assetOptional
image rendition pathpublic final com.google.common.base.Optional<String> getImageSource()
ImageSource
getImageSource
in interface ImageSource
public final com.google.common.base.Optional<String> getImageSource(int width)
ImageSource
getImageSource
in interface ImageSource
width
- image widthpublic final com.google.common.base.Optional<String> getImageSource(String name)
ImageSource
getImageSource
in interface ImageSource
name
- image name (name of image as defined in dialog)public final com.google.common.base.Optional<String> getImageSource(String name, int width)
ImageSource
getImageSource
in interface ImageSource
name
- image name (name of image as defined in dialog)width
- image widthpublic final com.google.common.base.Optional<String> getImageSourceInherited()
Inheritable
getImageSourceInherited
in interface Inheritable
public final com.google.common.base.Optional<String> getImageSourceInherited(int width)
Inheritable
getImageSourceInherited
in interface Inheritable
width
- image widthpublic final com.google.common.base.Optional<String> getImageSourceInherited(String name)
Inheritable
getImageSourceInherited
in interface Inheritable
name
- image name (name of image as defined in dialog)public final com.google.common.base.Optional<String> getImageSourceInherited(String name, int width)
Inheritable
getImageSourceInherited
in interface Inheritable
name
- image name (name of image as defined in dialog)width
- image widthpublic final int getIndex()
BasicNode
public final int getIndex(String resourceType)
BasicNode
public final <T> T getInherited(String propertyName, T defaultValue)
Inheritable
getInherited
in interface Inheritable
T
- result typepropertyName
- property to getdefaultValue
- value if no result is foundpublic final <T> com.google.common.base.Optional<T> getInherited(String propertyName, Class<T> type)
Inheritable
Optional
if not. This
returns the same value as the underlying ValueMap
wrapped in an Optional
instance
instead of returning null.getInherited
in interface Inheritable
T
- typepropertyName
- property nametype
- property typeOptional
of the given type containing the property value or absent if no value is foundpublic final Link getLink()
Linkable
public final Link getLink(boolean mapped)
Linkable
public final LinkBuilder getLinkBuilder()
Linkable
getLinkBuilder
in interface Linkable
public final LinkBuilder getLinkBuilder(boolean mapped)
Linkable
getLinkBuilder
in interface Linkable
mapped
- if true, the LinkBuilder
for this resource will be routed through the resource
resolver to determine the mapped path (e.g. without leading "/content").public final com.google.common.base.Optional<Node> getNode()
BasicNode
Optional
if the underlying resource
for this instance is synthetic or non-existent.public final com.google.common.base.Optional<ComponentNode> getComponentNodeInherited(String relativePath)
ComponentNode
getComponentNodeInherited
in interface ComponentNode
relativePath
- path relative to current nodepublic final List<ComponentNode> getComponentNodesInherited(String relativePath)
ComponentNode
getComponentNodesInherited
in interface ComponentNode
relativePath
- path relative to current nodepublic final com.google.common.base.Optional<ComponentNode> getParent()
ComponentNode
getParent
in interface ComponentNode
public final String getPath()
BasicNode
public final List<Property> getProperties(com.google.common.base.Predicate<Property> predicate) throws RepositoryException
BasicNode
getProperties
in interface BasicNode
predicate
- predicate to applyRepositoryException
- if error occurs reading node propertiespublic final org.apache.sling.api.resource.Resource getResource()
BasicNode
getResource
in interface BasicNode
public final boolean isHasImage()
ImageSource
isHasImage
in interface ImageSource
public final boolean isHasImage(String name)
ImageSource
isHasImage
in interface ImageSource
name
- image name (name of image as defined in dialog)Copyright © 2019 ICF Next. All rights reserved.