Package javax.jcr.lock

Examples of javax.jcr.lock.LockException


      checkValid();

      LockImpl lock = session.getLockManager().getLock(this);
      if (lock == null)
      {
         throw new LockException("Lock not found " + getPath());
      }

      return lock;

   }
View Full Code Here


   {

      checkValid();

      if (!isNodeType(Constants.MIX_LOCKABLE))
         throw new LockException("Node is not lockable " + getPath());

      if (dataManager.hasPendingChanges(getInternalPath()))
         throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());

      Lock newLock = session.getLockManager().addLock(this, isDeep, isSessionScoped, -1);
View Full Code Here

      AccessDeniedException, RepositoryException
   {
      checkValid();

      if (!isNodeType(Constants.MIX_LOCKABLE))
         throw new LockException("Node is not lockable " + getPath());

      if (dataManager.hasPendingChanges(getInternalPath()))
         throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());

      Lock newLock = session.getLockManager().addLock(this, isDeep, false, timeOut);
View Full Code Here

      }

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

      session.getActionHandler().preRemoveMixin(this, name);

      PropertyData propData =
View Full Code Here

      if (!versionHistory(false).isVersionBelongToThis(version))
         throw new VersionException("Bad version " + version.getPath());

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

      NodeData destParent = (NodeData)dataManager.getItemData(nodeData().getParentIdentifier());
      ((VersionImpl)version).restore(this.getSession(), destParent, nodeData().getQPath().getName(), removeExisting);
   }
View Full Code Here

            if (!destNode.versionHistory(false).isVersionBelongToThis(version))
               throw new VersionException("Bad version " + version.getPath());

            // Check locking
            if (!destNode.parent().checkLocking())
               throw new LockException("Node " + destNode.getPath() + " is locked ");
         }
         else
         {
            // Dest node not found
            if (!destParent.checkedOut())
View Full Code Here

   {

      checkValid();

      if (!session.getLockManager().holdsLock((NodeData)this.getData()))
         throw new LockException("The node not locked " + getPath());

      if (!session.getLockManager().isLockHolder(this))
         throw new LockException("There are no permission to unlock the node " + getPath());

      if (dataManager.hasPendingChanges(getInternalPath()))
         throw new InvalidItemStateException("Node has pending unsaved changes " + getPath());

      doUnlock();
View Full Code Here

      if (session.hasPendingChanges())
         throw new InvalidItemStateException("Session has pending changes ");

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

      SessionChangesLog changes = new SessionChangesLog(session.getId());

      String srcPath;
      try
View Full Code Here

      if (!checkedOut())
         throw new VersionException("Node " + getPath() + " or its nearest ancestor is checked-in");

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

   }
View Full Code Here

      if (session.getLockManager().holdsLock(nodeData()))
      {
         // locked, should be unlocked

         if (!session.getLockManager().isLockHolder(this))
            throw new LockException("There are no permission to unlock the node " + getPath());

         // remove mix:lockable properties (as the node is locked)
         doUnlock();
      }
   }
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.