private Resource getFqdnResource()

in src/main/java/org/apache/sling/hapi/impl/HApiUtilImpl.java [156:171]


    private Resource getFqdnResource(ResourceResolver resolver, String fqdn, String resType) {
        // Try to resolve the resource as a path
        Resource res = resolver.getResource(fqdn);
        if (null != res) {
            LOG.debug("res = " + res.getName() + " " + res.getPath());
            return res;
        } else {
            for (String path : new HashSet<String>(Arrays.asList(hApiPaths))) {
                // Remove trailing slash from path
                path = (path.endsWith("/")) ? path.substring(0, path.length() - 1) : path;
                return getTypeResourceFromFqdn(path, resolver, fqdn, resType);
            }
        }

        return null;
    }