Package javax.jcr.version

Examples of javax.jcr.version.VersionException


   protected NodeData getVersionLabelsData() throws VersionException, RepositoryException
   {
      NodeData labels = getData().getVersionLabelsData();
      if (labels == null)
      {
         throw new VersionException("Mandatory node jcr:versionLabels is not found for version history " + getPath());
      }

      return labels;
   }
View Full Code Here


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

         if (createdData == null)
            throw new VersionException("jcr:created is not found, version: " + vd.getQPath().getAsString());

         Calendar created = null;
         try
         {
            created = new JCRDateFormat().deserialize(new String(createdData.getValues().get(0).getAsByteArray()));
View Full Code Here

   protected NodeData getVersionDataByIdentifier(String versionIdentifier) throws VersionException, RepositoryException
   {
      NodeData version = (NodeData)dataManager.getItemData(versionIdentifier);
      if (version == null)
      {
         throw new VersionException("Version is not found, uuid: " + versionIdentifier);
      }

      return version;
   }
View Full Code Here

            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

      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

      session.checkLive();
      NodeImpl node = (NodeImpl)session.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

      session.checkLive();

      NodeImpl node = (NodeImpl)session.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

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.