Package org.apache.jackrabbit.vault.packaging

Examples of org.apache.jackrabbit.vault.packaging.JcrPackage.install()


        InputStream is = new ByteArrayInputStream("hello, world.".getBytes());
        JcrUtils.putFile(bar, "bar.jsp", "text/plain", is);
        admin.save();

        // now re-install package
        pack.install(getDefaultOptions());

        assertNodeMissing("/tmp/test/content/bar");
        assertNodeMissing("/tmp/test/content/bar/bar.jsp");
    }
View Full Code Here


     */
    @Test
    public void installUninstallLevel1() throws RepositoryException, IOException, PackageException {
        JcrPackage pack = packMgr.upload(getStream("testpackages/tmp.zip"), false);
        assertNotNull(pack);
        pack.install(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/tobi");

        pack.uninstall(getDefaultOptions());
        assertNodeMissing("/tmp");
    }
View Full Code Here

     */
    @Test
    public void installUninstallLevel2() throws RepositoryException, IOException, PackageException {
        JcrPackage pack = packMgr.upload(getStream("testpackages/tmp_foo.zip"), false);
        assertNotNull(pack);
        pack.install(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/tobi");

        pack.uninstall(getDefaultOptions());
        assertNodeExists("/tmp");
        assertNodeMissing("/tmp/foo");
View Full Code Here

     */
    @Test
    public void installUninstallLevel3() throws RepositoryException, IOException, PackageException {
        JcrPackage pack = packMgr.upload(getStream("testpackages/tmp_foo_bar.zip"), false);
        assertNotNull(pack);
        pack.install(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/tobi");

        pack.uninstall(getDefaultOptions());
        assertNodeExists("/tmp/foo");
        assertNodeMissing("/tmp/foo/bar");
View Full Code Here

     */
    @Test
    public void installUninstallSubsequent() throws RepositoryException, IOException, PackageException {
        JcrPackage pack = packMgr.upload(getStream("testpackages/tmp.zip"), false);
        assertNotNull(pack);
        pack.install(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/tobi");

        // now install the empty package
        JcrPackage pack2 = packMgr.upload(getStream("testpackages/empty_tmp_foo_bar.zip"), false);
        assertNotNull(pack2);
View Full Code Here

        assertNodeExists("/tmp/foo/bar/tobi");

        // now install the empty package
        JcrPackage pack2 = packMgr.upload(getStream("testpackages/empty_tmp_foo_bar.zip"), false);
        assertNotNull(pack2);
        pack2.install(getDefaultOptions());

        assertNodeExists("/tmp/foo");
        assertNodeMissing("/tmp/foo/bar");

        pack2.uninstall(getDefaultOptions());
View Full Code Here

     */
    @Test
    public void installUninstallFile() throws RepositoryException, IOException, PackageException {
        JcrPackage pack = packMgr.upload(getStream("testpackages/tmp_foo_bar_test.zip"), false);
        assertNotNull(pack);
        pack.install(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/test.txt");

        pack.uninstall(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar");
        assertNodeMissing("/tmp/foo/bar/test.txt");
View Full Code Here

     */
    @Test
    public void installInstallNoFilter() throws RepositoryException, IOException, PackageException {
        JcrPackage pack = packMgr.upload(getStream("testpackages/tmp_foo_bar_test_nofilter.zip"), false);
        assertNotNull(pack);
        pack.install(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/test.txt");

        pack.uninstall(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/test.txt");
    }
View Full Code Here

     */
    @Test
    public void installInstallMinimal() throws RepositoryException, IOException, PackageException {
        JcrPackage pack = packMgr.upload(getStream("testpackages/tmp_foo_bar_test_minimal.zip"), false);
        assertNotNull(pack);
        pack.install(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/test.txt");

        pack.uninstall(getDefaultOptions());
        assertNodeExists("/tmp/foo/bar/test.txt");
    }
View Full Code Here

    public void testACAndMerge() throws RepositoryException, IOException, PackageException {
        assertNodeMissing("/testroot");

        JcrPackage pack = packMgr.upload(getStream("testpackages/mode_ac_test_a.zip"), false);
        assertNotNull(pack);
        pack.install(getDefaultOptions());

        // test if nodes and ACLs of first package exist
        assertNodeExists("/testroot/node_a");
        assertPermission("/testroot/secured", false, new String[]{"jcr:all"}, "everyone", null);
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.