[
https://issues.apache.org/jira/browse/DIGESTER-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Yandell reopened DIGESTER-91:
-----------------------------------
> [Patch] CallMethodRule/CallParamRule
> ------------------------------------
>
> Key: DIGESTER-91
> URL: https://issues.apache.org/jira/browse/DIGESTER-91
> Project: Commons Digester
> Issue Type: Improvement
> Affects Versions: 1.3
> Environment: Operating System: All
> Platform: All
> Reporter: John Yu
> Priority: Minor
> Fix For: 1.4
>
> Attachments: CallMethodRule_diff.txt, CallMethodRuleTestCase.diff,
> CallParamRule_diff.txt, Digester_diff.txt
>
>
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]