Package org.apache.jackrabbit.ocm.manager

Examples of org.apache.jackrabbit.ocm.manager.ObjectContentManager.update()


      //---------------------------------------------------------------------------------------------------------     
            propertyTest = (PropertyTest) ocm.getObject("/test");
            propertyTest.setAutoCreatedWithConstraintsProp("invalid value");
            try
            {
              ocm.update(propertyTest);
              ocm.save();
              fail("Invalid value was accepted for autoCreatedWithConstraintsProp ");
            }
            catch(Exception e)
            {              
View Full Code Here


      //---------------------------------------------------------------------------------------------------------     
            propertyTest = (PropertyTest) ocm.getObject("/test");
            propertyTest.setMandatoryWithConstaintsProp("yy");
            try
            {
              ocm.update(propertyTest);
              ocm.save();
              fail("Invalid value was accepted for mandatoryWithConstaintsProp");
            }
            catch(Exception e)
            {                 
View Full Code Here

           
            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            a.setStringData("testdata2");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
View Full Code Here

               ocm.save();
              
                
               page.addParagraph(new Paragraph("para3"));
               ocm.checkout("/page");
               ocm.update(page);
               ocm.save();
               ocm.checkin("/page");
              
               page.addParagraph(new Paragraph("para4"));
               ocm.checkout("/page");
View Full Code Here

            map.put("value2", new Paragraph("Value2"));
            map.put("value3", new Paragraph("Value3"));
            map.put("value4", new Paragraph("Value4"));
            residual.setElements(map);
           
            ocm.update(residual);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
View Full Code Here

            map.put("value13", new Paragraph("Value13"));
            map.put("value14", new Paragraph("Value14"));
            map.put("value15", new Paragraph("Value15"));
            residual.setElements(map);
           
            ocm.update(residual);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
View Full Code Here

               ocm.save();
               ocm.checkin("/page");
              
               page.addParagraph(new Paragraph("para4"));
               ocm.checkout("/page");
               ocm.update(page);
               ocm.save();
               ocm.checkin("/page");              

               VersionIterator versionIterator = ocm.getAllVersions("/page");
               assertNotNull("VersionIterator is null", versionIterator);
View Full Code Here

            // Lock & update
            // --------------------------------------------------------------------------------
            lock = ocm.lock("/test", true, false);
            a = (A) ocm.getObject("/test");
            a.setA1("new a1 Value");
            ocm.update(a);
            ocm.save();
            ocm.unlock("/test", lock.getLockToken());
           
           
            // --------------------------------------------------------------------------------
View Full Code Here

               ocm.save();
              
                
               page.addParagraph(new Paragraph("para3"));
               ocm.checkout("/page");
               ocm.update(page);
               ocm.save();
               ocm.checkin("/page", new String[] {"A", "B"});
              
               page.addParagraph(new Paragraph("para4"));
               ocm.checkout("/page");
View Full Code Here

               ocm.save();
               ocm.checkin("/page", new String[] {"A", "B"});
              
               page.addParagraph(new Paragraph("para4"));
               ocm.checkout("/page");
               ocm.update(page);
               ocm.save();
               ocm.checkin("/page", new String[] {"C", "D"});           

               String[] allLabels = ocm.getAllVersionLabels("/page");
               assertTrue("Incorrect number of labels", allLabels.length == 4);
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.