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, setOriginatorName
asFlatValuesMap, 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, setPropertyIfMissing
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
childAsListOfString, childAsMapEntries, childAsMapValues, childAsRequiredListOfString, childAsRequiredString, childAsString, childAsStringContent, getCreateAsListOfMap
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public 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
IResolver
resolve
in interface IResolver
file
- your input fileruntime
- runtimeIOException
- if it cannot be readInvalidResolverKeyConfigurationException
ConfigurationException
public ISettingsMap resolve(ISettingsMap input, String runtime, String fileName) throws ConfigurationException
IResolver
resolve
in interface IResolver
input
- the input settings.runtime
- runtime.fileName
- the configuration file name to be enrichedConfigurationException
public ISettingsMap resolve(ISettingsMap input, ISettingsMap fileMetaInfo, String fileName) throws ConfigurationException
IResolver
resolve
in interface IResolver
fileMetaInfo
- meta info about file (tenant, channel, runtime)fileName
- the configuration file name to be enrichedConfigurationException
Copyright © 2014–2023. All rights reserved.