Class LegacyTagPropUpgrader


  • public class LegacyTagPropUpgrader
    extends java.lang.Object
    • 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
    • Constructor Detail

      • LegacyTagPropUpgrader

        public LegacyTagPropUpgrader()
    • Method Detail

      • registerPropertyUpgrader

        public static void registerPropertyUpgrader​(Property<?> prop,
                                                    PropertyUpgrader upgrader)
      • 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