commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <jvan...@zenplex.com>
Subject Re: Betwixt & MethodUpdaters
Date Wed, 05 Jun 2002 10:37:40 GMT
On Wed, 2002-06-05 at 06:33, James Strachan wrote:
> Hi Jason
> 
> From: "Jason van Zyl" <jvanzyl@zenplex.com>
> > Hi James,
> >
> > Is is possible to control at which point updaters are called with newly
> > created objects?
> >
> > In Maven the project object has a method:
> >
> > void addDistribution(Distribution distribution)
> > {
> >     distributions.add(distribution);
> > }
> >
> > But I would additionally like to place the distributions in a Map so
> > that I can subsequently look them up but it appears that the
> > distribution object added is not yet complete.
> >
> > This isn't a huge deal because I can lazily initialize the distribution
> > Map I need but I was just wondering if the addXXX() method can be
> > delayed until the object has been fully populated.
> 
> Sorry this took a while to get to but I've modified betwixt (the
> BeanCreateRule) to do exactly this. So the addDistribution() method will
> only be called when the Distribution object is fully configured. This makes
> lots of sense and allows setter or adder methods to use the properties of
> the child bean to make indices or other custom processsing etc.

Cool, thanks! 
 
> To test this works I added a JUnit assertion to the ScarabSettings class
> when adding new GlobalAttribute objects that they must have a 'name'
> property set before the addGlobalAttribute() method is called.

It now looks like the bugs have been squashed so how about we propose to
move Betwixt up to the commons proper and do a release?

> James
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message