Examples of LockException


Examples of com.volantis.mcs.repository.lock.LockException

            throw new IllegalArgumentException("principal cannot be null");
        }

        if (principal.equals(owner)) {
            if (!manager.releaseLock(resourceIdentifier, principal)) {
                throw new LockException("Lock for " + resourceIdentifier +
                        " is not owned by " + principal.getName());
            }
        } else if (owner == null) {
            throw new IllegalStateException(
                    "Lock cannot be released as it is not owned");
View Full Code Here

Examples of javax.jcr.lock.LockException

        // Note: since sessionInfo does not allow to identify the id of the
        // lock holding node, we need to access the token via lockInfo
        // TODO: review this.
        LockInfoImpl lInfo = (LockInfoImpl) getLockInfo(sessionInfo, nodeId);
        if (lInfo == null) {
            throw new LockException("No Lock present on Node with id " + saveGetIdString(nodeId, sessionInfo));
        }

        String lockToken = lInfo.getActiveLock().getToken();
        boolean isSessionScoped = lInfo.isSessionScoped();
View Full Code Here

Examples of javax.jcr.lock.LockException

                return;
            }
        }
        // sessionInfo doesn't contain the given lock token and is therefore
        // not the lock holder
        throw new LockException("Unable to remove locktoken '" + lt + "' from Session.");
    }
View Full Code Here

Examples of javax.jcr.lock.LockException

            AccessDeniedException, RepositoryException {
        // check state of this instance
        sanityCheck();

        if (isNew()) {
            throw new LockException("Node not locked: " + safeGetJCRPath());
        }
        return session.getLockManager().getLock(this);
    }
View Full Code Here

Examples of javax.jcr.lock.LockException

    private void checkLockable() throws LockException, RepositoryException {
        if (!isNodeType(QName.MIX_LOCKABLE)) {
            String msg = "Unable to perform locking operation on non-lockable node: "
                    + safeGetJCRPath();
            log.debug(msg);
            throw new LockException(msg);
        }
    }
View Full Code Here

Examples of javax.jcr.lock.LockException

        }

        try {
            createTemplate().execute(new JcrCallback() {
                public Object doInJcr(Session session) throws RepositoryException {
                    throw new LockException();
                }
            });
            fail("Should have thrown ConcurrencyFailureException");
        } catch (ConcurrencyFailureException ex) {
            // expected
View Full Code Here

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

Examples of javax.jcr.lock.LockException

      }

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

Examples of javax.jcr.lock.LockException

      // Check if versionable ancestor is not checked-in
      if (!srcNode.parent().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 ");

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

Examples of javax.jcr.lock.LockException

      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
TOP
Copyright © 2018 www.massapi.com. 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.