This will be a good alternative to native object attachment. With a listener, if an entry value changes the listener will be notified with the old value, new value, and key.
Sample listener interface
interface KonfigerEntryListener {
abstract boolean newEntryAdded(String sectionName, String key, String value);
abstract boolean entryRemoved(String sectionName, String key, String value);
abstract boolean entryChanged(String sectionName, String key, String oldValue, String newValue);
}
For each of the methods if false is returned konfiger continue calling the other listeners if more than one is present then continue to do the appropriate operation else if true konfiger ignores the operation.
E.g. if a new entry is added the method newEntryAdded if the method returns false the entry is not added to the konfiger object if it returns true the entry is added to konfiger.
This will be a good alternative to native object attachment. With a listener, if an entry value changes the listener will be notified with the old value, new value, and key.
Sample listener interface
For each of the methods if
falseis returned konfiger continue calling the other listeners if more than one is present then continue to do the appropriate operation else iftruekonfiger ignores the operation.E.g. if a new entry is added the method
newEntryAddedif the method returnsfalsethe entry is not added to the konfiger object if it returnstruethe entry is added to konfiger.