[Figleaf-developer] Todays work
Status: Alpha
Brought to you by:
steckman
|
From: <sam...@ma...> - 2004-07-13 17:37:48
|
OK, I've created a Mutable interface which describes the following methods: void commit(ChangeSet set) throws ValidationException; boolean isValidChange(ChangeSet set, ValidationCallback callback); I've created a default implementation of this called MutableImpl, which can be used as a helper class by developers. MutableImpl defines: void addChangeHandler(String property, ChangeHandler handler) void addValidationRule(String propertyName, ValidationRule validationRule) ChangeHandler is simple, it just defines: void change(Object newValue); It assumes the value has been validated beforehand. When I've finished the tests for MutableImpl (there are a few cases to finish off, mostly to do with validation) I'll write some examples of use by way of integration tests. I've also added some more validation code and restructured some of the common elements into an abstract class - there will be some more cleanup work here in the future, but at present the rules all work. sam http://www.magpiebrain.com/ |