Class LegacyTagPropUpgrader
- java.lang.Object
-
- com.inductiveautomation.ignition.common.tags.upgrade.LegacyTagPropUpgrader
-
public class LegacyTagPropUpgrader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.EnumSet<TagProp>
ELIGIBLE_BIND_PROPS
static java.util.Set<java.lang.String>
IGNORED_PROPS
-
Constructor Summary
Constructors Constructor Description LegacyTagPropUpgrader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
convertBooleanValue(BoundPropertySet target)
Booleans come over as "0" or "1", so we need to convert the value to an actual boolean value if possibleprotected static PropertyValue
convertLegacyProp(Property<?> legacyProp, java.lang.Object legacyPropValue, boolean isUdt, PropertySet target)
Attempts to resolve a legacy tag property name to a known property name in this class.static void
convertProperties(BoundPropertySet target, PropertySet source, PropertySet overrides, boolean isUdt, java.util.Set<java.lang.String> ignoredProps, boolean initValueForNull)
protected static boolean
isExpressionProperty(Property<?> prop)
protected static boolean
isParameterBoundValue(PropertyValue pv)
Parameter bound values are properties whose value in an UDT instance is partially dependent on a UDT parameter.static BasicBoundPropertySet
processTagProps(PropertySet def, PropertySet overrides, boolean isUdt)
Overrides can happen in the case of an extended UDT instance that has configured overrides.static void
registerPropertyUpgrader(Property<?> prop, PropertyUpgrader upgrader)
static BoundPropertySet
upgradeLegacyDefinition(PropertySet definition, boolean isUdt)
static TagGroupConfiguration
upgradeScanClass(ScanClass sc)
Converts a legacy ScanClass object to a modern TagGroupConfiguration
-
-
-
Field Detail
-
ELIGIBLE_BIND_PROPS
public static java.util.EnumSet<TagProp> ELIGIBLE_BIND_PROPS
-
IGNORED_PROPS
public static final java.util.Set<java.lang.String> IGNORED_PROPS
-
-
Method Detail
-
registerPropertyUpgrader
public static void registerPropertyUpgrader(Property<?> prop, PropertyUpgrader upgrader)
-
upgradeLegacyDefinition
public static BoundPropertySet upgradeLegacyDefinition(PropertySet definition, boolean isUdt)
-
processTagProps
public static BasicBoundPropertySet processTagProps(PropertySet def, PropertySet overrides, boolean isUdt)
Overrides can happen in the case of an extended UDT instance that has configured overrides.
-
upgradeScanClass
public static TagGroupConfiguration upgradeScanClass(ScanClass sc)
Converts a legacy ScanClass object to a modern TagGroupConfiguration
-
convertProperties
public static void convertProperties(BoundPropertySet target, PropertySet source, PropertySet overrides, boolean isUdt, java.util.Set<java.lang.String> ignoredProps, boolean initValueForNull)
-
convertLegacyProp
protected static PropertyValue convertLegacyProp(Property<?> legacyProp, java.lang.Object legacyPropValue, boolean isUdt, PropertySet target)
Attempts to resolve a legacy tag property name to a known property name in this class. If no matching or equivalent property can be found, the original legacy property is returned.
-
isExpressionProperty
protected static boolean isExpressionProperty(Property<?> prop)
-
isParameterBoundValue
protected static boolean isParameterBoundValue(PropertyValue pv)
Parameter bound values are properties whose value in an UDT instance is partially dependent on a UDT parameter. We need to locate these when converting UDT tag properties, as they must be set differently in a converted tag's property set when saving.
-
convertBooleanValue
public static void convertBooleanValue(BoundPropertySet target)
Booleans come over as "0" or "1", so we need to convert the value to an actual boolean value if possible- Parameters:
target
- the converted PropertySet
-
-