Package javax.jcr.version

Examples of javax.jcr.version.VersionException


      NodeImpl parentNode = parent();
      // Check if versionable ancestor is not checked-in
      if (!parentNode.checkedOut())
      {
         throw new VersionException("Node " + parent().getPath() + " or its nearest ancestor is checked-in");
      }

      // Check locking
      if (!parentNode.checkLocking())
      {
View Full Code Here


      ConstraintViolationException, RepositoryException
   {
      // Check if checked-in (versionable)
      if (!parentNode.checkedOut())
      {
         throw new VersionException("Node " + parentNode.getPath() + " or its nearest ancestor is checked-in");
      }

      // Check is locked
      if (!parentNode.checkLocking())
      {
View Full Code Here

      checkLive();
      NodeImpl node = (NodeImpl)getItem(parentAbsPath);
      // checked-in check
      if (!node.checkedOut())
      {
         throw new VersionException("Node " + node.getPath() + " or its nearest ancestor is checked-in");
      }

      // Check if node is not protected
      if (node.getDefinition().isProtected())
      {
View Full Code Here

   {
      checkLive();
      NodeImpl node = (NodeImpl)getItem(parentAbsPath);
      if (!node.checkedOut())
      {
         throw new VersionException("Node " + node.getPath() + " or its nearest ancestor is checked-in");
      }

      // Check if node is not protected
      if (node.getDefinition().isProtected())
      {
View Full Code Here

         srcParentNode = srcNode.parent();
      }
      // Check if versionable ancestor is not checked-in
      if (!srcParentNode.checkedOut())
      {
         throw new VersionException("Parent or source Node or its nearest ancestor is checked-in");
      }

      if (!srcNode.checkLocking())
      {
         throw new LockException("Source parent node " + srcNode.getPath() + " is locked ");
View Full Code Here

      VersionImpl version =
         (VersionImpl)dataManager
            .getItem(nodeData(), new QPathEntry(Constants.JCR_ROOTVERSION, 0), true, ItemType.NODE);
      if (version == null)
      {
         throw new VersionException("There are no root version in the version history " + getPath());
      }

      return version;
   }
View Full Code Here

      VersionImpl version =
         (VersionImpl)dataManager.getItem(nodeData(), new QPathEntry(jcrVersionName.getInternalName(), 1), pool,
            ItemType.NODE, false);
      if (version == null)
      {
         throw new VersionException("There are no version with name '" + versionName + "' in the version history "
            + getPath());
      }

      return version;
   }
View Full Code Here

      VersionImpl version = (VersionImpl)dataManager.getItemByIdentifier(versionData.getIdentifier(), true, false);

      if (version == null)
      {
         throw new VersionException("There are no version with label '" + label + "' in the version history "
            + getPath());
      }

      return version;
View Full Code Here

   protected List<String> getVersionLabelsList(Version version) throws VersionException, RepositoryException
   {
      if (!isVersionBelongToThis(version))
      {
         throw new VersionException("There are no version '" + version.getPath() + "' in the version history "
            + getPath());
      }

      List<PropertyData> labelsList = getData().getVersionLabels();
      List<String> vlabels = new ArrayList<String>();
View Full Code Here

      NodeData version = getData().getVersionData(jcrPath.getName().getInternalName());

      if (version == null)
      {
         throw new VersionException("Version is not found " + jcrPath.getAsString(false));
      }

      return version;
   }
View Full Code Here

TOP

Related Classes of javax.jcr.version.VersionException

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.