if ((source == null) || (source.getId() == null)) {
throw new IllegalArgumentException("Source must be set!");
}
// get the type of the source document
ObjectType type = null;
if (source instanceof CmisObject) {
type = ((CmisObject) source).getType();
} else {
CmisObject sourceObj = getObject(source);
type = sourceObj.getType();
}
if (type.getBaseTypeId() != BaseTypeId.CMIS_DOCUMENT) {
throw new IllegalArgumentException("Source object must be a document!");
}
String newId = getBinding().getObjectService().createDocumentFromSource(getRepositoryId(), source.getId(),
objectFactory.convertProperties(properties, type, CREATE_UPDATABILITY),