commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Gaillard <>
Subject [digester] 20903 - CallFactoryMethodRule
Date Thu, 03 Feb 2005 15:45:15 GMT
Hi Simon,

There are some cases where you know the objects being present on the
Digester's stack. In this case, you would like to be able to access 
them directly so that you can call their methods and pass them 
parameters that are present in the xml attributes.

With further refinement, you would also like to pass to them parameters
that are objects that are already present on the stack. Then once, the 
call return, you would like to push (or not) the result on the stack.

This is what the CallFactoryMethodRule does. 

It is a digester rule that enables to define the caller of the method,
the name of the method and its parameters. The the result of the call
can be pushed on the stack.

The following is an excerpt of a xml digester usage of the rule: 
  <pattern value="employee">
      paramnames="firstName,lastName" pushit="true"/> 
      <set-next-rule methodname="setModel"/>
    <pattern value="address">
      <set-next-rule methodname="addAddress"/>

There is a more detailled presentation of this in the header of class



>Hi Gilles,
>Sorry it took so long to get around to having a look at this bugzilla entry.
>A lot of work has clearly gone into the attached code. However I don't really
>understand what the purpose of it is...and send a summary of what this code
>achieves, so that we can all discuss this patch? 
>I am concerned about the significant complexity of the code (as will other
>digester maintainers), and so would like to understand what benefits users would
>gain by having this CallFactoryMethodRule available....
>Thanks for your offer of this code, and hope to see your email soon.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message