Package org.exoplatform.services.jcr.impl.core

Examples of org.exoplatform.services.jcr.impl.core.SessionImpl.save()


            Node n1n2 = n1.addNode("n2"); // /observationTest/n1/n2
            n1n2.setProperty("prop", "observation property");
            anotherWs1.save();

            n1n2.setProperty("prop", "property edition 1"); // change 1
            anotherWs1.save();

            anotherWs1.getWorkspace().getObservationManager().removeEventListener(listener1);

            Node n1n3 = n1.addNode("n3"); // /observationTest/n1/n3
            n1n3.setProperty("prop", "observation property");
View Full Code Here


            Node n1n3 = n1.addNode("n3"); // /observationTest/n1/n3
            n1n3.setProperty("prop", "observation property");

            n1n2.setProperty("prop", "property edition 2"); // change 2

            anotherWs1.save();

            assertEquals("A events count expected", 1, listener1.getCounter());
            assertEquals("A events count expected", 2, listener2.getCounter());
         }
         catch (Exception e)
View Full Code Here

         SessionImpl session = (SessionImpl)repository.login(credentials, wsName);
         try
         {
            Node rootNode = session.getRootNode().addNode("test" + index);
            rootNode.addNode("node1").setProperty("prop1", "value1");
            session.save();
         }
         finally
         {
            session.logout();
         }
View Full Code Here

         try
         {
            Node rootNode = session.getRootNode().addNode("test" + index);

            rootNode.addNode("node1").setProperty("prop1", "value1");
            session.save();
         }
         finally
         {
            session.logout();
         }
View Full Code Here

         {
            Node n1 = anotherWs1.getRootNode().getNode(testRootWs1.getName()).addNode("n1"); // /
            // observationTest
            // /n1
            Node n1n2 = n1.addNode("n2"); // /observationTest/n1/n2
            anotherWs1.save();

            assertEquals("A events count expected 1. ", 1, listener.getCounter());
         }
         catch (Exception e)
         {
View Full Code Here

               // /
               // n1
               Node n1n2 = n1.addNode("jcr:content", "nt:unstructured"); // /observationTest/nXXXX/jcr:
               // content
               n1n2.addMixin("mix:referenceable");
               anotherWs1.save();

               if (i == removeCount)
               {
                  anotherWs1.getWorkspace().getObservationManager().addEventListener(removeListener,
                     Event.PROPERTY_REMOVED, testRootWs1.getPath(), true, null, null, true); // no local
View Full Code Here

               {
                  // remove prop:
                  // jcr:content --> jcr:primaryType, jcr:mixinTypes, jcr:uuid
                  // nt:file --> jcr:primaryType, jcr:created
                  n1.remove();
                  anotherWs1.save();
               }
            }
            catch (Exception e)
            {
               e.printStackTrace();
View Full Code Here

            Node n1 = anotherWs1.getRootNode().getNode(testRootWs1.getName()).addNode("n1"); // /
            // observationTest
            // /n1
            Node n1n2 = n1.addNode("n2"); // /observationTest/n1/n2
            n1n2.setProperty("prop", "observation property");
            anotherWs1.save();

            n1n2.setProperty("prop", "property edition 1"); // change 1
            anotherWs1.save();

            anotherWs1.getWorkspace().getObservationManager().removeEventListener(listener1);
View Full Code Here

            Node n1n2 = n1.addNode("n2"); // /observationTest/n1/n2
            n1n2.setProperty("prop", "observation property");
            anotherWs1.save();

            n1n2.setProperty("prop", "property edition 1"); // change 1
            anotherWs1.save();

            anotherWs1.getWorkspace().getObservationManager().removeEventListener(listener1);

            Node n1n3 = n1.addNode("n3"); // /observationTest/n1/n3
            n1n3.setProperty("prop", "observation property");
View Full Code Here

            Node n1n3 = n1.addNode("n3"); // /observationTest/n1/n3
            n1n3.setProperty("prop", "observation property");

            n1n2.setProperty("prop", "property edition 2"); // change 2

            anotherWs1.save();

            assertEquals("A events count expected", 1, listener1.getCounter());
            assertEquals("A events count expected", 2, listener2.getCounter());
         }
         catch (Exception e)
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.