Examples of listChildren()


Examples of org.apache.sling.api.resource.ResourceResolver.listChildren()

                final String cleanedPath = cleanPath(path, false);
                final boolean startsWithWebInfTags = cleanedPath.startsWith(WEB_INF_TAGS);

                Resource resource = resolver.getResource(startsWithWebInfTags ? cleanedPath.substring(WEB_INF_TAGS.length()) : cleanedPath);
                if (resource != null) {
                    Iterator<Resource> entries = resolver.listChildren(resource);
                    while (entries.hasNext()) {
                        final String entryPath = entries.next().getPath();
                        if (startsWithWebInfTags) {
                            paths.add(WEB_INF_TAGS + entryPath);
                        } else {
View Full Code Here

Examples of org.apache.sling.api.resource.ResourceResolver.listChildren()

        Resource resource = resourceResolver.getResource("/single/test/withchildren");
        Assert.assertNotNull(resource);

        // test via the resource list children itself, this really just tests this test case.
        Iterator<Resource> resourceIterator = resourceResolver.listChildren(resource);
        Assert.assertNotNull(resourceResolver);
        int i = 0;
        while(resourceIterator.hasNext()) {
            Assert.assertEquals("m"+i, resourceIterator.next().getName());
            i++;
View Full Code Here

Examples of org.apache.sling.api.resource.ResourceResolver.listChildren()

        // delegate resource listing to resource resolver
        if (currentResource instanceof SuperimposingResource) {
            final SuperimposingResource res = (SuperimposingResource) currentResource;
            final ResourceResolver resolver = res.getResource().getResourceResolver();
            final Iterator<Resource> children = resolver.listChildren(res.getResource());
            return new SuperimposingResourceIterator(this, children);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.sling.api.resource.ResourceResolver.listChildren()

            fail();
        } catch (final IllegalStateException ise) {
            // expected
        }
        try {
            rr.listChildren(null);
            fail();
        } catch (final IllegalStateException ise) {
            // expected
        }
        try {
View Full Code Here

Examples of org.apache.sling.resourceresolver.impl.tree.ProviderHandler.listChildren()

    private Resource seek() {
        while (delayedIter == null) {
            while ((resources == null || !resources.hasNext())
                    && providers.hasNext()) {
                final ProviderHandler provider = providers.next();
                resources = provider.listChildren(this.resourceResolverContext, parentResource);
                log.debug("     Checking Provider {} ", provider);
            }

            if (resources != null && resources.hasNext()) {
                final Resource res = resources.next();
View Full Code Here

Examples of org.platformlayer.PlatformLayerClient.listChildren()

  public Object runCommand() throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());
    boolean includeDeleted = true;
    return client.listChildren(key, includeDeleted);
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    Ansi ansi = new Ansi(writer);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.