Retrieving the Change Log

CMIS 1.0 CMIS 1.1 Spec 2.1.15

OpenCMIS (Java)

// get the first 1000 change events
ChangeEvents events = session.getContentChanges(null, true, 1000);

if (events != null && events.getChangeEvents() != null) {
    for (ChangeEvent event : events.getChangeEvents()) {
        String objectId = event.getObjectId();
        if (event.getChangeType() == ChangeType.DELETED) {
            // handle delete
        } else {
            // get object and handle create, update, and security events
        }
    }
}