Search in sources :

Example 1 with PathSet

use of org.apache.sling.api.resource.path.PathSet in project sling by apache.

the class ResourceProviderTracker method updateProviderContext.

private void updateProviderContext(final ResourceProviderHandler handler) {
    final Set<String> excludedPaths = new HashSet<String>();
    final Path handlerPath = new Path(handler.getPath());
    for (final String otherPath : handlers.keySet()) {
        if (!handler.getPath().equals(otherPath) && handlerPath.matches(otherPath)) {
            excludedPaths.add(otherPath);
        }
    }
    final PathSet excludedPathSet = PathSet.fromStringCollection(excludedPaths);
    handler.getProviderContext().update(reporterGenerator.create(handlerPath, excludedPathSet), excludedPathSet);
}
Also used : Path(org.apache.sling.api.resource.path.Path) PathSet(org.apache.sling.api.resource.path.PathSet) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 Path (org.apache.sling.api.resource.path.Path)1 PathSet (org.apache.sling.api.resource.path.PathSet)1