Package javax.jcr.lock

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


                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

            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

    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

        }

        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

      }

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

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

      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 (!parent().checkLocking())
         throw new LockException("Node " + parent().getPath() + " is locked ");

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

      SessionChangesLog changesLog = new SessionChangesLog(session.getId());
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.