Oliver Heger <[EMAIL PROTECTED]> writes:
>Just a quick shot, this needs to be further elaborated.
>Would it make sense to use Locators also for saving configurations? For
>this purpose a locate() method would be needed that returns an OutputStream.
maybe locateLoad() and locateSave() and simple implementations can just do
public URL locateLoad(...xxx...) { return locate(...xxx...) };
public URL locateSave(...xxx...) { return locate(...xxx...) };
private URL locate(...xxx...) { ... }
(which would e.g. allow to write a versioning locator. Every write creates a
new revision entry in
something like subversion...)
Regards
Henning
>Oliver
>Emmanuel Bourg wrote:
>> Henning P. Schmiedehausen wrote:
>>
>>> I don't think, this is overengineered. Are you sure about URL locate?
>>> I'd probably go for InputStream locate().
>>
>>
>> Is that for classloaders that do no support getRessource ? We really
>> need to know where the file is located in order to reload it efficiently.
>>
>>> Hm. I probably would like this solution better than the current (which
>>> reminds me of the way that commons-logging tries to find its log
>>> APIs). We could use current as the default and make the others
>>> pluggable. (and add a few C'tors which accept a Locator object)
>>
>>
>> We could either keep the current constructors and use the Locator
>> directly :
>>
>> new PropertiesConfiguration(locator.locate("config.properties));
>>
>> or add one constructor :
>>
>> new PropertiesConfiguration("config.properties", locator);
>>
>> in this case we'll also need another load method :
>>
>> config.load("config.properties", locator);
>>
>>
>> I think I prefer starting with the first solution.
>>
>> Emmanuel Bourg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>--
>Dipl.-Inform. Oliver Heger
>Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
>Klinikum der Philipps-Universit�t Marburg
>Baldingerstra�e,
>D-35037 Marburg
>Tel: +49 6421 28-66923
>mailto:[EMAIL PROTECTED]
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
[EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
What is more important to you...
[ ] Product Security
or [ ] Quality of Sales and Marketing Support
-- actual question from a Microsoft customer survey
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]