public void checkout(boolean restrictedToSession) throws RepositoryException {
if (getLogger().isDebugEnabled())
getLogger().debug("SourceNode::checkout() called, sourceURI [" + getSourceURI() + "]");
RCML rcml = getRcml();
synchronized (rcml) {
try {
if (rcml.isCheckedOut() && !rcml.isCheckedOutBySession(getSession())) {
throw new RepositoryException("The node [" + this
+ "] is already checked out by another session!");
}
if (!rcml.isCheckedOut()) {
rcml.checkOut(this, restrictedToSession);
}
} catch (RevisionControlException e) {
throw new RepositoryException(e);
}
}