----- Original Message ----- From: "Joe Germuska" <[EMAIL PROTECTED]> Sent: Wednesday, March 16, 2005 3:58 PM
> At 3:41 PM +0000 3/16/05, Niall Pemberton wrote: > >OK, "POJO Actions" is a bad example. > > perhaps, but I think having that in the subject line helped stir up > all this discussion ;-) </grin> > I think that o.a.s.chain.commands.ActionCommand (committed last > night) is an example of this. We could even remove "extends Command" > if we wanted to free things which aren't chain Commands from > implementing a method which always casts the Context and passes to > execute(ActionContext). I almost did it that way. > > While we could make something called Actionable and removed from the > chain sub-area, ActionContext still extends > o.a.commons.chain.Context, so it begins to be disingenuous to keep > that distance. Still, decoupling the interface from chain.Command > may have been the better way to do it. I don't have any issue with actually providing implementations like this, although that wasn't my line of thinking. I was thinking more of changing method signatures in things like ActionContext to use Objects rather than the concrete class. So for example in ActionContext...replacing void setAction(Action action); Action getAction() void setActionForm(ActionForm form); ActionForm getActionForm(); with something like... void setExecutable(Object executable); Object getExecutable() void setFormBean(Object form); Object getFormBean(); ...and, for example, in the Commands like AbstractCreateAction, changing.... protected abstract Action getAction( ActionContext context, String type, ActionConfig actionConfig) throws Exception; to something like.... protected abstract Object getExecutable( ActionContext context, String type, ActionConfig actionConfig) throws Exception; Niall --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]