Gary,

that's right, the basic idea is to configure several VariableResolvers for different purposes. This is pretty much the same as the interpolation engine of [digester] works. Resolvers for system properties and map based resolvers are very obvious and simple implementations. But a VariableResolver could be arbitrary complex, e.g. a JEXLResolver for expressions (maybe not directly suited for [lang]).

Interolation is an important feature of [configuration], but I am reluctant to implementing a complete interpolation engine in this project and expose it in the public API. So I would love to see something like that in [lang].

Oliver

Gary Gregory wrote:

Hello Oliver:

I took a quick look at the ticket you linked to below. For this to work
for System properties, a simple VariableResolver would do the trick I
think. Maybe a generic MapVariableResolver could also be provided and
maybe a factory methods in order to say simple things like:

Interpolator.newInterpolator(System.getProperties()).resolve("The file
is here ${java.io.tmpdir}");

Would [configuration] be interested in have this in the next version of
[lang]? Assuming that whatever loose requirements created by the current
lang tests are satisfied.
Gary

-----Original Message-----
From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Saturday, June 25, 2005 7:46 AM
To: Jakarta Commons Developers List
Subject: Re: [lang] text.Interpolation, on to 2.2

I am interested in this topic, too, because I want to implement enhanced

interpolation suport for [configuration].

I already had a look at the available Interpolation class, but it lacks some features I need. So I wrote something myself which is similar to the interpolation engine of digester, but is based on the interpolation method that existed in configuration. The code and a unit test can be found at the following bugzilla ticket:

http://issues.apache.org/bugzilla/show_bug.cgi?id=35116

Oliver

Simon Kitching wrote:

I'm willing to do some work on this. I'll need to see what's in lang at
the moment though...at least some of the code came originally from
Digester so I feel responsible for knocking it into shape for lang!

Cheers,

Simon

On Fri, 2005-06-24 at 06:34 -0400, Steven Caswell wrote:


Though I don't really have bandwidth to help with it, I am +1 on
moving forward with Interpolation being a motivation for the next
release.

On 6/23/05, Gary Gregory <[EMAIL PROTECTED]> wrote:
Hello:

Is anyone planning on working on text.Interpolation in the near
future?
It seems like a logical candidate and a motivation for the next
release.
Where does the class come from and does it make sense to simply
extract
some code out of Ant.

I could see a subclass dealing specifically with this. Something
like:
Interpolation si = new SystemPropertyInterpolation();
// replace all system property in ${} with real values.
string = si.interpolateAll(string);

The class name does seem a little pedantic to me, but eh, I can't
come
up with something more succinct right now ;-)

Thoughts?

Thanks,

Gary



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to