public abstract class AbstractClientTag extends AbstractTag implements ClientTag, TagScriptMonitor, Diagnosable
Modifier and Type | Field and Description |
---|---|
protected VisionClientContext |
appContext |
protected boolean |
deleted
Turned true when this tag is deleted so that the correct quality can be returned
|
protected static LoggerEx |
LOGGER |
protected java.lang.String |
name
The name of this tag
|
protected TagPath |
pathContext
Tag path that points toward my parent, null if I'm the root
|
accessRights, attributes, enabled, eventScripts, permissionModel, type
Modifier | Constructor and Description |
---|---|
protected |
AbstractClientTag(java.lang.String name,
DataType dataType,
QualifiedValue value) |
Modifier and Type | Method and Description |
---|---|
void |
applyDiff(TagDiff diff)
Applies the diff to this tag, and fires one change at the end.
|
protected void |
checkName(java.lang.String name) |
ClientTag |
findChild(java.lang.String tagName)
Attempts to find a tag with the given name (case insensitive).
|
protected void |
fireScriptEvent(java.lang.String id,
java.lang.Object... params) |
void |
fireTagChange(Property<?> prop) |
AlarmConfiguration |
getAlarmStates()
Returns the list of alarm states for this tag
|
QualifiedValue |
getAttribute(Property<?> prop)
Gets the value of the given tag attribute.
|
java.util.List<? extends ClientTag> |
getChildren()
Returns a list of children.
|
QualifiedValue |
getCurrentValue()
Returns the value in qualified form- along with quality and timestamp.
|
java.lang.String |
getName()
Returns the name of the tag.
|
TagPath |
getPath() |
QualifiedValue |
getValueRaw()
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 access
|
boolean |
isAlarmingSupported() |
void |
notifyTagDeleted()
Called when this tag is removed.
|
void |
onScriptError(java.lang.String id,
java.lang.String message,
java.lang.Exception error) |
void |
onScriptSuccess(java.lang.String id) |
Tag |
removeChild(java.lang.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/disabled
|
void |
setEventScripts(TagEventScripts scripts) |
void |
setName(java.lang.String name)
Sets the name of this tag
|
void |
setTypeAndValue(DataType type,
java.lang.Object value)
Deprecated.
no longer used, see
setTypeAndValue(DataType, QualifiedValue) . |
void |
setTypeAndValue(DataType type,
QualifiedValue value) |
void |
setTypeAndValue(DataType type,
TagValue 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 binding
|
void |
stopBinding()
Stops any binding activities for this tag
|
void |
transferState(ClientTag otherTag)
Transfers listeners and values to another tag.
|
protected void |
updateRuntimeQuality(int flag,
boolean on) |
addChild, coerceValue, compareTo, getAccessRights, getChild, getDataType, getEventScripts, getPermissionModel, getRawAttributes, isEnabled, main, setDataType, setPermissionModel, setRawAttributes, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChild
setDataType
getAccessRights, getDataType, getEventScripts, getPermissionModel, getType, isEnabled
protected static final LoggerEx LOGGER
protected java.lang.String name
protected boolean deleted
protected VisionClientContext appContext
protected TagPath pathContext
protected AbstractClientTag(java.lang.String name, DataType dataType, QualifiedValue value)
public void applyDiff(TagDiff diff)
public java.util.List<? extends ClientTag> getChildren()
TagNode
getChildren
in interface TagNode
getChildren
in class AbstractTag
public java.lang.String getName()
Tag
getName
in interface Tag
getName
in class AbstractTag
protected void checkName(java.lang.String name)
public void setName(java.lang.String name)
MutableTag
setName
in interface MutableTag
setName
in class AbstractTag
public ClientTag findChild(java.lang.String tagName)
ClientTag
public Tag removeChild(java.lang.String tagName)
ClientTag
removeChild
in interface ClientTag
removeChild
in class AbstractTag
public QualifiedValue getAttribute(Property<?> prop)
Tag
getAttribute
in interface Tag
getAttribute
in class AbstractTag
public void setAttribute(Property<?> prop, QualifiedValue value) throws java.lang.ClassCastException
MutableTag
setAttribute
in interface MutableTag
setAttribute
in class AbstractTag
java.lang.ClassCastException
@Deprecated public void setTypeAndValue(DataType type, java.lang.Object value)
setTypeAndValue(DataType, QualifiedValue)
.public void setTypeAndValue(DataType type, QualifiedValue value)
public void setCurrentValue(QualifiedValue newValue) throws java.lang.ClassCastException
MutableTag
setCurrentValue
in interface MutableTag
setCurrentValue
in class AbstractTag
java.lang.ClassCastException
public QualifiedValue getCurrentValue()
Tag
getCurrentValue
in interface Tag
getCurrentValue
in class AbstractTag
public void setEnabled(boolean enabled)
MutableTag
setEnabled
in interface MutableTag
setEnabled
in class AbstractTag
public QualifiedValue getValueRaw()
public boolean hasPermission(boolean write)
hasPermission
in interface ClientTag
public void setAccessRights(AccessRightsType accessRights)
MutableTag
setAccessRights
in interface MutableTag
setAccessRights
in class AbstractTag
public void setEventScripts(TagEventScripts scripts)
setEventScripts
in interface MutableTag
setEventScripts
in class AbstractTag
public AlarmConfiguration getAlarmStates()
Tag
getAlarmStates
in interface Tag
public void setAlarmStates(AlarmConfiguration config)
setAlarmStates
in interface MutableTag
public boolean isAlarmingSupported()
isAlarmingSupported
in class AbstractTag
public void setAlarmStates(AlarmStateList list)
public TagPath getPath()
public void onScriptSuccess(java.lang.String id)
onScriptSuccess
in interface TagScriptMonitor
public void onScriptError(java.lang.String id, java.lang.String message, java.lang.Exception error)
onScriptError
in interface TagScriptMonitor
public void startBinding(VisionClientContext appContext, TagPath pathContext, TagChangeListener rootListener)
ClientTag
startBinding
in interface ClientTag
public void stopBinding()
ClientTag
stopBinding
in interface ClientTag
public void sampleDiagnostics(DiagnosticsSample sample)
Diagnosable
sampleDiagnostics
in interface Diagnosable
public void transferState(ClientTag otherTag)
ClientTag
transferState
in interface ClientTag
protected void updateRuntimeQuality(int flag, boolean on)
public void notifyTagDeleted()
ClientTag
notifyTagDeleted
in interface ClientTag
public void fireTagChange(Property<?> prop)
protected void fireScriptEvent(java.lang.String id, java.lang.Object... params)