Emmanuel Bourg <[EMAIL PROTECTED]> writes: >Henning P. Schmiedehausen wrote:
>> An idea that popped up was the "versioning locator" mentioned in the >> reply to Oliver. >This sounds a bit unrealistic for a simple configuration file. But it >may make sense in a commons-locator project. I was thinking more of a custom locator implementation. Not something to be put into the commons realm. >> The filename might not be part of the strategy but it is vital to >> locating the ressource. :-) Does it make sense to have a strategy >> without a filename / a filename without a strategy (other than >> defaults)? If no, then we will have to pull a pair of "resource name" >> / "Locator object") around anyway. >I prefer this rather than merging too many concepts into the same >object. This is required only if you have to carry the locator >(strategy) all along, but in my opinion once the file is located (URL >found) there is no need to keep the locator. Ok. I see your point. [...] >I think the notion of "locating a resource" is really specific to the >file based configurations, that's why I'm a bit reluctant to try a >generalization of the "Locator as a generic definition" concept right now. Ok, so we should make clear, that Locator is intended as "file name -> URL" translation class. However, for me, the file name is still a parameter of the Locator, not of the configuration. If we change this, then we should short-cut PropertiesConfiguration(String fileName) and PropertiesConfiguration(File file) with public PropertiesConfiguration(String fileName) { this(FileLocator.locate(fileName)); } public PropertiesConfiguration(File file) { this(FileLocator.locate(file.getName())); } and deprecate these C'tors, shouldn't we? Regards Henning -- 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]