throw new CmisVersioningException("Check out failed: " + cmisAffecting.getMessage(), e);
throw new CmisVersioningException("Check out failed: " + cmisAffecting.getMessage(), e);
return new CmisUpdateConflictException(msg, code, errorContent, additionalData); case VERSIONING: return new CmisVersioningException(msg, code, errorContent, additionalData); default:
return new CmisUpdateConflictException(message, errorContent, additionalData, t); } else if (CmisVersioningException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisVersioningException(message, errorContent, additionalData, t); } else if (code == 503) { return new CmisServiceUnavailableException(message, errorContent, additionalData, t);
return new CmisUpdateConflictException(message, errorContent, additionalData, t); } else if (CmisVersioningException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisVersioningException(message, errorContent, additionalData, t); } else if (code == 503) { return new CmisServiceUnavailableException(message, errorContent, additionalData, t);
return new CmisContentAlreadyExistsException(message, errorContent, t); } else if (CmisVersioningException.EXCEPTION_NAME.equals(exception)) { return new CmisVersioningException(message, errorContent, t); } else if (CmisUpdateConflictException.EXCEPTION_NAME.equals(exception)) { return new CmisUpdateConflictException(message, errorContent, t);
return new CmisContentAlreadyExistsException(message, errorContent, additionalData, t); } else if (CmisVersioningException.EXCEPTION_NAME.equals(exception)) { return new CmisVersioningException(message, errorContent, additionalData, t); } else if (CmisUpdateConflictException.EXCEPTION_NAME.equals(exception)) { return new CmisUpdateConflictException(message, errorContent, additionalData, t);
@Override public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) { checkRepositoryId(repositoryId); CMISNodeInfo info = getOrCreateNodeInfo(objectId, "Object"); // only accept a PWC if (!info.isVariant(CMISObjectVariant.PWC)) { NodeRef nodeRef = info.getNodeRef(); NodeRef workingCopyNodeRef = connector.getCheckOutCheckInService().getWorkingCopy(nodeRef); info = getOrCreateNodeInfo(workingCopyNodeRef.getId()); if (!info.isVariant(CMISObjectVariant.PWC)) { throw new CmisVersioningException("Object is not a PWC!"); } } // get object final NodeRef nodeRef = info.getNodeRef(); // cancel check out connector.getCheckOutCheckInService().cancelCheckout(nodeRef); }
@Override public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) { checkRepositoryId(repositoryId); CMISNodeInfo info = getOrCreateNodeInfo(objectId, "Object"); // only accept a PWC if (!info.isVariant(CMISObjectVariant.PWC)) { NodeRef nodeRef = info.getNodeRef(); NodeRef workingCopyNodeRef = connector.getCheckOutCheckInService().getWorkingCopy(nodeRef); info = getOrCreateNodeInfo(workingCopyNodeRef.getId()); if (!info.isVariant(CMISObjectVariant.PWC)) { throw new CmisVersioningException("Object is not a PWC!"); } } // get object final NodeRef nodeRef = info.getNodeRef(); // cancel check out connector.getCheckOutCheckInService().cancelCheckout(nodeRef); }
throw new CmisVersioningException("Object is not a PWC!");
throw new CmisVersioningException("Object is not a PWC!");