You can find attached a contribution to the Digester project. The CallFactoryMethodRule allows to: + make method call on object present in the digester stack + specify method name, parameter names and types to be used to make these calls + do some manipulation on the digester stack from the rule
Method parameters are retrieved from the attributes and their name, either from the body of the element. Whenever possible conversion is made in order to convert the string value of the attribute to the actual type of the parameters. To do that the beanUtil framework is used (Converters). BeanUtil is also used to resolve method name into method calls. All configuration parameters can be specified from the xml configuration file. This file also allow to add 'import' statement that can specify the converter to use for attributes or body conversion. Complete comments and doc can be found in the header comment of CallFactoryMethodRule class. (see also the ModelLoader class comments) The test cases are in directory 'test'. They can be also used as samples as they show how to use the rule. All test cases have been grouped in one test suite whose class name is OfficeTestSuite. (Note that Employee and Address classes are unchanged from the digester-1.5 distrib). Let me know if you have any question or problem with this. Cheers, -- ------------------------------------------------------------ Gilles Gaillard STRATOS DOCUMENTATION [EMAIL PROTECTED] ------------------------------------------------------------
digester_cfmr-1_5-src.zip
Description: Zip compressed data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]