URL locate(); // eventuelly throws ConfigurationException?
Concrete Locators should have getter and setter methods for the properties they need, e.g. the ClasspathLocator a resource name, the URLLocator a URL etc. That way a Locator could be created by Digester and initialized with a SetPropertiesRule, which comes in handy when used with ConfigurationFactory.
Usage of a Locator would then look like: Locator locator = new MyConcreteLocator(); // init locator as necessary Configuration conf = new PropertiesConfiguration(locator);
in contrast to Locator locator = new MyConcreteLocator(); Configuration conf = new PropertiesConfiguration(); conf.setBasePath(...); conf.setFileName(...); conf.load(locator);
Oliver
Emmanuel Bourg wrote:
Here is a quick attempt at implementing the Locator strategy discussed earlier. Feel free to comment :)
Emmanuel Bourg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
