public class ResourceTreeProvider extends Object implements TreeProvider<org.apache.sling.api.resource.Resource>
Constructor and Description |
---|
ResourceTreeProvider(org.apache.sling.api.resource.ResourceResolver resolver) |
Modifier and Type | Method and Description |
---|---|
String |
getName(org.apache.sling.api.resource.Resource element) |
org.apache.sling.api.resource.Resource |
getParent(org.apache.sling.api.resource.Resource element) |
Predicate<org.apache.sling.api.resource.Resource> |
getPredicate(String type,
String id,
List<Attribute> attributes) |
boolean |
isDescendant(org.apache.sling.api.resource.Resource root,
org.apache.sling.api.resource.Resource testedElement) |
Iterator<org.apache.sling.api.resource.Resource> |
listChildren(org.apache.sling.api.resource.Resource parent) |
Iterator<org.apache.sling.api.resource.Resource> |
query(List<SelectorSegment> segments,
org.apache.sling.api.resource.Resource resource) |
boolean |
sameElement(org.apache.sling.api.resource.Resource o1,
org.apache.sling.api.resource.Resource o2) |
public ResourceTreeProvider(org.apache.sling.api.resource.ResourceResolver resolver)
public Iterator<org.apache.sling.api.resource.Resource> listChildren(org.apache.sling.api.resource.Resource parent)
listChildren
in interface TreeProvider<org.apache.sling.api.resource.Resource>
public org.apache.sling.api.resource.Resource getParent(org.apache.sling.api.resource.Resource element)
getParent
in interface TreeProvider<org.apache.sling.api.resource.Resource>
public String getName(org.apache.sling.api.resource.Resource element)
getName
in interface TreeProvider<org.apache.sling.api.resource.Resource>
public Predicate<org.apache.sling.api.resource.Resource> getPredicate(String type, String id, List<Attribute> attributes)
getPredicate
in interface TreeProvider<org.apache.sling.api.resource.Resource>
public Iterator<org.apache.sling.api.resource.Resource> query(List<SelectorSegment> segments, org.apache.sling.api.resource.Resource resource)
query
in interface TreeProvider<org.apache.sling.api.resource.Resource>
public boolean sameElement(org.apache.sling.api.resource.Resource o1, org.apache.sling.api.resource.Resource o2)
sameElement
in interface TreeProvider<org.apache.sling.api.resource.Resource>
public boolean isDescendant(org.apache.sling.api.resource.Resource root, org.apache.sling.api.resource.Resource testedElement)
isDescendant
in interface TreeProvider<org.apache.sling.api.resource.Resource>
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.