if (connector != null) {
checkConnectorIsWritable(connector);
EditableDocument editableDocument = replaceNodeKeysWithDocumentIds(document);
String documentId = documentIdFromNodeKey(key);
MutableCachedNode.NodeChanges nodeChanges = sessionNode.getNodeChanges();
DocumentChanges documentChanges = createDocumentChanges(nodeChanges,
connector.getSourceName(),
editableDocument,
documentId);
connector.updateDocument(documentChanges);
}