commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Moran Ben-David" <mo...@place-base.com>
Subject [configuration] Property Substitution Policy
Date Wed, 17 Aug 2005 15:01:08 GMT
Hi all,

I have a configuration which ends up having multiple valued properties as
such:

v1 = value1.1
v1 = value1.2
v2 = ${v1}

My problem is that v2 ends up being set with multi-valued v1.  

v2 = [value1.1, value1.2]

Has anybody tried to change this policy to use only the first element in the
substitution?

It seems to me that causing the PropertiesReader to toggle, based on some
sort of parameter passed into the PropertiesConfiguration.  The reader would
toggle between full substitution and first-value substitution.

A better design might be to pass in a strategy object that handles that?
I.e. allowing anyone declaring the PropertiesConfiguration to either
override the existing subbing strategy by passing in
SubstitutionStrategy/Substitutor object.

Does any one know if this ability is already in the commons configuration
code base?  Is it in the works?  I'm looking to at least benefit from design
guidance form any commons developers if I do make this change myself.

Thanks,
Moran Ben-David



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


Mime
View raw message