private boolean removeResource()

in src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java [228:250]


    private boolean removeResource(final String path, final AtomicBoolean resolverRefreshed) {
        final String actualContentPath = getActualContentPath(path);
        final String actualContentPathPrefix = actualContentPath + "/";

        boolean vanityPathChanged = false;
        boolean aliasChanged = false;

        for (final String target : vph.getVanityPathMappings().keySet()) {
            if (target.startsWith(actualContentPathPrefix) || target.equals(actualContentPath)) {
                vanityPathChanged |= vph.removeVanityPath(target);
            }
        }

        final String pathPrefix = path + "/";
        for (final String contentPath : ah.aliasMapsMap.keySet()) {
            if (path.startsWith(contentPath + "/") || path.equals(contentPath) || contentPath.startsWith(pathPrefix)) {
                aliasChanged |= ah.removeAlias(
                        resolver, contentPath, path, () -> this.refreshResolverIfNecessary(resolverRefreshed));
            }
        }

        return vanityPathChanged || aliasChanged;
    }