public abstract class AbstractComponent extends Object implements ComponentNode
| Constructor and Description | 
|---|
AbstractComponent()  | 
| 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. 
 | 
<V> com.google.common.base.Optional<ComponentNode> | 
findAncestorWithPropertyValue(String propertyName,
                             V 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 String getHref()
Linkablepublic com.google.common.base.Optional<String> getImageSource()
ImageSourcegetImageSource in interface ImageSourcepublic org.apache.sling.api.resource.ValueMap asMap()
asMap in interface Accessiblepublic String getHref(boolean mapped)
Linkablepublic com.google.common.base.Optional<String> getAsHrefInherited(String propertyName)
InheritablegetAsHrefInherited in interface InheritablepropertyName - name of property containing a valid content pathOptional hrefpublic com.google.common.base.Optional<String> getImageSource(int width)
ImageSourcegetImageSource in interface ImageSourcewidth - image widthpublic <T> T get(String propertyName, T defaultValue)
Accessibleget in interface AccessibleT - property typepropertyName - property namedefaultValue - default valuepublic com.google.common.base.Optional<ComponentNode> getComponentNode(String relativePath)
ComponentNodegetComponentNode in interface ComponentNoderelativePath - relative path to componentOptional node for componentpublic Link getLink(boolean mapped)
Linkablepublic com.google.common.base.Optional<String> getImageSource(String name)
ImageSourcegetImageSource in interface ImageSourcename - image name (name of image as defined in dialog)public List<ComponentNode> getComponentNodes()
ComponentNodegetComponentNodes in interface ComponentNodepublic LinkBuilder getLinkBuilder()
LinkablegetLinkBuilder in interface Linkablepublic com.google.common.base.Optional<String> getImageSource(String name, int width)
ImageSourcegetImageSource in interface ImageSourcename - image name (name of image as defined in dialog)width - image widthpublic <T> com.google.common.base.Optional<T> get(String propertyName, Class<T> type)
AccessibleValueMap
 wrapped in an Optional instance instead of returning null.get in interface AccessibleT - property typepropertyName - property nametype - property typeOptional of the given type containing the property value or absent if the property does not
 existpublic String getId()
BasicNodepublic com.google.common.base.Optional<String> getAsHrefInherited(String propertyName, boolean strict)
Inheritabletrue argument
 when appending ".html" to the resource path is desired only for valid CQ pages and not external paths.getAsHrefInherited in interface InheritablepropertyName - 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 List<ComponentNode> getComponentNodes(com.google.common.base.Predicate<ComponentNode> predicate)
ComponentNodegetComponentNodes in interface ComponentNodepredicate - predicate used to filter nodespublic boolean isHasImage()
ImageSourceisHasImage in interface ImageSourcepublic LinkBuilder getLinkBuilder(boolean mapped)
LinkablegetLinkBuilder in interface Linkablemapped - 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 int getIndex()
BasicNodepublic boolean isHasImage(String name)
ImageSourceisHasImage in interface ImageSourcename - image name (name of image as defined in dialog)public List<ComponentNode> getComponentNodes(String relativePath)
ComponentNodegetComponentNodes in interface ComponentNoderelativePath - relative path to parent of desired nodespublic com.google.common.base.Optional<String> getAsHref(String propertyName)
AccessibleOptional
 containing the href to the resource (i.e. the content path with ".html" appended).getAsHref in interface AccessiblepropertyName - name of property containing a valid content pathOptionalpublic int getIndex(String resourceType)
BasicNodepublic com.google.common.base.Optional<Node> getNode()
BasicNodeOptional if the underlying resource
 for this instance is synthetic or non-existent.public List<ComponentNode> getComponentNodes(String relativePath, String resourceType)
ComponentNodegetComponentNodes in interface ComponentNoderelativePath - relative path to parent of desired nodesresourceType - sling:resourceType of nodes to get from parent nodepublic String getPath()
BasicNodepublic com.google.common.base.Optional<String> getAsHref(String propertyName, boolean strict)
AccessibleOptional
 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 AccessiblepropertyName - 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" appendedOptionalpublic com.google.common.base.Optional<String> getAsHrefInherited(String propertyName, boolean strict, boolean mapped)
Inheritabletrue 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 InheritablepropertyName - 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 List<Property> getProperties(com.google.common.base.Predicate<Property> predicate) throws RepositoryException
BasicNodegetProperties in interface BasicNodepredicate - predicate to applyRepositoryException - if error occurs reading node propertiespublic List<ComponentNode> getComponentNodes(String relativePath, com.google.common.base.Predicate<ComponentNode> predicate)
ComponentNodegetComponentNodes in interface ComponentNoderelativePath - relative path to parent of desired nodespredicate - predicate used to filter nodespublic org.apache.sling.api.resource.Resource getResource()
BasicNodegetResource in interface BasicNodepublic com.google.common.base.Optional<BasicNode> getDesignNode()
ComponentNodegetDesignNode in interface ComponentNodeOptional design node for the current stylepublic com.google.common.base.Optional<Link> getAsLinkInherited(String propertyName)
InheritablegetAsLinkInherited in interface InheritablepropertyName - name of property containing a valid content pathOptional link object, or null if the property does not contain a valid content pathpublic com.google.common.base.Optional<ComponentNode> getComponentNodeInherited(String relativePath)
ComponentNodegetComponentNodeInherited in interface ComponentNoderelativePath - path relative to current nodepublic com.google.common.base.Optional<String> getAsHref(String propertyName, boolean strict, boolean mapped)
AccessibleOptional
 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 AccessiblepropertyName - 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".Optionalpublic com.google.common.base.Optional<Link> getAsLinkInherited(String propertyName, boolean strict)
Inheritabletrue argument
 when including an extension for the link is desired only for valid CQ pages and not external paths.getAsLinkInherited in interface InheritablepropertyName - 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 List<ComponentNode> getComponentNodesInherited(String relativePath)
ComponentNodegetComponentNodesInherited in interface ComponentNoderelativePath - path relative to current nodepublic com.google.common.base.Optional<ComponentNode> getParent()
ComponentNodegetParent in interface ComponentNodepublic com.google.common.base.Optional<Link> getAsLink(String propertyName)
AccessiblegetAsLink in interface AccessiblepropertyName - name of property containing a valid content pathOptional link object, absent if property does not contain a valid content pathpublic com.google.common.base.Optional<Link> getAsLink(String propertyName, boolean strict)
Accessibletrue argument when including an extension for the link is desired only for valid CQ
 pages and not external paths.getAsLink in interface AccessiblepropertyName - 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 com.google.common.base.Optional<Link> getAsLinkInherited(String propertyName, boolean strict, boolean mapped)
Inheritabletrue 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 InheritablepropertyName - 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 <T> List<T> getAsListInherited(String propertyName, Class<T> type)
InheritablegetAsListInherited in interface InheritableT - property typepropertyName - name of multi-valued propertytype - property typepublic com.google.common.base.Optional<Link> getAsLink(String propertyName, boolean strict, boolean mapped)
Accessibletrue 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 AccessiblepropertyName - 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 com.google.common.base.Optional<PageDecorator> getAsPageInherited(String propertyName)
InheritablegetAsPageInherited in interface InheritablepropertyName - property nameOptional page for property valuepublic <T> List<T> getAsList(String propertyName, Class<T> type)
AccessiblegetAsList in interface AccessibleT - property type, must be supported by ValueMappropertyName - name of multi-valued propertytype - property typepublic <AdapterType> com.google.common.base.Optional<AdapterType> getAsTypeInherited(String propertyName, Class<AdapterType> type)
InheritableOptional 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 InheritableAdapterType - adapter class that is adaptable from ResourcepropertyName - 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 com.google.common.base.Optional<String> getImageReferenceInherited(boolean isSelf)
getImageReferenceInherited in interface InheritableOptional inherited image referencepublic com.google.common.base.Optional<PageDecorator> getAsPage(String propertyName)
AccessibleOptional if the
 path value for the given property name does not resolve to a valid CQ page.getAsPage in interface AccessiblepropertyName - property nameOptional page for property valuepublic com.google.common.base.Optional<String> getImageReferenceInherited()
getImageReferenceInherited in interface InheritableOptional inherited image referencepublic com.google.common.base.Optional<String> getImageReferenceInherited(String name)
getImageReferenceInherited in interface Inheritablename - image nameOptional inherited image referencepublic com.google.common.base.Optional<String> getImageSourceInherited()
InheritablegetImageSourceInherited in interface Inheritablepublic <AdapterType> com.google.common.base.Optional<AdapterType> getAsType(String propertyName, Class<AdapterType> type)
AccessibleOptional type instance for a property on this resource containing the path of another
 Resource in the repository.getAsType in interface AccessibleAdapterType - adapter class that is adaptable from ResourcepropertyName - 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 com.google.common.base.Optional<String> getImageReference(boolean isSelf)
AccessiblegetImageReference in interface AccessibleisSelf - if true, image reference property will be accessed from the current resource rather than a childOptional image reference pathpublic com.google.common.base.Optional<String> getImageSourceInherited(int width)
InheritablegetImageSourceInherited in interface Inheritablewidth - image widthpublic com.google.common.base.Optional<String> getImageReference()
AccessiblegetImageReference in interface AccessibleOptional image reference pathpublic com.google.common.base.Optional<String> getImageReference(String name)
getImageReference in interface Accessiblename - image nameOptional image reference pathpublic com.google.common.base.Optional<String> getImageSourceInherited(String name)
InheritablegetImageSourceInherited in interface Inheritablename - image name (name of image as defined in dialog)public com.google.common.base.Optional<String> getImageRendition(String renditionName)
AccessiblegetImageRendition in interface AccessiblerenditionName - rendition name for this asset (e.g. "cq5dam.thumbnail.140.100.png")Optional image rendition pathpublic com.google.common.base.Optional<String> getImageSourceInherited(String name, int width)
InheritablegetImageSourceInherited in interface Inheritablename - image name (name of image as defined in dialog)width - image widthpublic com.google.common.base.Optional<String> getImageRendition(String name, String renditionName)
getImageRendition in interface Accessiblename - image namerenditionName - rendition name for this assetOptional image rendition pathpublic <T> T getInherited(String propertyName, T defaultValue)
InheritablegetInherited in interface InheritableT - result typepropertyName - property to getdefaultValue - value if no result is foundpublic <T> com.google.common.base.Optional<T> getInherited(String propertyName, Class<T> type)
InheritableOptional if not.  This
 returns the same value as the underlying ValueMap wrapped in an Optional instance
 instead of returning null.getInherited in interface InheritableT - typepropertyName - property nametype - property typeOptional of the given type containing the property value or absent if no value is foundpublic com.google.common.base.Optional<ComponentNode> findAncestor(com.google.common.base.Predicate<ComponentNode> predicate)
TraversablefindAncestor 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)
TraversablefindAncestor 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 com.google.common.base.Optional<ComponentNode> findAncestorWithProperty(String propertyName)
TraversablefindAncestorWithProperty 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)
TraversablefindAncestorWithProperty 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 <V> com.google.common.base.Optional<ComponentNode> findAncestorWithPropertyValue(String propertyName, V propertyValue)
TraversablefindAncestorWithPropertyValue in interface Traversable<ComponentNode>V - 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)
TraversablefindAncestorWithPropertyValue 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 List<ComponentNode> findDescendants(com.google.common.base.Predicate<ComponentNode> predicate)
TraversablefindDescendants in interface Traversable<ComponentNode>predicate - predicate to match descendant resources againstCopyright © 2019 ICF Next. All rights reserved.