Examples of removeItem()


Examples of javax.jcr.Session.removeItem()

            content = session.getRootNode().getNode("content");
            assertThat(content.getPrimaryNodeType().getName(), equalTo("custom"));

        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();

            IOUtils.closeQuietly(cndInput);
        }
View Full Code Here

Examples of javax.jcr.Session.removeItem()

        // pm.releaseConnection();
        // }

        Session session = login();
        if (session.nodeExists(path)) {
            session.removeItem(path);
            session.save();
        }
    }

    public Node getNode(String nodePath) throws RepositoryException {
View Full Code Here

Examples of javax.jcr.Session.removeItem()

            NodeIterator nodes = session.getNode("/content").getNodes();
            while (nodes.hasNext()) {
                finalOrder.add(nodes.nextNode().getName());
            }
        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();
        }

        assertThat("Incorrect node order", finalOrder, equalTo(expected));
View Full Code Here

Examples of javax.jcr.Session.removeItem()

    }

    @After
    public void tearDown() throws RepositoryException {
        Session s = testNode.getSession();
        s.removeItem(TEST_PATH);
        s.save();
    }

    @Test
    public void testCopyNode() throws RepositoryException {
View Full Code Here

Examples of javax.jcr.Session.removeItem()

    }

    @After
    public void tearDown() throws RepositoryException {
        Session session = getAdminSession();
        session.removeItem("/test");
        session.removeItem(refPath);
        session.save();
    }

    @SuppressWarnings("unchecked")
View Full Code Here

Examples of javax.jcr.Session.removeItem()

    @After
    public void tearDown() throws RepositoryException {
        Session session = getAdminSession();
        session.removeItem("/test");
        session.removeItem(refPath);
        session.save();
    }

    @SuppressWarnings("unchecked")
    @Test
View Full Code Here

Examples of javax.swing.JComboBox.removeItem()

    JComboBox c1 = new JComboBox();
    harness.check(c1.getSelectedIndex(), -1);
    harness.check(c1.getSelectedItem(), null);
   
    // remove an item when it doesn't exist
    c1.removeItem("Item 1");
    harness.check(c1.getSelectedIndex(), -1);
    harness.check(c1.getSelectedItem(), null);
   
    c1.addItem("Item 1");
    harness.check(c1.getSelectedItem(), "Item 1");
View Full Code Here

Examples of javax.swing.JComboBox.removeItem()

    harness.check(c1.getSelectedItem(), "Item 1");
    c1.addItem("Item 3");
    harness.check(c1.getSelectedItem(), "Item 1");
    c1.setSelectedItem("Item 3");
    harness.check(c1.getSelectedItem(), "Item 3");
    c1.removeItem("Item 3");
    harness.check(c1.getSelectedItem(), "Item 2");

    // check null
    c1.removeItem(null);
    harness.check(c1.getSelectedItem(), "Item 2");
View Full Code Here

Examples of javax.swing.JComboBox.removeItem()

    harness.check(c1.getSelectedItem(), "Item 3");
    c1.removeItem("Item 3");
    harness.check(c1.getSelectedItem(), "Item 2");

    // check null
    c1.removeItem(null);
    harness.check(c1.getSelectedItem(), "Item 2");

    c1.removeItem("Item 2");
    harness.check(c1.getSelectedItem(), "Item 1");
    harness.check(c1.getSelectedIndex(), 0);
View Full Code Here

Examples of javax.swing.JComboBox.removeItem()

    // check null
    c1.removeItem(null);
    harness.check(c1.getSelectedItem(), "Item 2");

    c1.removeItem("Item 2");
    harness.check(c1.getSelectedItem(), "Item 1");
    harness.check(c1.getSelectedIndex(), 0);
   
    c1.addItem("Item A");
    c1.removeItem("Item 1");
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.