Package javax.jcr.observation

Examples of javax.jcr.observation.EventJournal


        node1.setProperty("prop1", (String) null);
        node2.remove();
        session.save();
        Thread.sleep(100);

        EventJournal eventJournal = getObservationManager().getEventJournal();
        assertPathsInJournal(eventJournal, false,
                             "/testroot/node1", "/testroot/node1/jcr:primaryType", "/testroot/node1/prop1",
                             "/testroot/node1/prop2", "/testroot/node2/jcr:primaryType", "/testroot/node2/jcr:primaryType",
                             "/testroot/node1/prop2", "/testroot/node1/prop1", "/testroot/node1/prop2");
View Full Code Here


        Node node3 = getRoot().addNode("node3");
        session.save();
        Thread.sleep(200);


        EventJournal eventJournal = getObservationManager().getEventJournal(org.modeshape.jcr.api.observation.Event.ALL_EVENTS,
                                                                            null, true, new String[]{node1.getIdentifier(),
                                                                                                     node3.getIdentifier()},
                                                                            null);
        assertPathsInJournal(eventJournal, true,
                             "/testroot/node1", "/testroot/node1/jcr:primaryType",
View Full Code Here

        getRoot().addNode("node3");
        session.save();
        Thread.sleep(100);
        long afterNode3 = System.currentTimeMillis();

        EventJournal journal = getObservationManager().getEventJournal();
        journal.skipTo(startingDate);
        assertPathsInJournal(journal, true,
                             "/testroot/node1", "/testroot/node1/jcr:primaryType",
                             "/testroot/node2", "/testroot/node2/jcr:primaryType",
                             "/testroot/node3", "/testroot/node3/jcr:primaryType");

        journal = getObservationManager().getEventJournal();
        journal.skipTo(afterNode1);
        assertPathsInJournal(journal, true,
                             "/testroot/node2", "/testroot/node2/jcr:primaryType",
                             "/testroot/node3", "/testroot/node3/jcr:primaryType");

        journal = getObservationManager().getEventJournal();
        journal.skipTo(afterNode2);
        assertPathsInJournal(journal, true,
                             "/testroot/node3", "/testroot/node3/jcr:primaryType");

        journal = getObservationManager().getEventJournal();
        journal.skipTo(afterNode3);
        assertFalse(journal.hasNext());
    }
View Full Code Here

TOP

Related Classes of javax.jcr.observation.EventJournal

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.