public class ResourceTypeHierarchyIterator extends Object implements Iterator<String>, Iterable<String>
Resource starting with the resource's
"sling:resourceType". next() will either yield the current resource
supertype or, if this supertype does
not exist, the resource supertype of the resource identified by the current
resource type. Resource.getResourceType()
falls back to the primary node type
if no "sling:resourceType" property is set; however the node type hierarchy
is covered by the NodeTypeHierarchyIterator and is not used by this iterator.ResourceUtil.findResourceSuperType(Resource)| Constructor and Description |
|---|
ResourceTypeHierarchyIterator(org.apache.sling.api.resource.Resource resource,
org.apache.sling.api.resource.ResourceResolver resourceResolver) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
boolean |
isProvideSyntheticResourceRoot()
This iterator provides a virtual resource type root
common to all synthetic resources to enable mapping to all
resources including synthetic ones.
|
Iterator<String> |
iterator() |
String |
next() |
void |
remove() |
static ResourceTypeHierarchyIterator |
typeHierarchyOf(org.apache.sling.api.resource.Resource resource,
org.apache.sling.api.resource.ResourceResolver resourceResolver) |
public ResourceTypeHierarchyIterator(org.apache.sling.api.resource.Resource resource,
org.apache.sling.api.resource.ResourceResolver resourceResolver)
resource - must not be null.public static ResourceTypeHierarchyIterator typeHierarchyOf(org.apache.sling.api.resource.Resource resource, org.apache.sling.api.resource.ResourceResolver resourceResolver)
resource - must not be null.null.public boolean isProvideSyntheticResourceRoot()
Constants.SYNTHETIC_RESOURCETYPE_ROOTCopyright © 2014–2015. All rights reserved.