/** * Adds an operation for adding an attribute to a target node. * * @param target the target node * @param name the name of the attribute * @param value the value of the attribute */ public void addAttributeOperation(final ImmutableNode target, final String name, final Object value) { fetchOperations(target, LEVEL_UNKNOWN).addOperation( new AddAttributeOperation(name, value)); }
/** * Adds an operation for changing the value of a target node. * * @param target the target node * @param newValue the new value for this node */ public void addChangeNodeValueOperation(final ImmutableNode target, final Object newValue) { fetchOperations(target, LEVEL_UNKNOWN).addOperation( new ChangeNodeValueOperation(newValue)); }
/** * Adds an operation for adding multiple attributes to a target node. * * @param target the target node * @param attributes the map with attributes to be set */ public void addAttributesOperation(final ImmutableNode target, final Map<String, Object> attributes) { fetchOperations(target, LEVEL_UNKNOWN).addOperation( new AddAttributesOperation(attributes)); }
/** * Adds an operation for removing an attribute from a target node. * * @param target the target node * @param name the name of the attribute */ public void addRemoveAttributeOperation(final ImmutableNode target, final String name) { fetchOperations(target, LEVEL_UNKNOWN).addOperation( new RemoveAttributeOperation(name)); }
/** * Adds an operation for changing the name of a target node. * * @param target the target node * @param newName the new name for this node */ public void addChangeNodeNameOperation(final ImmutableNode target, final String newName) { fetchOperations(target, LEVEL_UNKNOWN).addOperation( new ChangeNodeNameOperation(newName)); }