Package org.apache.jackrabbit.ocm.version

Examples of org.apache.jackrabbit.ocm.version.Version


        try {
            if (!session.itemExists(path)) {
                return null;
            }

            Version version = this.getVersion(path, versionName);
            pathVersion = version.getPath() + "/jcr:frozenNode";

        } catch (RepositoryException e) {
            throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path + " - version :" + versionName, e);
        }
View Full Code Here


        try {
            if (!session.itemExists(path)) {
                return null;
            }

            Version version = this.getVersion(path, versionName);
            pathVersion = version.getPath() + "/jcr:frozenNode";

        } catch (RepositoryException e) {
            throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path + " - version :" + versionName, e);
        }
View Full Code Here

                throw new VersionException("The object " + path + "is not versionable");
            }

            VersionHistory history = node.getVersionHistory();

            return new Version(history.getVersion(versionName));
        } catch (ClassCastException cce) {
            throw new ObjectContentManagerException("Cannot retrieve an object from a property path " + path);
        } catch (PathNotFoundException pnfe) {
            throw new ObjectContentManagerException("Cannot retrieve an object at path " + path, pnfe);
        } catch (javax.jcr.version.VersionException ve) {
View Full Code Here

                throw new VersionException("The object " + path + "is not versionable");
            }

            VersionHistory history = node.getVersionHistory();

            return new Version(history.getRootVersion());
        } catch (ClassCastException cce) {
            throw new ObjectContentManagerException("Cannot retrieve an object from a property path " + path);
        } catch (PathNotFoundException pnfe) {
            throw new ObjectContentManagerException("Cannot retrieve an object at path " + path, pnfe);
        } catch (UnsupportedRepositoryOperationException uroe) {
View Full Code Here

            Node node = (Node) session.getItem(path);
            if (!node.isNodeType("mix:versionable")) {
                throw new VersionException("The object " + path + "is not versionable");
            }

            return new Version(node.getBaseVersion());
        } catch (ClassCastException cce) {
            throw new ObjectContentManagerException("Cannot retrieve an object from a property path " + path);
        } catch (PathNotFoundException pnfe) {
            throw new ObjectContentManagerException("Cannot retrieve an object at path " + path, pnfe);
        } catch (UnsupportedRepositoryOperationException uroe) {
View Full Code Here

               assertNotNull("VersionIterator is null", versionIterator);
               assertTrue("Invalid number of versions found", versionIterator.getSize() == 3);
              
               while (versionIterator.hasNext())
               {
                 Version version = (Version) versionIterator.next();
                 log.info("version found : "+ version.getName() + " - " + version.getPath() + " - " +  version.getCreated().getTime());
                
               }
              
               Version baseVersion = ocm.getBaseVersion("/page");
               System.out.println("Base version : " + baseVersion.getName());

               Version rootVersion = ocm.getRootVersion("/page");
               System.out.println("Root version : " + rootVersion.getName());
               //this.exportDocument("/home/christophe/export.xml", "/jcr:system/jcr:versionStorage", true, false);
                            
                 //Get the latest version
               page = (Page) ocm.getObject( "/page");
               assertNotNull("Last version is nulll", page);
View Full Code Here

               assertNotNull("VersionIterator is null", versionIterator);
               assertTrue("Invalid number of versions found", versionIterator.getSize() == 3);
              
               while (versionIterator.hasNext())
               {
                 Version version = (Version) versionIterator.next();
                 log.info("version found : "+ version.getName() + " - " + version.getPath() + " - " +  version.getCreated().getTime());
                
               }
              
               Version baseVersion = ocm.getBaseVersion("/page");
               System.out.println("Base version : " + baseVersion.getName());

               Version rootVersion = ocm.getRootVersion("/page");
               System.out.println("Root version : " + rootVersion.getName());
               //this.exportDocument("/home/christophe/export.xml", "/jcr:system/jcr:versionStorage", true, false);
                            
                 //Get the latest version
               page = (Page) ocm.getObject( "/page");
               assertNotNull("Last version is nulll", page);
View Full Code Here

        try {
            if (!session.nodeExists(path)) {
                return null;
            }

            Version version = this.getVersion(path, versionName);
            pathVersion = version.getPath() + "/jcr:frozenNode";

        } catch (RepositoryException e) {
            throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path + " - version :" + versionName, e);
        }
View Full Code Here

        try {
            if (!session.nodeExists(path)) {
                return null;
            }

            Version version = this.getVersion(path, versionName);
            pathVersion = version.getPath() + "/jcr:frozenNode";

        } catch (RepositoryException e) {
            throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path + " - version :" + versionName, e);
        }
View Full Code Here

                throw new VersionException("The object " + path + "is not versionable");
            }

            VersionHistory history = getVersionManager().getVersionHistory(path);

            return new Version(history.getVersion(versionName));
        } catch (ClassCastException cce) {
            throw new ObjectContentManagerException("Cannot retrieve an object from a property path " + path);
        } catch (PathNotFoundException pnfe) {
            throw new ObjectContentManagerException("Cannot retrieve an object at path " + path, pnfe);
        } catch (javax.jcr.version.VersionException ve) {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.version.Version

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.