final ModifiableValueMap mvm = resource.adaptTo(ModifiableValueMap.class);
if (StringUtils.isNotBlank(mvm.get(ReplicationStatus.NODE_PROPERTY_LAST_REPLICATED_BY,
String.class))) {
mvm.put(ReplicationStatus.NODE_PROPERTY_LAST_REPLICATED_BY, replicatedBy);
resourceResolver.commit();
log.trace("Set replicateBy to [ {} ] on resource [ {} ]", replicatedBy, resource.getPath());
} else {
log.trace("Skipping; Resource does not have replicateBy property set [ {} ]",
resource.getPath());
}