private Object findConfigurations()

in src/main/java/org/apache/sling/serviceuser/webconsole/impl/ServiceUserWebConsolePlugin.java [298:321]


    private Object findConfigurations(ResourceResolver resolver, String name, List<String> affectedPaths) {
        List<String> configurations = new ArrayList<>();

        Iterator<Resource> configResources = resolver.findResources(
                "SELECT * FROM [sling:OsgiConfig] AS s WHERE (ISDESCENDANTNODE([/apps]) OR ISDESCENDANTNODE([/libs])) AND NAME(s) LIKE 'org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended%' AND [user.mapping] LIKE '%="
                        + name + "'",
                Query.JCR_SQL2);
        while (configResources.hasNext()) {
            Resource configResource = configResources.next();
            affectedPaths.add(configResource.getPath());
            configurations.add(configResource.getPath());
        }
        configResources = resolver.findResources(
                "SELECT * FROM [nt:file] AS s WHERE (ISDESCENDANTNODE([/apps]) OR ISDESCENDANTNODE([/libs])) AND NAME(s) LIKE 'org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended%' AND [jcr:content/jcr:data] LIKE '%="
                        + name + "%'",
                Query.JCR_SQL2);
        while (configResources.hasNext()) {
            Resource configResource = configResources.next();
            affectedPaths.add(configResource.getPath());
            configurations.add(configResource.getPath());
        }

        return configurations.toArray();
    }