Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different sources for configuration (file formats) #14

Open
lviggiano opened this issue Feb 9, 2013 · 1 comment
Open

Different sources for configuration (file formats) #14

lviggiano opened this issue Feb 9, 2013 · 1 comment

Comments

@lviggiano
Copy link
Collaborator

At the moment, the only supported format for configuration files handled by owner api is java Properties. It would be nice to have a plugin based architecture that adds support for different file formats.

Apache commons configuration provides support for several file formats.

While Java properties can be provided out of the box, without dependencies, it would be good to implements "plugins" depending on commons configuration to add the supported file formats transparently, keeping all other features unvaried.

In my opinion it is important to not add transitive dependencies in the current apache module; so I would implement the additional file formats inside different maven module(s).

@lviggiano
Copy link
Collaborator Author

File formats that would be...

Easy to support:

  • Java Properties Files
  • A generic java.util.Map<?,?> object.
  • Any java.util.Properties object (which extends from Map<?,?>)
  • System Properties (System.getProperties() extends from Map<?,?>)
  • Environment Variables (System.getenv() extends from Map<?,?>)
  • XML Document
  • Windows INI files1 as used in many Windows apps and GIT as well
  • Property list files (plist)1
  • Command line.

Not so easy to support:

  • Applet parameters2
  • Servlet parameters2
  • JNDI2
  • JDBC Datasource2

Hard to support:

  • YAML as it is a complex file format and also not fully mappable to a Java Properties Object, and for the moment this is kept out from the next releases scope, as full YAML support will need internal data structure redesign.
Notes:
  1. Parser can be inspired on Apache commons configuration.
  2. This is not actually a file format, but it is more a matter to support those objects (and j2ee objects) to allow and ease support for those kind of configuration parameters. The parser can be inspired on Apache commons configuration. This may require a new maven module, that depends on J2EE libs.

The rest of the options supported by Apache commons configuration is already supported by OWNER.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant