/** * This method is always called when a subnode configuration created from * this configuration has been modified. This implementation transforms the * received event into an event of type {@code EVENT_SUBNODE_CHANGED} * and notifies the registered listeners. * * @param event the event describing the change * @since 1.5 */ protected void subnodeConfigurationChanged(ConfigurationEvent event) { fireEvent(EVENT_SUBNODE_CHANGED, null, event, event.isBeforeUpdate()); }
/** * This method is always called when a subnode configuration created from * this configuration has been modified. This implementation transforms the * received event into an event of type {@code EVENT_SUBNODE_CHANGED} * and notifies the registered listeners. * * @param event the event describing the change * @since 1.5 */ protected void subnodeConfigurationChanged(ConfigurationEvent event) { fireEvent(EVENT_SUBNODE_CHANGED, null, event, event.isBeforeUpdate()); }
/** * Removes the property with the given key. Properties with names that start * with the given key (i.e. properties below the specified key in the * hierarchy) won't be affected. * * @param key the key of the property to be removed */ @Override public void clearProperty(String key) { fireEvent(EVENT_CLEAR_PROPERTY, key, null, true); List<ConfigurationNode> nodes = fetchNodeList(key); for (ConfigurationNode node : nodes) { clearNode(node); } fireEvent(EVENT_CLEAR_PROPERTY, key, null, false); }
/** * Removes the property with the given key. Properties with names that start * with the given key (i.e. properties below the specified key in the * hierarchy) won't be affected. * * @param key the key of the property to be removed */ @Override public void clearProperty(String key) { fireEvent(EVENT_CLEAR_PROPERTY, key, null, true); List<ConfigurationNode> nodes = fetchNodeList(key); for (ConfigurationNode node : nodes) { clearNode(node); } fireEvent(EVENT_CLEAR_PROPERTY, key, null, false); }
/** * Removes all values of the property with the given name and of keys that * start with this name. So if there is a property with the key * "foo" and a property with the key "foo.bar", a call * of {@code clearTree("foo")} would remove both properties. * * @param key the key of the property to be removed */ public void clearTree(String key) { fireEvent(EVENT_CLEAR_TREE, key, null, true); List<ConfigurationNode> nodes = fetchNodeList(key); for (ConfigurationNode node : nodes) { removeNode(node); } fireEvent(EVENT_CLEAR_TREE, key, nodes, false); }
/** * Removes all values of the property with the given name and of keys that * start with this name. So if there is a property with the key * "foo" and a property with the key "foo.bar", a call * of {@code clearTree("foo")} would remove both properties. * * @param key the key of the property to be removed */ public void clearTree(String key) { fireEvent(EVENT_CLEAR_TREE, key, null, true); List<ConfigurationNode> nodes = fetchNodeList(key); for (ConfigurationNode node : nodes) { removeNode(node); } fireEvent(EVENT_CLEAR_TREE, key, nodes, false); }
/** * Clears this configuration. This is a more efficient implementation than * the one inherited from the base class. It directly removes all data from * the root node. */ @Override public void clear() { fireEvent(EVENT_CLEAR, null, null, true); getRootNode().removeAttributes(); getRootNode().removeChildren(); getRootNode().setValue(null); fireEvent(EVENT_CLEAR, null, null, false); }
/** * Clears this configuration. This is a more efficient implementation than * the one inherited from the base class. It directly removes all data from * the root node. */ @Override public void clear() { fireEvent(EVENT_CLEAR, null, null, true); getRootNode().removeAttributes(); getRootNode().removeChildren(); getRootNode().setValue(null); fireEvent(EVENT_CLEAR, null, null, false); }