Hi,

--- Chris Kimpton <[EMAIL PROTECTED]> wrote:
> --- Eric Dobbs <[EMAIL PROTECTED]> wrote:
> > On Tuesday, April 2, 2002, at 08:16  AM, Chris Kimpton wrote:
> > 
> > >> I would prefer to do
> > >> this with an explicit configuration entry in
> > >> TurbineResources.properties like this:
> > >>
> > >> component.fulcrum.property.webappRoot=${webappRoot}
> > >> component.fulcrum.property.applicationRoot=${applicationRoot}
> > >>
> > >
> 
> Attached is the patch for this.
> 
> Note it is fairly similar to the previous patch - as I use
> Configuration.subset to extract the component properties and then
> use
> these as a "defaults" configuration for each component.
> 
> I've changed the signature of the public loadComponent method - not
> sure how safe that is - do we want to provide backwards
> compatibility
> on that method, its safe to pass in a null additional properties
> configuration.
> 
> I added the Object based setters/getters (eg getBoolean(String
> key,Boolean defaultValue) ) to the Configuration interface - as
> this
> allows us to set the defaults object from a Configuration object
> without casting it to a BaseConfiguration.
> 
> The BaseConfiguration now uses the defaults Configuration in the
> interpolate method - the main point of this patch.
> 
> I have changed the getStringArray method to also call interpolate
> on
> returned values.  This is because the code for accessing log4j
> properties call getStringArray (cos log4j uses commas in
> properties)
> - but also could contain ${key} stuff - ie webappRoot.
> 
> I have also changed the subset method to interpolate its values
> too. 
> This is because when you use subset to get the properties for a
> service, some of those may contain ${key} stuff - which should be
> expanded, if possible.
> 
> Lastly and most controversially I changed interpolate to leave
> unchanged any unmatched ${key} stuff.  That is, the old behaviour
> for
> a property ${foo}/blah would be to interpolate it into /blah if
> there
> was no previous property with a key of "foo".  It now leaves it as
> ${foo}/blah.    We need this because when the logging service (a
> primary service) gets its properties using getResources,
> ${webappRoot} is not defined at that point.  The old behaviour
> would
> lose this information.  We can then add the webappRoot property
> manually and let the interpolation work.
> 


Attached is a revised patch with fixed/new tests to cover the
changes.  I have also added a test-report task to build-test.xml - is
this file deprecated and replaced by something in maven?  

I presume stratum discussions stay on this list - the xmlrpc build
problem was in the stratum project...

Chris


=====
------------------------------------------
http://www.soccer2002.org.uk

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

Attachment: passthru3.diffu
Description: passthru3.diffu

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

Reply via email to