@Override
 public void versioning(Document doc) {
   if (!doc.isLatestVersion() && !doc.isPrivateWorkingCopy()) {
     String msg = "The operation is not allowed on a non-current version of a document";
     throw new CmisVersioningException(buildMsgWithId(msg, doc.getId()), HTTP_STATUS_CODE_409);
   }
 }