public void updateDocument( DocumentChanges documentChanges ) {
String id = documentChanges.getDocumentId();
if (!documentsById.containsKey(id)) {
return;
}
Document existingDocument = documentsById.get(id);
DocumentReader existingDocumentReader = readDocument(existingDocument);
DocumentWriter updatedDocumentWriter = newDocument(id);
updateProperties(existingDocumentReader, updatedDocumentWriter, documentChanges);
updateMixins(existingDocumentReader, updatedDocumentWriter, documentChanges);