private void checkDocumentTypeForContent(TypeDefinitionWrapper type) { if (type == null) { throw new CmisObjectNotFoundException("No corresponding type found! Not a CMIS object?"); } if (!(type instanceof DocumentTypeDefinitionWrapper)) { throw new CmisStreamNotSupportedException("Object is not a document!"); } if (((DocumentTypeDefinition) type.getTypeDefinition(false)).getContentStreamAllowed() == ContentStreamAllowed.NOTALLOWED) { throw new CmisConstraintException("Document cannot have content!"); } }
private void checkDocumentTypeForContent(TypeDefinitionWrapper type) { if (type == null) { throw new CmisObjectNotFoundException("No corresponding type found! Not a CMIS object?"); } if (!(type instanceof DocumentTypeDefinitionWrapper)) { throw new CmisStreamNotSupportedException("Object is not a document!"); } if (((DocumentTypeDefinition) type.getTypeDefinition(false)).getContentStreamAllowed() == ContentStreamAllowed.NOTALLOWED) { throw new CmisConstraintException("Document cannot have content!"); } }
return new CmisStorageException(msg, code, errorContent, additionalData); case STREAM_NOT_SUPPORTED: return new CmisStreamNotSupportedException(msg, code, errorContent, additionalData); case UPDATE_CONFLICT: return new CmisUpdateConflictException(msg, code, errorContent, additionalData);
return new CmisStorageException(message, errorContent, additionalData, t); } else if (CmisStreamNotSupportedException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisStreamNotSupportedException(message, errorContent, additionalData, t); } else if (CmisUpdateConflictException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisUpdateConflictException(message, errorContent, additionalData, t);
return new CmisStorageException(message, errorContent, additionalData, t); } else if (CmisStreamNotSupportedException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisStreamNotSupportedException(message, errorContent, additionalData, t); } else if (CmisUpdateConflictException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisUpdateConflictException(message, errorContent, additionalData, t);
case 403: if (CmisStreamNotSupportedException.EXCEPTION_NAME.equals(exception)) { return new CmisStreamNotSupportedException(message, errorContent, t);
case 403: if (CmisStreamNotSupportedException.EXCEPTION_NAME.equals(exception)) { return new CmisStreamNotSupportedException(message, errorContent, additionalData, t);
throw new CmisStreamNotSupportedException("Not a file!"); } else { CmsFile file = cms.readFile(resource);
throw new CmisStreamNotSupportedException("Content can only be set on private working copies or current versions."); throw new CmisStreamNotSupportedException("Document type doesn't allow content!");
throw new CmisStreamNotSupportedException("Content can only be set on private working copies or current versions."); throw new CmisStreamNotSupportedException("Document type doesn't allow content!");
throw new CmisStreamNotSupportedException("Folders may not have content streams.");
throw new CmisStreamNotSupportedException("Document type doesn't allow content!");
throw new CmisStreamNotSupportedException("Content can only be deleted from ondocuments!");
throw new CmisStreamNotSupportedException("Document type doesn't allow content!");
throw new CmisStreamNotSupportedException("Content can only be deleted from ondocuments!");