ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: PropertyHelper thoughts
Date Fri, 15 Jun 2007 09:35:41 GMT
On 6/14/07, Dominique Devienne <ddevienne@gmail.com> wrote:
> On 6/14/07, Peter Reilly <peter.kitt.reilly@gmail.com> wrote:
> > interface SetPropertyResolver {
> >     boolean setProperty(Project a, String property, String value)
> >     returns true if property consumed
> >     return false if not
> > }
>
> I don't understand the SetPropertyResolver aspect. I like the GetPR,
> although I'd call it PropertyEvaluator maybe, or PropertyExpander,
I think that Stefan should decide the name ;-)
> but
> I don't get the Set part. How would that be used? The GetPR comes into
> play in a ${scheme:...} expansion, but how would the SetPR work? --DD
>
There could be a number of uses for example:
<mm:bean id="abc" class="org.example.MyBean">
   <attributes version="a" color="blue" count="10"/>
</mm:bean>

<addpropertyresolver classname="org.example.BeanPropertyResolver"
                               prefix="bean" (?) />

<property name="bean:abc.count" value="20"/>

<ac:if>
   <equals arg1="bean:abc.count" arg2="20"/>
   <then>
     <echo>Set the bean value property successfully!</echo>
   </then>
</ac:if>

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

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


Mime
View raw message