commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "richard head" <dut...@hotmail.com>
Subject Re: Chain of Responsibility Catalog, Adding Command Element Attributes
Date Tue, 17 Jul 2007 16:19:41 GMT

>>What I would like to do is use a catalog.xml file to store the chain, and
>>add the appropriate attributes to the given command element.
>>
>>i.e. <command name="EmailUser" className="com.bs.email.Emailer"
>>smtpServer="xyz.abc.com" .../>
>>
>>
>>In order to achieve such functionality, what would I have to do, set the
>>appropriate rules in the ConfigParser's Digester?
>>
>>i.e.
>>config.getDigester().addSetProperties("/catalog/chain/command","smtpServer","smtpServer")
>
>You don't have to change the configured digester rules at all -  just
>add getters/setters as appropriate - so in your case adding
>setSmtpServer() and getSmtpServer() methods to your Emailer command
>and when the xml is parsed they will get called with the values you've
>specified in your xml.

Ok, cool. Though is it possible for these attributes to be classes?

Thanks

_________________________________________________________________
Need a brain boost? Recharge with a stimulating game. Play now!  
http://club.live.com/home.aspx?icid=club_hotmailtextlink1


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message