Examples of listChildren()


Examples of com.day.cq.wcm.api.Page.listChildren()

            stream.writeNamespace("", NS);

            // first do the current page
            write(page, stream, resourceResolver);

            for (Iterator<Page> children = page.listChildren(new PageFilter(), true); children.hasNext();) {
                write(children.next(), stream, resourceResolver);
            }

            stream.writeEndElement();
View Full Code Here

Examples of io.fathom.auto.config.ConfigPath.listChildren()

    public List<Endpoint> lookup(String serviceKey) {
        List<Endpoint> endpoints = Lists.newArrayList();

        try {
            ConfigPath parent = endpointsRoot.child(serviceKey);
            for (ConfigEntry child : parent.listChildren()) {
                String name = child.getName();
                String data = parent.readChild(name);

                EndpointData record = JsonCodec.gson.fromJson(data, EndpointData.class);
View Full Code Here

Examples of io.fathom.cloud.openstack.client.storage.StoragePath.listChildren()

        List<ConfigEntry> children = Lists.newArrayList();

        try {
            StoragePath path = getStoragePath();

            List<StorageObjectInfo> childNodes = path.listChildren(false);
            if (childNodes != null) {
                for (StorageObjectInfo o : childNodes) {
                    String name = path.stripPrefix(o.name);
                    long version = o.getLastModifiedTimestamp();
                    ConfigEntry child = new ConfigEntry(name, version);
View Full Code Here

Examples of org.apache.maven.index.treeview.TreeNode.listChildren()

  {
    fillInRepo();
    indexerManager.reindexAllRepositories("/", true);
    TreeNode node = indexerManager.listNodes(new DefaultTreeNodeFactory(central.getId()), "/", central.getId());
    indexerManager.removeRepositoryIndexContext(central, false);
    Assert.assertEquals(0, node.listChildren().size());
  }
}
View Full Code Here

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

    @Test
    public void testListChildren() throws IOException {
        Resource resource1 = this.resourceResolver.getResource(getTestRootResource().getPath() + "/node1");

        List<Resource> children = ImmutableList.copyOf(resource1.listChildren());
        assertEquals(2, children.size());
        assertEquals("node11", children.get(0).getName());
        assertEquals("node12", children.get(1).getName());
    }
View Full Code Here

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

        final Resource secondGrandChild = mock(Resource.class);
        when(secondGrandChild.adaptTo(ValueMap.class)).thenReturn(secondGrandChildMap);
        when(secondGrandChild.adaptTo(ChildModel.class)).thenAnswer(new AdaptToChildModel());

        Resource secondChild = mock(Resource.class);
        when(secondChild.listChildren()).thenReturn(Arrays.asList(firstGrandChild, secondGrandChild).iterator());

        Resource emptyChild = mock(Resource.class);
        when(emptyChild.listChildren()).thenReturn(Collections.<Resource>emptySet().iterator());

        Resource res = mock(Resource.class);
View Full Code Here

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

        Resource secondChild = mock(Resource.class);
        when(secondChild.listChildren()).thenReturn(Arrays.asList(firstGrandChild, secondGrandChild).iterator());

        Resource emptyChild = mock(Resource.class);
        when(emptyChild.listChildren()).thenReturn(Collections.<Resource>emptySet().iterator());

        Resource res = mock(Resource.class);
        when(res.getChild("firstChild")).thenReturn(firstChild);
        when(res.getChild("secondChild")).thenReturn(secondChild);
        when(res.getChild("emptyChild")).thenReturn(emptyChild);
View Full Code Here

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

        final Resource secondGrandChild = mock(Resource.class);
        when(secondGrandChild.adaptTo(ValueMap.class)).thenReturn(secondGrandChildMap);
        when(secondGrandChild.adaptTo(ChildModel.class)).thenAnswer(new AdaptToChildModel());

        Resource secondChild = mock(Resource.class);
        when(secondChild.listChildren()).thenReturn(Arrays.asList(firstGrandChild, secondGrandChild).iterator());

        Resource emptyChild = mock(Resource.class);
        when(emptyChild.listChildren()).thenReturn(Collections.<Resource>emptySet().iterator());

        Resource res = mock(Resource.class);
View Full Code Here

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

        Resource secondChild = mock(Resource.class);
        when(secondChild.listChildren()).thenReturn(Arrays.asList(firstGrandChild, secondGrandChild).iterator());

        Resource emptyChild = mock(Resource.class);
        when(emptyChild.listChildren()).thenReturn(Collections.<Resource>emptySet().iterator());

        Resource res = mock(Resource.class);
        when(res.getChild("firstChild")).thenReturn(firstChild);
        when(res.getChild("secondChild")).thenReturn(secondChild);
        when(res.getChild("emptyChild")).thenReturn(emptyChild);
View Full Code Here

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

        final Resource secondGrandChild = mock(Resource.class);
        when(secondGrandChild.adaptTo(ValueMap.class)).thenReturn(secondGrandChildMap);
        when(secondGrandChild.adaptTo(ChildModel.class)).thenAnswer(new AdaptToChildModel());

        Resource secondChild = mock(Resource.class);
        when(secondChild.listChildren()).thenReturn(Arrays.asList(firstGrandChild, secondGrandChild).iterator());

        Resource emptyChild = mock(Resource.class);
        when(emptyChild.listChildren()).thenReturn(Collections.<Resource>emptySet().iterator());

        Resource res = mock(Resource.class);
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.