protected final void checkForCheckedOut() throws VersionException, RepositoryException {
        if (!node.isCheckedOut()) {
            // Node is not checked out, so changing property is only allowed if OPV of property is 'ignore' ...
            JcrPropertyDefinition defn = getDefinition();
            if (defn.getOnParentVersion() != OnParentVersionAction.IGNORE) {
                // Can't change this property ...
                String path = getParent().getPath();
                throw new VersionException(JcrI18n.nodeIsCheckedIn.text(path));
            }
        }
    }
protected final void checkForCheckedOut ( ) throws VersionException , RepositoryException { if ( ! node . isCheckedOut ( ) ) { JcrPropertyDefinition defn = getDefinition ( ) ; if ( defn . getOnParentVersion ( ) != OnParentVersionAction . IGNORE ) { String path = getParent ( ) . getPath ( ) ; throw new VersionException ( JcrI18n . nodeIsCheckedIn . text ( path ) ) ; } } }
Verifies that this node is either not versionable or that it is versionable but checked out.

@throws VersionException if the node is versionable but is checked in and cannot be modified
@throws RepositoryException if there is an error accessing the repository