Norconex / collector-core

Collector-related code shared between different collector implementations
http://www.norconex.com/collectors/collector-core/
Apache License 2.0
7 stars 15 forks source link

ConfigurationLoader and CollectorConfigLoader interaction #19

Open danizen opened 6 years ago

danizen commented 6 years ago

Current Behavior

A Java-level user can write their own alternative to ConfigurationLoader and CollectorConfigLoader, and achieve the ability to inject properties from memory into the Collector, but it is a bit out of the way to do this. The best way to extend it with current structure would be to construct a Properties object dynamically, save it to disk, and then pass that temporary file to the loader.

Desired Behavior

ConfigurationLoader in commons-lang should be restructured so that an CollectorConfigLoader can either provide a commons-lang Properties object or a File when loading configuration, or a File.

Motivation

A little bit round-about to save to a file first. Refactoring would be good, but it is a minor request.