Class TagDefinition
java.lang.Object
com.inductiveautomation.ignition.common.config.BasicPropertySet
com.inductiveautomation.ignition.common.sqltags.TagDefinition
- All Implemented Interfaces:
Countable
,Extendable<PropertySet>
,Mergable<PropertySet>
,MutablePropertyValueSource
,ObservablePropertySet
,PropertySet
,PropertyValueSource
,MutableTag
,Tag
,TagNode
,Serializable
,Comparable<Tag>
,Iterable<PropertyValue>
- Direct Known Subclasses:
ComplexTagDefinition
A tag definition is essentially a collection of properties, with various helpers to aid with the wide range of
features a tag has.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.common.config.BasicPropertySet
BasicPropertySet.Builder
-
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.common.config.PropertySet
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionTagDefinition
(Tag copy) Copy constructor makes a deep (including children, if applicable) copy of the given tag.TagDefinition
(Tag copy, boolean copyTagChildren) Special copy constructor that can omit copying the tag's childrenTagDefinition
(Tag copy, boolean copyTagChildren, boolean onlyLocalDefinitions) Copies the tag, optionally with children, and optionally eliminating non-local overrides & extended prop values (for getting just the core udt instance definition)TagDefinition
(TagDefinition copy) TagDefinition
(TagDiff diff, TagType type) TagDefinition
(String name, TagType type) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addChildren
(Collection<TagNode> tags) void
int
static TagDefinition
<T> T
Retrieves the value of the property, or null if this set doesn't contain that property.Gets the type of access rights for this tagReturns the list of alarm states for this taggetAttribute
(Property<?> prop) Gets the value of the given tag attribute.static PropertySet
getAttributesFrom
(Tag copy) Returns a list of children.Returns the value in qualified form- along with quality and timestamp.Returns the datatype of this tag's value propertygetName()
Returns the name of the tag.<T> T
getOrDefault
(Property<T> prop) Returns this tags permission model, if anyGets (or creates) the overridden property tree.getType()
Returns the type of this tag.boolean
Returns the enabled bit for this tagboolean
isInherited
(Property<?> prop) Indicates whether the property was inherited from a parent type.removeChild
(String name) void
Sets the type of access rights for this tag.void
setAlarmStates
(AlarmConfiguration config) void
setAlarmStates
(AlarmStateList states) This function is used to convert items stored through xml serialization, like transaction groups.void
setAttribute
(Property<?> prop, QualifiedValue value) Sets the value of the given tag attribute.void
setCurrentValue
(QualifiedValue value) Sets this tags value.void
setDataType
(DataType type) Sets the data type for this tag.void
setEnabled
(boolean en) Sets this tag enabled/disabledvoid
setEventScripts
(TagEventScripts scripts) void
Sets the name of this tagvoid
void
setRawAttributes
(Map<TagProp, Object> value) void
void
Methods inherited from class com.inductiveautomation.ignition.common.config.BasicPropertySet
addPropertyChangeListener, addPropertyChangeListener, change, coerceValue, contains, equals, firePropertyChange, getCount, getExtension, getOrElse, getProperties, getRaw, getRawValueMap, getValues, isExtended, iterator, of, remove, removePropertyChangeListener, removePropertyChangeListener, set, set, setDirect, setImpl, setRawValueMap, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.inductiveautomation.ignition.common.config.MutablePropertyValueSource
merge
Methods inherited from interface com.inductiveautomation.ignition.common.config.PropertySet
extend, newDefaultInstance, newExtension
Methods inherited from interface com.inductiveautomation.ignition.common.config.PropertyValueSource
getNonNull, getNonNull
-
Constructor Details
-
TagDefinition
public TagDefinition() -
TagDefinition
-
TagDefinition
Copy constructor makes a deep (including children, if applicable) copy of the given tag. The implementation of the actual tag isn't important, this copy constructor will probe the tag for all pertinent attributes and store copies of them -
TagDefinition
-
TagDefinition
-
TagDefinition
Special copy constructor that can omit copying the tag's children -
TagDefinition
Copies the tag, optionally with children, and optionally eliminating non-local overrides & extended prop values (for getting just the core udt instance definition)
-
-
Method Details
-
getName
Description copied from interface:Tag
Returns the name of the tag. -
getType
Description copied from interface:Tag
Returns the type of this tag. -
getDataType
Description copied from interface:Tag
Returns the datatype of this tag's value property- Specified by:
getDataType
in interfaceTag
-
isEnabled
public boolean isEnabled()Description copied from interface:Tag
Returns the enabled bit for this tag -
getCurrentValue
Description copied from interface:Tag
Returns the value in qualified form- along with quality and timestamp.- Specified by:
getCurrentValue
in interfaceTag
-
getAccessRights
Description copied from interface:Tag
Gets the type of access rights for this tag- Specified by:
getAccessRights
in interfaceTag
-
getPermissionModel
Description copied from interface:Tag
Returns this tags permission model, if any- Specified by:
getPermissionModel
in interfaceTag
-
getAlarmStates
Description copied from interface:Tag
Returns the list of alarm states for this tag- Specified by:
getAlarmStates
in interfaceTag
-
getEventScripts
- Specified by:
getEventScripts
in interfaceTag
-
getExtendedProperties
-
getAttribute
Description copied from interface:Tag
Gets the value of the given tag attribute.- Specified by:
getAttribute
in interfaceTag
-
getChildren
Description copied from interface:TagNode
Returns a list of children.- Specified by:
getChildren
in interfaceTagNode
- Returns:
- children, NULL if not a folder.
-
setEnabled
public void setEnabled(boolean en) Description copied from interface:MutableTag
Sets this tag enabled/disabled- Specified by:
setEnabled
in interfaceMutableTag
-
setName
Description copied from interface:MutableTag
Sets the name of this tag- Specified by:
setName
in interfaceMutableTag
-
setType
-
setDataType
Description copied from interface:MutableTag
Sets the data type for this tag. The existing value will most likely be lost.- Specified by:
setDataType
in interfaceMutableTag
-
setAccessRights
Description copied from interface:MutableTag
Sets the type of access rights for this tag.- Specified by:
setAccessRights
in interfaceMutableTag
-
setPermissionModel
-
setAlarmStates
- Specified by:
setAlarmStates
in interfaceMutableTag
-
setEventScripts
- Specified by:
setEventScripts
in interfaceMutableTag
-
setAttribute
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 interfaceMutableTag
- Throws:
ClassCastException
-
setCurrentValue
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 interfaceMutableTag
- Throws:
ClassCastException
-
setValue
- Throws:
ClassCastException
-
addChild
-
addChildren
-
removeChild
-
getChild
-
get
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 interfacePropertyValueSource
- Overrides:
get
in classBasicPropertySet
-
getOrDefault
- Specified by:
getOrDefault
in interfacePropertyValueSource
- Overrides:
getOrDefault
in classBasicPropertySet
- Returns:
- The value for prop or
Property.getDefaultValue()
if not present. Can return null if the value is null.
-
setAlarmStates
This function is used to convert items stored through xml serialization, like transaction groups. * -
getAttributesFrom
-
setRawAttributes
-
isInherited
Description copied from interface:PropertySet
Indicates whether the property was inherited from a parent type.- Specified by:
isInherited
in interfacePropertySet
- Overrides:
isInherited
in classBasicPropertySet
-
getPropertyOverrides
Gets (or creates) the overridden property tree. Used for UDTs, property overrides shadow properties in sub tags. -
compareTo
- Specified by:
compareTo
in interfaceComparable<Tag>
-
fromNodeDescription
-
applyDiff
-