Package org.apache.sling.servlets.resolver.internal.helper

# Klasse LocationCollector

java.lang.Object
org.apache.sling.servlets.resolver.internal.helper.LocationCollector

public class LocationCollector extends Object
The `LocationCollector` 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:

1. `/apps/sample`
2. `/libs/sample`
3. `/apps/super`
4. `/libs/super`
5. `/apps/default`
6. `/libs/default`

## Feldübersicht

Felder
Modifizierer und Typ
Feld
Beschreibung
`protected static final String`
`CACHE_KEY`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`static void`
`clearCache(org.apache.sling.api.resource.ResourceResolver resolver)`
Purge all cache entries owned by the LocationCollector
`protected static @NotNull org.apache.sling.api.resource.Resource`
`getResource(@NotNull org.apache.sling.api.resource.ResourceResolver resolver, @NotNull String path, @NotNull Map<String,org.apache.sling.api.resource.Resource> cacheMap)`
Resolve a path to a resource, either via the cache or the ResourceResolver

### Von Klasse geerbte Methoden java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Felddetails

### CACHE_KEY

protected static final String CACHE_KEY

## Methodendetails

### getResource

@NotNull protected static @NotNull org.apache.sling.api.resource.Resource getResource(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resolver, @NotNull @NotNull String path, @NotNull @NotNull Map<String,org.apache.sling.api.resource.Resource> cacheMap)
Resolve a path to a resource, either via the cache or the ResourceResolver

Parameter:
  `resolver` -
  `path` -
  `cacheMap` - the cache map to use
Gibt zurück:
  a synthetic or "real" resource

### clearCache

public static void clearCache(org.apache.sling.api.resource.ResourceResolver resolver)
Purge all cache entries owned by the LocationCollector

Parameter:
  `resolver` - the resolver owning that cache