wildbee/wildbee — pull request #34 by mtjandra (2013-12-31 21:57:58+00:00)
Title: ProtoType for Observers

Observers should be added to the observers package and extend/implement the Observer trait.
Observable models (Ex. Packages) should extend/implement the Observable trait.
The ObserverHelper object will retrieve path to observer, and has that mapIdToName functionality for views.

See examples of where observers are added/notified in the afterUpdate and afterInsert methods of the Package model. Right now the two dummy observers Jira and Bugzilla, just print out that they were notified of an update to a package.

Let me know if I'm on the right track, what should be added/removed/modified.
Also some minor name changes in the CRUDOperation trait.

TODO: Add tests
TODO: Be able to add more than one observer ( maybe when UI allows us to do this better)
TODO: Allow observer for packages to be optional
TODO: addObserver should probably utilize that reflection part wtihin the Observer trait itself.