|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.servlets.resolver.internal.helper.LocationIterator
public class LocationIterator
The LocationIterator
provides access to an ordered collection
of absolute paths containing potential request handling. The primary order of
the collection is the resource type hierarchy with the base resource type at
the top. The secondary order is the search path retrieved from the resource
resolver.
Example: For a node type hierarchy "sample" > "super" > "default" and a search path of [ "/apps", "/libs" ], the iterator would provide access to the following list of paths:
/apps/sample
/libs/sample
/apps/super
/libs/super
/apps/default
/libs/default
Constructor Summary | |
---|---|
LocationIterator(String resourceType,
String resourceSuperType,
String baseResourceType,
String workspaceName,
ResourceResolver resolver)
Creates an instance of this iterator starting with a location built from the resource type of the resource and ending with the
given baseResourceType . |
Method Summary | |
---|---|
boolean |
hasNext()
Returns true if there is another entry |
String |
next()
Returns the next entry of this iterator. |
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocationIterator(String resourceType, String resourceSuperType, String baseResourceType, String workspaceName, ResourceResolver resolver)
resource
and ending with the
given baseResourceType
.
resourceType
- the initial resource type.resourceSuperType
- the initial resource super type.baseResourceType
- The base resource type.resolver
- The resource resolverMethod Detail |
---|
public boolean hasNext()
true
if there is another entry
hasNext
in interface Iterator<String>
public String next()
next
in interface Iterator<String>
NoSuchElementException
- if hasNext()
returns
false
.public void remove()
remove
in interface Iterator<String>
UnsupportedOperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |