Improve convenience methods for directly loading configurations from resources.

Description

Currently we can create a ResourcesConfigurationManager for the resources of a particular class, say FooBar, using the method forClass(@Nonnull final Class<?> contextClass). However one will still need to call ResourcesConfigurationManager.loadConfiguration() on the resulting manager, or install the manager into a ManageConfiguration.

We need a simpler way to load a configuration immediately for a class.

  • Change ResourcesConfigurationManager.forClass(@Nonnull final Class<?> contextClass) so that it searches for a resource using the base form FooBar-config.

  • Add a ResourcesConfigurationManager.forPackage(@Nonnull final Class<?> contextClass method that behaves as the original class-based method did, i.e. using a base name of "config".

  • Add static utility load methods that create a configuration manager and immediately load the resulting configuration.

Environment

None

Assignee

Garret Wilson

Reporter

Garret Wilson

Labels

None

Fix versions

Priority

Major
Configure