Package org.nuiton.config
Class ApplicationConfigHelper
java.lang.Object
org.nuiton.config.ApplicationConfigHelper
Helper about
ApplicationConfig.- Since:
- 2.4.8
- Author:
- Tony Chemit - dev@tchemit.fr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFinalOptionKeys(Set<ApplicationConfigProvider> providers) Gets all final options keys from the given providers.static Set<ConfigOptionDef>getFinalOptions(Set<ApplicationConfigProvider> providers) Gets all final options from the given providers.static ApplicationConfigProvidergetProvider(ClassLoader classLoader, String name) static Set<ApplicationConfigProvider>getProviders(ClassLoader classLoader, Set<String> includes, Set<String> excludes, boolean verbose) Obtain all providers on class-path.getTransientOptionKeys(Set<ApplicationConfigProvider> providers) Gets all transient options keys from the given providers.static Set<ConfigOptionDef>getTransientOptions(Set<ApplicationConfigProvider> providers) Gets all transient options from the given providers.getTransientOrFinalOptionKey(Set<ApplicationConfigProvider> providers) Get all option keys that should not be saved in the user config file from the given options providers.static voidloadAllActions(ApplicationConfig applicationConfig, Set<ApplicationConfigProvider> providers) Load all actions from all given config providers.static voidloadAllDefaultOption(ApplicationConfig config, Set<ApplicationConfigProvider> providers) Load default options from all given config providers.
-
Constructor Details
-
ApplicationConfigHelper
protected ApplicationConfigHelper()
-
-
Method Details
-
getProviders
public static Set<ApplicationConfigProvider> getProviders(ClassLoader classLoader, Set<String> includes, Set<String> excludes, boolean verbose) Obtain all providers on class-path.- Parameters:
classLoader- optional classLoader used to seek for providersincludes- optional includes providers to use (if none then accept all providers)excludes- optional excludes providers (if none the no reject)verbose- verbose flag- Returns:
- sets of providers
-
getProvider
-
loadAllDefaultOption
public static void loadAllDefaultOption(ApplicationConfig config, Set<ApplicationConfigProvider> providers) Load default options from all given config providers.- Parameters:
config- config where to add default options.providers- providers to use- Since:
- 2.6.7
-
loadAllActions
public static void loadAllActions(ApplicationConfig applicationConfig, Set<ApplicationConfigProvider> providers) Load all actions from all given config providers.- Parameters:
applicationConfig- config where to add actions.providers- providers to use- Since:
- 3.0
-
getTransientOptions
Gets all transient options from the given providers.- Parameters:
providers- providers to inspect- Returns:
- the set of all options that are transient
- Since:
- 2.6.7
- See Also:
-
getFinalOptions
Gets all final options from the given providers.- Parameters:
providers- providers to inspect- Returns:
- the set of all options that are final
- Since:
- 2.6.7
- See Also:
-
getTransientOrFinalOptionKey
Get all option keys that should not be saved in the user config file from the given options providers. Such options aretransientorfinal.- Parameters:
providers- providers to inspect- Returns:
- the set of options key not to store in the config file
- Since:
- 2.6.11
- See Also:
-
getTransientOptionKeys
Gets all transient options keys from the given providers.- Parameters:
providers- providers to inspect- Returns:
- the set of all options key that are transient
- Since:
- 2.6.11
- See Also:
-
getFinalOptionKeys
Gets all final options keys from the given providers.- Parameters:
providers- providers to inspect- Returns:
- the set of all options keys that are final
- Since:
- 2.6.7
- See Also:
-