Class LevelLoader.ChainingLoader
java.lang.Object
com.atlassian.oai.validator.report.LevelLoader.ChainingLoader
- All Implemented Interfaces:
LevelLoader
- Enclosing interface:
- LevelLoader
A loader that chains multiple loaders together. Can be used to develop loading strategies to
load levels from multiple locations.
Loaders will be used in the order they are provided in. The result is that keys loaded from later loaders will replace those loaded from earlier loaders.
Note that this mechanism only loads and overwrites individual keys. It will not apply any hierarchical rules to the loaded keys.
For example:
l1 {
a.b.c = ERROR
a.b = IGNORE
}
l2 {
a.b = WARN
}
chain(l1, l2) {
a.b.c = ERROR
a.b = WARN
}
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.oai.validator.report.LevelLoader
LevelLoader.ChainingLoader, LevelLoader.PropertiesLoader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLoad the default level from this loader (if it has been defined).Load message levels from this loader.
-
Constructor Details
-
ChainingLoader
-
-
Method Details
-
loadLevels
Description copied from interface:LevelLoaderLoad message levels from this loader.- Specified by:
loadLevelsin interfaceLevelLoader- Returns:
- The map of key -> level that should be used to control message levels.
-
defaultLevel
Description copied from interface:LevelLoaderLoad the default level from this loader (if it has been defined).- Specified by:
defaultLevelin interfaceLevelLoader- Returns:
- the default level found in this loader, or empty() if none has been defined.
-