You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/06/19 09:51:13 UTC

DO NOT REPLY [Bug 20903] New: - New rule for the digester (CallFactoryMethodRule)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20903>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20903

New rule for the digester (CallFactoryMethodRule)

           Summary: New rule for the digester (CallFactoryMethodRule)
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Digester
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: gillesGaillard@compuserve.com


New rule : CallFactoryMethodRule, can be fully specified in the xml file for 
the rules definition.
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).

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