java.lang.Object
com.inductiveautomation.ignition.common.config.PropertySetDiff
com.inductiveautomation.ignition.common.sqltags.tags.TagDiff
All Implemented Interfaces:
Countable, Extendable<PropertySet>, Mergable<PropertySet>, MutablePropertyValueSource, PropertySet, PropertySetEdit, PropertyValueSource, MutableTag, Tag, Serializable, Comparable<Tag>, Iterable<PropertyValue>
Direct Known Subclasses:
ComplexTagDiff

public class TagDiff extends PropertySetDiff implements MutableTag, Serializable
A Tag Diff represents an edit to a tag that may encompass various fields. It implements Tag only so that editing code can uniformly treat editing tags and creating tag diffs.
See Also:
  • Constructor Details

    • TagDiff

      public TagDiff(PropertySet copy)
    • TagDiff

      public TagDiff()
    • TagDiff

      public TagDiff(String name, TagType type)
  • Method Details

    • isScanClassChanged

      public boolean isScanClassChanged()
    • isNameChanged

      public boolean isNameChanged()
    • isDataTypeChanged

      public boolean isDataTypeChanged()
    • isEventScriptsModified

      public boolean isEventScriptsModified()
    • isDriverNameChanged

      public boolean isDriverNameChanged()
    • isAlarmStatesModified

      public boolean isAlarmStatesModified()
    • isEnabledChanged

      public boolean isEnabledChanged()
    • isValueChanged

      public boolean isValueChanged()
    • setType

      public void setType(TagType type)
    • isTypeChanged

      public boolean isTypeChanged()
    • isAccessRightsChanged

      public boolean isAccessRightsChanged()
    • isPermissionModelChanged

      public boolean isPermissionModelChanged()
    • getAlarmStates

      public AlarmConfiguration getAlarmStates()
      Description copied from interface: Tag
      Returns the list of alarm states for this tag
      Specified by:
      getAlarmStates in interface Tag
    • get

      public <T> T get(Property<T> prop)
      Description copied from interface: PropertyValueSource
      Retrieves the value of the property, or null if this set doesn't contain that property.
      Specified by:
      get in interface PropertyValueSource
      Overrides:
      get in class PropertySetDiff
    • getName

      public String getName()
      Description copied from interface: Tag
      Returns the name of the tag.
      Specified by:
      getName in interface Tag
    • getType

      public TagType getType()
      Description copied from interface: Tag
      Returns the type of this tag.
      Specified by:
      getType in interface Tag
    • getDataType

      public DataType getDataType()
      Description copied from interface: Tag
      Returns the datatype of this tag's value property
      Specified by:
      getDataType in interface Tag
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: Tag
      Returns the enabled bit for this tag
      Specified by:
      isEnabled in interface Tag
    • getCurrentValue

      public QualifiedValue getCurrentValue()
      Description copied from interface: Tag
      Returns the value in qualified form- along with quality and timestamp.
      Specified by:
      getCurrentValue in interface Tag
    • getAccessRights

      public AccessRightsType getAccessRights()
      Description copied from interface: Tag
      Gets the type of access rights for this tag
      Specified by:
      getAccessRights in interface Tag
    • getPermissionModel

      public TagPermissionsModel getPermissionModel()
      Description copied from interface: Tag
      Returns this tags permission model, if any
      Specified by:
      getPermissionModel in interface Tag
    • getEventScripts

      public TagEventScripts getEventScripts()
      Will get or create the event scripts diff. *
      Specified by:
      getEventScripts in interface Tag
    • getAttribute

      public QualifiedValue getAttribute(Property<?> prop)
      Description copied from interface: Tag
      Gets the value of the given tag attribute.
      Specified by:
      getAttribute in interface Tag
    • compareTo

      public int compareTo(Tag o)
      Specified by:
      compareTo in interface Comparable<Tag>
    • setEnabled

      public void setEnabled(boolean en)
      Description copied from interface: MutableTag
      Sets this tag enabled/disabled
      Specified by:
      setEnabled in interface MutableTag
    • setName

      public void setName(String name)
      Description copied from interface: MutableTag
      Sets the name of this tag
      Specified by:
      setName in interface MutableTag
    • setDataType

      public void setDataType(DataType type)
      Description copied from interface: MutableTag
      Sets the data type for this tag. The existing value will most likely be lost.
      Specified by:
      setDataType in interface MutableTag
    • setAccessRights

      public void setAccessRights(AccessRightsType type)
      Description copied from interface: MutableTag
      Sets the type of access rights for this tag.
      Specified by:
      setAccessRights in interface MutableTag
    • setPermissionModel

      public void setPermissionModel(TagPermissionsModel model)
    • setAlarmStates

      public void setAlarmStates(AlarmConfiguration config)
      Specified by:
      setAlarmStates in interface MutableTag
    • setEventScripts

      public void setEventScripts(TagEventScripts scripts)
      Specified by:
      setEventScripts in interface MutableTag
    • setAttribute

      public void setAttribute(Property<?> prop, QualifiedValue value) throws ClassCastException
      Description copied from interface: MutableTag
      Sets the value of the given tag attribute. If the type of the argument is incorrect, an ClassCastException will be thrown.
      Specified by:
      setAttribute in interface MutableTag
      Throws:
      ClassCastException
    • setCurrentValue

      public void setCurrentValue(QualifiedValue value) throws ClassCastException
      Description copied from interface: MutableTag
      Sets this tags value. Will throw an ClassCastException if the value cannot be coerced into the datatype of this tag.
      Specified by:
      setCurrentValue in interface MutableTag
      Throws:
      ClassCastException
    • setValue

      public void setValue(TagValue tv) throws ClassCastException
      Throws:
      ClassCastException
    • getAttrValue

      public <T> T getAttrValue(TagProp prop)