Class AbstractClientTag
java.lang.Object
com.inductiveautomation.ignition.common.sqltags.tags.AbstractTag
com.inductiveautomation.factorypmi.application.sqltags.AbstractClientTag
- All Implemented Interfaces:
ClientTag
,Diagnosable
,MutableTag
,Tag
,TagNode
,TagScriptMonitor
,Comparable<Tag>
- Direct Known Subclasses:
AbstractClientSystemTag
,ArrayIndexTag
,ClientTagFolder
,ProjectTag
public abstract class AbstractClientTag
extends AbstractTag
implements ClientTag, TagScriptMonitor, Diagnosable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected VisionClientContext
protected boolean
Turned true when this tag is deleted so that the correct quality can be returnedprotected static final LoggerEx
protected String
The name of this tagprotected TagPath
Tag path that points toward my parent, null if I'm the rootFields inherited from class com.inductiveautomation.ignition.common.sqltags.tags.AbstractTag
accessRights, attributes, enabled, eventScripts, permissionModel, type
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractClientTag
(String name, DataType dataType, QualifiedValue value) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies the diff to this tag, and fires one change at the end.protected void
Attempts to find a tag with the given name (case insensitive).protected void
fireScriptEvent
(String id, Object... params) void
fireTagChange
(Property<?> prop) Returns the list of alarm states for this taggetAttribute
(Property<?> prop) Gets the value of the given tag attribute.Returns a list of children.Returns the value in qualified form- along with quality and timestamp.getName()
Returns the name of the tag.getPath()
Gets the tag's current value, skipping enabled and security checks.boolean
hasPermission
(boolean write) Returns true if the currently logged in user has permission for this tag, either for read or write accessboolean
void
Called when this tag is removed.void
onScriptError
(String id, String message, Exception error) void
removeChild
(String tagName) Removes the child with the given name (case insensitive).void
sampleDiagnostics
(DiagnosticsSample sample) Provides the sample upon which the object can set diagnostics information.void
setAccessRights
(AccessRightsType accessRights) Sets the type of access rights for this tag.void
setAlarmStates
(AlarmConfiguration config) void
setAlarmStates
(AlarmStateList list) void
setAttribute
(Property<?> prop, QualifiedValue value) Sets the value of the given tag attribute.void
setCurrentValue
(QualifiedValue newValue) Sets this tags value.void
setEnabled
(boolean enabled) Sets this tag enabled/disabledvoid
setEventScripts
(TagEventScripts scripts) void
Sets the name of this tagvoid
setTypeAndValue
(DataType type, QualifiedValue value) void
setTypeAndValue
(DataType type, TagValue value) Deprecated.void
setTypeAndValue
(DataType type, Object value) Deprecated.void
startBinding
(VisionClientContext appContext, TagPath pathContext, TagChangeListener rootListener) Starts any binding for the tag, such as an expression binding or a SQL query bindingvoid
Stops any binding activities for this tagvoid
transferState
(ClientTag otherTag) Transfers listeners and values to another tag.protected void
updateRuntimeQuality
(int flag, boolean on) Methods inherited from class com.inductiveautomation.ignition.common.sqltags.tags.AbstractTag
addChild, coerceValue, compareTo, getAccessRights, getChild, getDataType, getEventScripts, getPermissionModel, getRawAttributes, isEnabled, main, setDataType, setPermissionModel, setRawAttributes, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.factorypmi.application.sqltags.ClientTag
addChild
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.inductiveautomation.ignition.common.sqltags.model.MutableTag
setDataType
Methods inherited from interface com.inductiveautomation.ignition.common.sqltags.model.Tag
getAccessRights, getDataType, getEventScripts, getPermissionModel, getType, isEnabled
-
Field Details
-
LOGGER
-
name
The name of this tag -
deleted
protected boolean deletedTurned true when this tag is deleted so that the correct quality can be returned -
appContext
-
pathContext
Tag path that points toward my parent, null if I'm the root
-
-
Constructor Details
-
AbstractClientTag
-
-
Method Details
-
applyDiff
Applies the diff to this tag, and fires one change at the end. -
getChildren
Description copied from interface:TagNode
Returns a list of children.- Specified by:
getChildren
in interfaceTagNode
- Overrides:
getChildren
in classAbstractTag
- Returns:
- children, NULL if not a folder.
-
getName
Description copied from interface:Tag
Returns the name of the tag.- Specified by:
getName
in interfaceTag
- Overrides:
getName
in classAbstractTag
-
checkName
-
setName
Description copied from interface:MutableTag
Sets the name of this tag- Specified by:
setName
in interfaceMutableTag
- Overrides:
setName
in classAbstractTag
-
findChild
Description copied from interface:ClientTag
Attempts to find a tag with the given name (case insensitive). -
removeChild
Description copied from interface:ClientTag
Removes the child with the given name (case insensitive). Will throw an UnsupportedOperationException on anything but a folder tag. Returns the tag removed, or null if no tag by the given name was found.- Specified by:
removeChild
in interfaceClientTag
- Overrides:
removeChild
in classAbstractTag
-
getAttribute
Description copied from interface:Tag
Gets the value of the given tag attribute.- Specified by:
getAttribute
in interfaceTag
- Overrides:
getAttribute
in classAbstractTag
-
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
- Overrides:
setAttribute
in classAbstractTag
- Throws:
ClassCastException
-
setTypeAndValue
Deprecated.no longer used, seesetTypeAndValue(DataType, QualifiedValue)
.For backwards compatability - this function is called during deserialization -
setTypeAndValue
Deprecated. -
setTypeAndValue
-
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
- Overrides:
setCurrentValue
in classAbstractTag
- Throws:
ClassCastException
-
getCurrentValue
Description copied from interface:Tag
Returns the value in qualified form- along with quality and timestamp.- Specified by:
getCurrentValue
in interfaceTag
- Overrides:
getCurrentValue
in classAbstractTag
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:MutableTag
Sets this tag enabled/disabled- Specified by:
setEnabled
in interfaceMutableTag
- Overrides:
setEnabled
in classAbstractTag
-
getValueRaw
Gets the tag's current value, skipping enabled and security checks. Used for serialization. See ProjectTagDelegate. -
hasPermission
public boolean hasPermission(boolean write) Returns true if the currently logged in user has permission for this tag, either for read or write access- Specified by:
hasPermission
in interfaceClientTag
-
setAccessRights
Description copied from interface:MutableTag
Sets the type of access rights for this tag.- Specified by:
setAccessRights
in interfaceMutableTag
- Overrides:
setAccessRights
in classAbstractTag
-
setEventScripts
- Specified by:
setEventScripts
in interfaceMutableTag
- Overrides:
setEventScripts
in classAbstractTag
-
getAlarmStates
Description copied from interface:Tag
Returns the list of alarm states for this tag- Specified by:
getAlarmStates
in interfaceTag
-
setAlarmStates
- Specified by:
setAlarmStates
in interfaceMutableTag
-
isAlarmingSupported
public boolean isAlarmingSupported()- Overrides:
isAlarmingSupported
in classAbstractTag
-
setAlarmStates
-
getPath
-
onScriptSuccess
- Specified by:
onScriptSuccess
in interfaceTagScriptMonitor
-
onScriptError
- Specified by:
onScriptError
in interfaceTagScriptMonitor
-
startBinding
public void startBinding(VisionClientContext appContext, TagPath pathContext, TagChangeListener rootListener) Description copied from interface:ClientTag
Starts any binding for the tag, such as an expression binding or a SQL query binding- Specified by:
startBinding
in interfaceClientTag
-
stopBinding
public void stopBinding()Description copied from interface:ClientTag
Stops any binding activities for this tag- Specified by:
stopBinding
in interfaceClientTag
-
sampleDiagnostics
Description copied from interface:Diagnosable
Provides the sample upon which the object can set diagnostics information. It is expected that the calling object will first callgetSubSample()
in order to specify a useful identifier for this object's data.- Specified by:
sampleDiagnostics
in interfaceDiagnosable
-
transferState
Description copied from interface:ClientTag
Transfers listeners and values to another tag. Used when tag root is changed. Should transfer recursively - that is, transfer direct listeners, and then go through children, see if this tag has the same child, and transfer those listeners too- Specified by:
transferState
in interfaceClientTag
-
updateRuntimeQuality
protected void updateRuntimeQuality(int flag, boolean on) -
notifyTagDeleted
public void notifyTagDeleted()Description copied from interface:ClientTag
Called when this tag is removed. Should notify all subscribers that it no longer exists- Specified by:
notifyTagDeleted
in interfaceClientTag
-
fireTagChange
-
fireScriptEvent
-
setTypeAndValue(DataType, QualifiedValue)
.