Netflix/archaius — pull request #55 by allenxwang (2012-12-18 23:30:40+00:00)
Title: Add the functionality of dynamic properties change validation

Dynamic properties should be able to validate property change and reject invalid changes. The rejection will cause the underlying configuration to also reject property change. This can be done by overriding PropertyWrapper.validate() or add validator callback when dynamic properties are created, for example:

DynamicStringProperty prop = new DynamicStringProperty("abc", "default") {
public boolean validate(String newValue) {
// carry out validation logic
}
};

The implementation of validation is done through the configuration's "beforeUpdate" notification. If false is returned from validation, ConcurrentMapConfiguration.setProperty or addProperty will stop continuing setting the property.