public class UtilVersion extends Object
The punch use "6.0" two digits version identifiers. We do not expect to have tons of them.
This class also provide generic conversion and checking method to deal with missing properties and backward compatibility.
Modifier and Type | Field and Description |
---|---|
static Map<String,String> |
boltConvertor5xTo6x |
static Map<String,String> |
spoutConvertor5xTo6x |
static Integer |
V5 |
static Integer |
V6 |
Modifier and Type | Method and Description |
---|---|
static ISettingsMap |
channelStructure5To6(ISettingsMap channelStructure) |
static ISettingsMap |
checkAndConvertChannelStructure(ISettingsMap structure)
Check the channel structure format and return this version compatible format.
|
static ISettingsMap |
checkAndConvertPlan(ISettingsMap settings) |
static ISettingsMap |
checkAndConvertPlan(ISettingsMap plan,
String tenantName,
String channelName,
String punchlineName) |
static ISettingsMap |
checkAndConvertPunchline(ISettingsMap settings)
This function expects a plan, a channel structure or a punchline file.
|
static ISettingsMap |
checkAndConvertPunchline(ISettingsMap punchline,
String tenantName,
String channelName,
String punchlineName) |
static boolean |
isVersionGte(ISettingsMap settings,
int major)
Check if a punchline, plan channel structure or whatever json file is of a major
version greater than what you expect.
|
static void |
warnDeprecated(String componentType,
String deprecatedField,
String newField) |
public static boolean isVersionGte(ISettingsMap settings, int major)
major
- the major version number.public static ISettingsMap channelStructure5To6(ISettingsMap channelStructure)
public static ISettingsMap checkAndConvertPunchline(ISettingsMap settings)
Otherwise it converts the old style plan, pml or topology settings map to the new format.
settings
- public static ISettingsMap checkAndConvertPlan(ISettingsMap settings)
settings
- public static ISettingsMap checkAndConvertChannelStructure(ISettingsMap structure)
structure
- public static ISettingsMap checkAndConvertPunchline(ISettingsMap punchline, String tenantName, String channelName, String punchlineName)
public static ISettingsMap checkAndConvertPlan(ISettingsMap plan, String tenantName, String channelName, String punchlineName)
Copyright © 2014–2023. All rights reserved.