Package org.apache.sling.ide.eclipse.ui.nav.model

Examples of org.apache.sling.ide.eclipse.ui.nav.model.JcrNode


    }

    @Test
    public void createNtFolderNode() throws Exception {

        JcrNode contentNode = syncDirNode.getNode("/content/test-root");
        contentNode.createChild("folder", "nt:folder");

        assertThat(projectRule.getProject(), hasFolder("/jcr_root/content/test-root/folder"));
    }
View Full Code Here


    }

    @Test
    public void createNtFileNode() throws Exception {

        JcrNode contentNode = syncDirNode.getNode("/content/test-root");
        contentNode.createChild("hello.txt", "nt:file");

        assertThat(projectRule.getProject(), hasFile("/jcr_root/content/test-root/hello.txt"));
    }
View Full Code Here

    }

    @Test
    public void createFullCoverageNodeUnderFolder() throws Exception {

        JcrNode contentNode = syncDirNode.getNode("/content/test-root");
        contentNode.createChild("messages", "sling:OsgiConfig");

        assertThat(projectRule.getProject(), hasFile("/jcr_root/content/test-root/messages.xml"));
    }
View Full Code Here

        IProject project = projectRule.getProject();
        new ProjectAdapter(project).createOrUpdateFile(Path
                .fromPortableString("jcr_root/content/test-root/holder/.content.xml"),
                getClass().getResourceAsStream("nt-unstructured-nodetype.xml"));

        JcrNode contentNode = syncDirNode.getNode("/content/test-root/holder");
        contentNode.createChild("org.apache.sling.SomeComponent", "sling:OsgiConfig");

        assertThat(project, hasFile("/jcr_root/content/test-root/holder/org.apache.sling.SomeComponent.xml"));
    }
View Full Code Here

    }

    @Test
    public void createUnstructuredNodeWithSpecialName() throws Exception {

        JcrNode contentNode = syncDirNode.getNode("/content/test-root");
        contentNode.createChild("sling:stuff", "nt:unstructured");

        assertThat(projectRule.getProject(), hasFile("/jcr_root/content/test-root/_sling_stuff/.content.xml"));
    }
View Full Code Here

    }

    @Test
    public void createFullCoverageNodeWithSpecialName() throws Exception {

        JcrNode contentNode = syncDirNode.getNode("/content/test-root");
        contentNode.createChild("sling:stuff", "sling:OsgiConfig");

        assertThat(projectRule.getProject(), hasFile("/jcr_root/content/test-root/_sling_stuff.xml"));
    }
View Full Code Here

    }

    @Test
    public void createSlingFolderNodeWithSpecialName() throws Exception {

        JcrNode contentNode = syncDirNode.getNode("/content/test-root");
        contentNode.createChild("sling:stuff", "sling:Folder");

        assertThat(projectRule.getProject(), hasFile("/jcr_root/content/test-root/_sling_stuff/.content.xml"));
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.ide.eclipse.ui.nav.model.JcrNode

Copyright © 2018 www.massapicom. 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.