Package javax.jcr.version

Examples of javax.jcr.version.VersionException


            if (moveLabel)
            {
               removeVersionLabel(label);
               break;
            }
            throw new VersionException("Label " + label + " is already exists and moveLabel=false");
         }
      }

      NodeData versionData = getVersionData(versionName);
View Full Code Here


         changes.add(ItemState.createDeletedState(vldata));
         dataManager.getTransactManager().save(changes);
      }
      else
      {
         throw new VersionException("Label not found " + labelName);
      }

   }
View Full Code Here

      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

      }

      // 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

      PropertyData pdata =
         (PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(Constants.JCR_CREATED, 0), ItemType.PROPERTY);

      if (pdata == null)
      {
         throw new VersionException("jcr:created property is not found for version " + getPath());
      }

      Value created = session.getValueFactory().loadValue(pdata.getValues().get(0), pdata.getType());
      return created.getDate();
   }
View Full Code Here

      VersionHistoryImpl vhistory =
         (VersionHistoryImpl)dataManager.getItemByIdentifier(nodeData().getParentIdentifier(), true);

      if (vhistory == null)
      {
         throw new VersionException("Version history item is not found for version " + getPath());
      }

      return vhistory;
   }
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

      }

      // Check if versionable ancestor is not checked-in
      if (!srcNode.parent().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

      }

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

      // Check locking
      if (!checkLocking())
      {
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.