commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gorostegui Martin (SFN)" <goros...@telefonica.com.ar>
Subject how to add an object to a map by using a XML config file?
Date Fri, 04 Feb 2005 18:57:43 GMT
Hi,
 
In the application i´m working on, we are currently setting the Digester
rules from a class and adding the resulting objects to a list and,
sometimes, to a hashmap. We do this by calling an "add" method from a
CallMethod rule. 
 
Now we are trying to change the implementation and set the Digester rules
from an xml config file. Adding the object to the list is not a problem as
we can achieve this by pushing the list to the stack for making it the root
item and then use the SetRoot rule for calling the list´s add method passing
the top object as parameter. But we can´t find a way for adding and object
to a hashmap, as we need to pass the top object and the key as parameters.
The SetRoot rule can´t be used here because it doesn´t accept other
parameter than the stack´s top object. 
I´ve found ways of doing this by using a supporting class for the cases in
which I need to use the hashmap, but my idea is to use only an xml config
file per case.
 
Basically what I need is a SetRoot rule accepting parameters like the
CallMethod rule.
 
Anybody knows a solution to this problem or if what I mentioned will be
considered for future releases? 
 
Thanks in advanced,
 
Martin G

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message