@Override public void propertyAdded(PropertyState after) throws CommitFailedException { for (Editor editor : editors) { editor.propertyAdded(after); } }
@Override public void enter(NodeState before, NodeState after) throws CommitFailedException { for (Editor editor : editors) { editor.enter(before, after); } }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { for (Editor editor : editors) { editor.leave(before, after); } }
@Override public boolean childNodeDeleted(String name, NodeState before) { try { NodeState after = MISSING_NODE; Editor childEditor = editor.childNodeDeleted(name, before); if (childEditor != null) { childEditor.enter(before, after); EditorDiff diff = new EditorDiff(childEditor); if (!after.compareAgainstBaseState(before, diff)) { exception = diff.exception; return false; } childEditor.leave(before, after); } return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public boolean childNodeChanged( String name, NodeState before, NodeState after) { try { Editor childEditor = editor.childNodeChanged(name, before, after); if (childEditor != null) { childEditor.enter(before, after); EditorDiff diff = new EditorDiff(childEditor); if (!after.compareAgainstBaseState(before, diff)) { exception = diff.exception; return false; } childEditor.leave(before, after); } return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public Editor childNodeAdded(String name, NodeState after) throws CommitFailedException { List<Editor> list = Lists.newArrayListWithCapacity(editors.size()); for (Editor editor : editors) { Editor child = editor.childNodeAdded(name, after); if (child != null) { list.add(child); } } return compose(list); }
@Override @Nullable public Editor childNodeDeleted(String name, NodeState before) throws CommitFailedException { List<Editor> children = newArrayListWithCapacity(editors.size()); for (Editor editor : editors) { Editor child = editor.childNodeDeleted(name, before); if (child != null) { children.add(child); } } return compose(children); }
@Override public Editor childNodeChanged(String name, NodeState before, NodeState after) throws CommitFailedException { return createChildEditor(editor.childNodeChanged(name, before, after), name); }
@Override public void propertyChanged(PropertyState before, PropertyState after) throws CommitFailedException { for (Editor editor : editors) { editor.propertyChanged(before, after); } }
@Override public boolean propertyDeleted(PropertyState before) { try { editor.propertyDeleted(before); return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public Editor childNodeAdded(String name, NodeState after) throws CommitFailedException { List<Editor> list = Lists.newArrayListWithCapacity(editors.size()); for (Editor editor : editors) { Editor child = editor.childNodeAdded(name, after); if (child != null) { list.add(child); } } return compose(list); }
@Override public Editor childNodeDeleted(String name, NodeState before) throws CommitFailedException { List<Editor> list = Lists.newArrayListWithCapacity(editors.size()); for (Editor editor : editors) { Editor child = editor.childNodeDeleted(name, before); if (child != null) { list.add(child); } } return compose(list); }
@Override public Editor childNodeChanged( String name, NodeState before, NodeState after) throws CommitFailedException { List<Editor> list = Lists.newArrayListWithCapacity(editors.size()); for (Editor editor : editors) { Editor child = editor.childNodeChanged(name, before, after); if (child != null) { list.add(child); } } return compose(list); }
@Override public boolean propertyChanged(PropertyState before, PropertyState after) { try { editor.propertyChanged(before, after); return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public void propertyDeleted(PropertyState before) throws CommitFailedException { for (Editor editor : editors) { editor.propertyDeleted(before); } }
@Override public void propertyAdded(PropertyState after) throws CommitFailedException { for (Editor editor : editors) { editor.propertyAdded(after); } }
@Override public Editor childNodeAdded(String name, NodeState after) throws CommitFailedException { return createChildEditor(editor.childNodeAdded(name, after), name); }
@Override public Editor childNodeDeleted(String name, NodeState before) throws CommitFailedException { List<Editor> list = Lists.newArrayListWithCapacity(editors.size()); for (Editor editor : editors) { Editor child = editor.childNodeDeleted(name, before); if (child != null) { list.add(child); } } return compose(list); }
@Override public Editor childNodeChanged(String name, NodeState before, NodeState after) throws CommitFailedException { return createChildEditor(editor.childNodeChanged(name, before, after), name); }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { editor.leave(before, after); }