Package javax.jcr.lock

Examples of javax.jcr.lock.LockException


      }

      // Check locking
      if (!node.checkLocking())
      {
         throw new LockException("Node " + node.getPath() + " is locked ");
      }

      Map<String, Object> context = new HashMap<String, Object>();
      context.put(ContentImporter.RESPECT_PROPERTY_DEFINITIONS_CONSTRAINTS, true);
View Full Code Here


      }

      // Check locking
      if (!node.checkLocking())
      {
         throw new LockException("Node " + node.getPath() + " is locked ");
      }

      StreamImporter importer =
         new ExportImportFactory().getStreamImporter(((NodeData)node.getData()), uuidBehavior,
            new ItemDataKeeperAdapter(getTransientNodesManager()), getTransientNodesManager(), nodeTypeManager,
View Full Code Here

         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 ");
      }

      ItemDataMoveVisitor initializer =
         new ItemDataMoveVisitor((NodeData)destParentNode.getData(), destNodePath.getName().getInternalName(),
            nodeTypeManager, getTransientNodesManager(), true);
View Full Code Here

      }

      // Check locking
      if (!parentNode.checkLocking())
      {
         throw new LockException("Node " + parent().getPath() + " is locked ");
      }

      // launch event
      session.getActionHandler().preRemoveItem(this);
View Full Code Here

      }

      // Check is locked
      if (!parentNode.checkLocking())
      {
         throw new LockException("Node " + parentNode.getPath() + " is locked ");
      }

      List<ValueData> valueDataList = new ArrayList<ValueData>();

      // cast to required type if neccessary
View Full Code Here

         // this will return null if success. And old data if something exists...
         LockData oldLockData = (LockData)node.putIfAbsent(LOCK_DATA, lockData);

         if (oldLockData != null)
         {
            throw new LockException("Unable to write LockData. Node [" + lockData.getNodeIdentifier()
               + "] already has LockData!");
         }

         session.notifyLockPersisted(nodeIdentifier);
      }
      else
      {
         throw new LockException("No lock in pending locks");
      }
   }
View Full Code Here

      log.debug("add event fire");
      File lockFile = new File(rootDir, lock.getNodeIdentifier());

      if (PrivilegedFileHelper.exists(lockFile))
      {
         throw new LockException("Persistent lock information already exists");
      }

      try
      {
         lockFile.createNewFile();
      }
      catch (IOException e)
      {
         throw new LockException(e);
      }
   }
View Full Code Here

         // throw new LockException("Persistent lock information not exists");
         log.warn("Persistent lock information  for node " + lock.getNodeIdentifier() + " doesn't exists");
         return;
      }
      if (!PrivilegedFileHelper.delete(lockFile))
         throw new LockException("Fail to remove lock information");

   }
View Full Code Here

            if (!PrivilegedFileHelper.exists(lockFile))
            {
               log.warn("Persistent lock information for node id " + list[i] + " doesn't exists");
            }
            if (!PrivilegedFileHelper.delete(lockFile))
               throw new LockException("Fail to remove lock information");
         }
      }
      catch (RepositoryException e)
      {
         log.error("Unable to remove lock files due to error " + e, e);
         throw new LockException(e);
      }
   }
View Full Code Here

      {
         return this.lockExist(nodeId);
      }
      catch (RepositoryException e)
      {
         throw new LockException(e.getMessage(), e);
      }
   }
View Full Code Here

TOP

Related Classes of javax.jcr.lock.LockException

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.