code: private void checkNotProtected() throws ConstraintViolationException, RepositoryException {
          if (getDefinition().isProtected()) {
              throw new ConstraintViolationException(JcrI18n.cannotRemoveItemWithProtectedDefinition.text(getPath()));
          }
      }
docs: Throw a {@link ConstraintViolationException} if this node is protected (based on the its node definition).
  
  @throws ConstraintViolationException if this node's definition indicates that the node is protected
  @throws RepositoryException if an error occurs retrieving the definition for this node