@Override
public void contentChanged(@Nonnull NodeState root, @Nullable CommitInfo info) {
try {
if (previousRoot != null) {
NamePathMapper namePathMapper = new NamePathMapperImpl(
new GlobalNameMapper(new ImmutableRoot(root)));
Set<String> oakPropertyNames = Sets.newHashSet();
for (String name : propertyNames) {
oakPropertyNames.add(namePathMapper.getJcrName(name));
}
NodeState before = previousRoot;
NodeState after = root;
EventHandler handler = new FilteredHandler(
new VisibleFilter(),
new NodeEventHandler("/", info, namePathMapper, oakPropertyNames));
for (String name : PathUtils.elements(path)) {
String oakName = namePathMapper.getOakName(name);
before = before.getChildNode(oakName);
after = after.getChildNode(oakName);
handler = handler.getChildHandler(oakName, before, after);
}