Package javax.jcr.lock

Examples of javax.jcr.lock.LockException


   {

      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());

      // session.checkPermission(getPath(), PermissionType.SET_PROPERTY) is not used because RepositoryException
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

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

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

      doAddMixin(type);
   }
View Full Code Here

      if (hasProperty(Constants.JCR_MERGEFAILED))
         throw new VersionException("Node has jcr:mergeFailed " + getPath());

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

      // the new version identifier
      String verIdentifier = IdGenerator.generate();

      SessionChangesLog changesLog = new SessionChangesLog(session.getId());
View Full Code Here

      if (!this.isNodeType(Constants.MIX_VERSIONABLE))
         throw new UnsupportedRepositoryOperationException(
            "Node.checkout() is not supported for not mix:versionable node ");

      if (!checkLocking())
         throw new LockException("Node " + getPath() + " is locked ");
     
      if (checkedOut())
         return;

      SessionChangesLog changesLog = new SessionChangesLog(session.getId());
View Full Code Here

      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());

      // session.checkPermission(getPath(), PermissionType.SET_PROPERTY) is not used because RepositoryException
      // is wrapped into AccessControlException
      if (!session.getAccessManager().hasPermission(getACL(), new String[]{PermissionType.SET_PROPERTY},
         session.getUserState().getIdentity()))
View Full Code Here

      AccessDeniedException, RepositoryException
   {
      checkValid();

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

      // session.checkPermission(getPath(), PermissionType.SET_PROPERTY) is not used because RepositoryException
      // is wrapped into AccessControlException
      if (!session.getAccessManager().hasPermission(getACL(), new String[]{PermissionType.SET_PROPERTY},
         session.getUserState().getIdentity()))
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.