Class ResourceTreeProvider
- java.lang.Object
-
- org.apache.sling.query.impl.resource.ResourceTreeProvider
-
- All Implemented Interfaces:
org.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
public class ResourceTreeProvider extends Object implements org.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
-
-
Constructor Summary
Constructors Constructor Description ResourceTreeProvider(org.apache.sling.api.resource.ResourceResolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
listChildren
public Iterator<org.apache.sling.api.resource.Resource> listChildren(org.apache.sling.api.resource.Resource parent)
- Specified by:
listChildren
in interfaceorg.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
-
getParent
public org.apache.sling.api.resource.Resource getParent(org.apache.sling.api.resource.Resource element)
- Specified by:
getParent
in interfaceorg.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
-
getName
public String getName(org.apache.sling.api.resource.Resource element)
- Specified by:
getName
in interfaceorg.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
-
getPredicate
public Predicate<org.apache.sling.api.resource.Resource> getPredicate(String type, String id, List<Attribute> attributes)
- Specified by:
getPredicate
in interfaceorg.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
-
query
public Iterator<org.apache.sling.api.resource.Resource> query(List<SelectorSegment> segments, org.apache.sling.api.resource.Resource resource)
- Specified by:
query
in interfaceorg.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
-
sameElement
public boolean sameElement(org.apache.sling.api.resource.Resource o1, org.apache.sling.api.resource.Resource o2)
- Specified by:
sameElement
in interfaceorg.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
-
isDescendant
public boolean isDescendant(org.apache.sling.api.resource.Resource root, org.apache.sling.api.resource.Resource testedElement)
- Specified by:
isDescendant
in interfaceorg.apache.sling.query.api.internal.TreeProvider<org.apache.sling.api.resource.Resource>
-
-