public class ResolverUtil extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isSelectionMatchFileMeta(ISettingsMap selectionSection,
ISettingsMap fileMetaInfo,
String filename)
Check for a given selection section from resolver, if the given file header (meta info) matches the values.
|
static boolean |
isSelectionSupported(ISettingsMap resolverSelection) |
static String |
regexWildCardFilter(String value)
generate a valid REGEX filtering to be used with String.matches
|
static Object |
resolveEnvVar(String[] pathPart)
Resolve an environment variable or a specific key in file pointed by this
variable
|
static ISettingsMap |
resolveTagsInMap(ISettingsMap inputMap)
This function resolves tags if given in map input
|
static String |
resolveTagsInString(String input)
This function resolvers tags in given string input
|
static String |
selectionValueByKeyBasedOnType(String keyType,
ISettingsMap configurationFileHeader,
String configurationFileName)
Information like host and file name of the configuration file to be enriched
are not expected to be in the header of the configuration file
|
public static String regexWildCardFilter(String value)
value
- an arbitrary text with "*" WILDCARDpublic static String selectionValueByKeyBasedOnType(String keyType, ISettingsMap configurationFileHeader, String configurationFileName)
In case of host, we try to deduce it by using java API and return UNKNNOWN if failed...
In case of file, it is an information we have upon initialization of the resolver.
Others: expected to be in configurationFileHeader
keyType
- configurationFileHeader
- configurationFileName
- public static Object resolveEnvVar(String[] pathPart) throws ConfigurationException
pathPart
- Splitted path of the environment variableConfigurationException
public static ISettingsMap resolveTagsInMap(ISettingsMap inputMap) throws ConfigurationException
inputMap
- input file as SettingsMapConfigurationException
public static String resolveTagsInString(String input) throws ConfigurationException
input
- string input to resolveConfigurationException
- .public static boolean isSelectionMatchFileMeta(ISettingsMap selectionSection, ISettingsMap fileMetaInfo, String filename)
selectionSection
- selection section from the resolverfileMetaInfo
- file header (meta info)filename
- file name containing the headerpublic static boolean isSelectionSupported(ISettingsMap resolverSelection)
Copyright © 2014–2023. All rights reserved.