commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12756] New: - [Patch] CallMethodRule/CallParamRule
Date Wed, 18 Sep 2002 01:20:46 GMT
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=12756>.
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=12756

[Patch] CallMethodRule/CallParamRule 

           Summary: [Patch] CallMethodRule/CallParamRule
           Product: Commons
           Version: 1.3 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Digester
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: john@scioworks.com


I have a use case which can't be done with the Digester's standard rules. (I
hope I haven't overlooked Digester's API.) After some experiment, I realized
with some enhancement I could make CallMethodRule/CallParamRule work. I think
the use case is pretty common and generic.

The use case is like this: I need to call a 3rd party API

  Parent.add(Child child, Condition condition)

with the XML data:


  <parent>
    <child .../>
    <condition .../>
  </parent>


I can't use SetNextRule as it takes only one object from the stack.
CallMethodRule/CallParamRule comes close, but it allows only parameters coming
from body texts or attributes, not generic objects from the stack.

So, I made the following changes to CallMethodRule/CallParamRule:

   * Changed the param stack frame datatype from String[] to Object[]
   * Overloaded CallParamRule to allow configuration to get the parameter from
the stack
   * Made CallParamRule stateless so that it works probably in nesting

--
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