[kepler-dev] any way to read configuration from a separate location?
Chad Berkley
berkley at nceas.ucsb.edu
Thu Jan 14 12:27:34 PST 2010
Hey Jianwu,
Here's the way ConfigurationManager works w.r.t. serialized files: the
files in the kepler/<module>/resources/configuration directory are never
written back to. If you change a property at runtime, the changed
values are written to ~/KeplerData/modules/<module>/configuration
directory. When the ConfigurationManager goes to read a property, it
looks in the ~/KeplerData location first and if there is a property
stored there, it uses that instead of what is in the default
configuration file.
So, the configuration files in the installation directory should never
be written to. If several users are sharing an installation, their
configurations can be stored in their ~/KeplerData directory without
affecting the other configurations.
Programatically, ConfigurationManager just does this behind the scenes,
so if you do ConfigurationManager.getProperty(), it should just work for
whatever user is logged in.
There a bunch of documentation here:
https://kepler-project.org/developers/teams/framework/configuration-system-documentation
Let me know if you need other info.
chad
Jianwu Wang wrote:
> Hi Chad,
>
> If Kepler is shared by many users on one machine, common users may
> not have right to change the default configurations of Kepler modules.
> If a user provides his own configuration file, it there any way in a
> class to problematically invoke ConfigurationManager class to read it?
> Currently I didn't see such API in ConfigurationManager. All the current
> getProperty functions need 'module' argument. I image a API like
> getProperty(String filePath);
>
> Thanks.
>
More information about the Kepler-dev
mailing list