Package javax.jcr

Examples of javax.jcr.InvalidItemStateException


         throw new AccessDeniedException(e);
      }
      catch (InvalidItemStateException e)
      {
         remainChangesBack(cLog);
         throw new InvalidItemStateException(e);
      }
      catch (ItemExistsException e)
      {
         remainChangesBack(cLog);
         throw new ItemExistsException(e);
View Full Code Here


               }
            }
         }
         else
         {
            throw new InvalidItemStateException(
               "An item is transient only or removed (either by this session or another) "
                  + session.getLocationFactory().createJCRPath(item.getQPath()).getAsString(false));
         }
      }
   }
View Full Code Here

      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
      // is wrapped into AccessControlException
      if (!session.getAccessManager().hasPermission(getACL(), new String[]{PermissionType.SET_PROPERTY},
         session.getUserState().getIdentity()))
View Full Code Here

      checkValid();

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

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

      {
         return (Version)dataManager.getItemByIdentifier(property(Constants.JCR_BASEVERSION).getString(), false);
      }

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

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

      if (!checkLocking())
View Full Code Here

         throw new AccessDeniedException("Access denied: unlock operation " + getPath() + " for: "
            + session.getUserID() + " item owner " + getACL().getOwner());
      }

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

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

      PlainChangesLog changesLog =
         new PlainChangesLogImpl(new ArrayList<ItemState>(), session.getId(), ExtendedEvent.LOCK);
View Full Code Here

         throw new AccessDeniedException("Access denied: unlock operation " + getPath() + " for: "
            + session.getUserID() + " item owner " + getACL().getOwner());
      }

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

      Lock newLock = session.getLockManager().addLock(this, isDeep, false, timeOut);

      PlainChangesLog changesLog =
         new PlainChangesLogImpl(new ArrayList<ItemState>(), session.getId(), ExtendedEvent.LOCK);
View Full Code Here

            + session.getUserID() + " item owner " + getACL().getOwner());
      }

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

      Map<String, String> failed = new HashMap<String, String>();

      // get corresponding node
View Full Code Here

      if (!this.isNodeType(Constants.MIX_VERSIONABLE))
         throw new UnsupportedRepositoryOperationException("Node is not versionable " + getPath());

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

      if (((VersionImpl)version).getInternalName().equals(Constants.JCR_ROOTVERSION))
         throw new VersionException("It is illegal to call restore() on jcr:rootVersion");

      if (!versionHistory(false).isVersionBelongToThis(version))
View Full Code Here

            throw new AccessDeniedException("Access denied: restore operation " + getPath() + " for: "
               + session.getUserID() + " item owner " + getACL().getOwner());
         }

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

         if (((VersionImpl)version).getInternalName().equals(Constants.JCR_ROOTVERSION))
            throw new VersionException("It is illegal to call restore() on jcr:rootVersion");

         QPath destPath = locationFactory.parseRelPath(relPath).getInternalPath();
View Full Code Here

TOP

Related Classes of javax.jcr.InvalidItemStateException

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.