Package javax.jcr.lock

Examples of javax.jcr.lock.LockException


            {
               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


         {
            Fqn<String> fqn = makeLockFqn(newLockData.getNodeIdentifier());
            Object oldValue = PrivilegedJBossCacheHelper.put(cache, fqn, LOCK_DATA, newLockData);
            if (oldValue == null)
            {
               throw new LockException("Can't refresh lock for node " + newLockData.getNodeIdentifier()
                  + " since lock is not exist");
            }
            return null;
         }
      };
View Full Code Here

         // this will return null if success. And old data if something exists...
         LockData oldLockData = doPut(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

      }

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

      doAddMixin(type);
   }
View Full Code Here

         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();
View Full Code Here

            "Node.checkout() is not supported for not mix:versionable node ");
      }

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

      if (checkedOut())
      {
         return;
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},
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},
View Full Code Here

      }

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

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.