public class ResolverImpl extends JsonSettingsMapImpl implements IResolver
IResolver.
The resolve.hjson file used to initialize this class is serialized to an instance of this class, which is an ISettingsMap. In other words,
thiswill return an implementation of an ISettingsMap
Whether the resolver will enrich a configuration file or not is decided by the selection key of your resolve.hjson. i.e. enrichment is applied only and only if all
key declared within the resolve.hjson key returned a matched regex to your configuration header file (tenant, channel, name, etc...)
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>originatorName| Constructor and Description |
|---|
ResolverImpl(File resolvFilePath)
Constructor.
|
ResolverImpl(ISettingsMap settings)
Create a resolver from a settings map.
|
| Modifier and Type | Method and Description |
|---|---|
ISettingsMap |
resolve(File file,
String runtime)
Resolve the provided file.
|
ISettingsMap |
resolve(ISettingsMap input,
ISettingsMap fileMetaInfo,
String fileName)
Resolve the provided input without matching any rule to only resolve
tags and environment variables.
|
ISettingsMap |
resolve(ISettingsMap input,
String runtime,
String fileName)
Resolve the provided settings map.
|
newSettingsListChild, newSettingsMapChild, put, putAll, putWithNoCloning, setOriginatorNameasFlatValuesMap, asFlatValuesMap, asFlatValuesMapIgnoreSettingsList, asHjsonString, asJsonString, asJsonString, asKvString, asListFlatValuesMapIgnoreSettingsList, asYamlString, childAsJson, childAsRawContent, childAsTarGz, childFileAsMap, childIsDir, childIsFile, getAsBoolean, getAsBoolean, getAsDouble, getAsInteger, getAsInteger, getAsIsoDateTime, getAsLong, getAsLong, getAsMsDuration, getAsRequiredBoolean, getAsRequiredDouble, getAsRequiredInteger, getAsRequiredIsoDateTime, getAsRequiredLong, getAsRequiredObject, getAsRequiredObjectOfClass, getAsRequiredSettingsList, getAsRequiredSettingsMap, getAsRequiredString, getAsRequiredTimeValue, getAsRequiredZonedDateTime, getAsSettingsList, getAsSettingsList, getAsSettingsListOrEmpty, getAsSettingsMap, getAsSettingsMap, getAsString, getAsString, getAsTimeValue, getChildName, getCreateMap, getDeepCopy, getMapOrEmpty, getNestedProperty, getNewInstance, getOrCreateNestedSettingsMap, getOriginatorName, getRequiredNestedProperty, getStringOrFail, getStringOrFail, getTimeValueMs, newSettingsMapChild, overrideWith, putUsingDottedPath, putUsingSlashPath, removeUsingDottedPath, removeUsingSlashPath, setJsonDecoding, setNestedProperty, setPropertyIfMissingclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitchildAsListOfString, childAsMapEntries, childAsMapValues, childAsRequiredListOfString, childAsRequiredString, childAsString, childAsStringContent, getCreateAsListOfMapclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic ResolverImpl(ISettingsMap settings)
settings - your settingspublic ResolverImpl(File resolvFilePath)
resolvFilePath - the path to the target configuration directorypublic ISettingsMap resolve(File file, String runtime) throws IOException, ConfigurationException
IResolverresolve in interface IResolverfile - your input fileruntime - runtimeIOException - if it cannot be readInvalidResolverKeyConfigurationExceptionConfigurationExceptionpublic ISettingsMap resolve(ISettingsMap input, String runtime, String fileName) throws ConfigurationException
IResolverresolve in interface IResolverinput - the input settings.runtime - runtime.fileName - the configuration file name to be enrichedConfigurationExceptionpublic ISettingsMap resolve(ISettingsMap input, ISettingsMap fileMetaInfo, String fileName) throws ConfigurationException
IResolverresolve in interface IResolverfileMetaInfo - meta info about file (tenant, channel, runtime)fileName - the configuration file name to be enrichedConfigurationExceptionCopyright © 2014–2022. All rights reserved.