> should be done via methods in the WikiPage interface. Whether they delegate > to ContentManager is a matter of taste.
We are talking about two different issues here: making it easy for developers to do common things easily (to paraphrase your issue), and how to guarantee that node-save events are fired when pages are saved (my issue). With respect to event-firing, it cannot be a matter of taste. From a JCR node lifecycle standpoint, we need certain events to fire at particular times. In JSPWiki, this always happens from inside manager classes, and so ContentManager is clearly the right place to fire node events. How could it not be? For page saves, here are the options we have: 1. Call ContentManager.save(), which we guarantee will fire events in the right sequence and syntax 2. Call WikiPage.save(), and require implementations to call ContentManager.save(), which will do the same 3. Call WikiPage.save(), and hope that implementations to adhere to a "contact" to fire events in the right sequence and syntax In the order of preference, I prefer 1 strongly -- and for that reason have preferred to deprecate WikiPage.save(). I don't like Option 2, but it is acceptable providing we make it crystal clear in the Javadocs that implementors must call ContentManager.save() in order for dependent listener classes to function. Option 3 is a recipe for disaster. I do appreciate the desire to abstract interactions with ContentManager away from plugin developers. From the standpoint of "making it easy for developers to do common things easily," it does simplify things to have WikiPage.save(). So I take your point on this, and to that end we should remove the @deprecated annotation from WikiPage.save(). Now, on a personal note -- I've spent three weeks fixing hundreds of unit tests that were broken by your large commit of JCR code a month or so ago. I didn't mind doing it -- we knew stuff would break when it hit, it's helped me learn the JCR stuff, and frankly I feel we're all in this together. I said at the time that I'd help fix stuff to stabilize the build. And I have, putting aside other important tasks like the JSP layer migration. I do not mean to fish for compliments here. But I have nearly singlehandledly boosted the unit test pass rate from 80% to nearly 96% in just a few weeks. Instead of a "thank you," or "nice job," the only comment I get from you is one about antipatterns, which seemed brusque, even snide. That is demotivating. Andrew
