Class AbstractClientTag

    • Field Detail

      • LOGGER

        protected static final LoggerEx LOGGER
      • name

        protected java.lang.String name
        The name of this tag
      • deleted

        protected boolean deleted
        Turned true when this tag is deleted so that the correct quality can be returned
      • pathContext

        protected TagPath pathContext
        Tag path that points toward my parent, null if I'm the root
    • Constructor Detail

      • AbstractClientTag

        protected AbstractClientTag​(java.lang.String name,
                                    DataType dataType,
                                    QualifiedValue value)
    • Method Detail

      • applyDiff

        public void applyDiff​(TagDiff diff)
        Applies the diff to this tag, and fires one change at the end.
        Specified by:
        applyDiff in interface ClientTag
      • getChildren

        public java.util.List<? extends ClientTag> getChildren()
        Description copied from interface: TagNode
        Returns a list of children.
        Specified by:
        getChildren in interface TagNode
        getChildren in class AbstractTag
        children, NULL if not a folder.
      • getName

        public java.lang.String getName()
        Description copied from interface: Tag
        Returns the name of the tag.
        Specified by:
        getName in interface Tag
        getName in class AbstractTag
      • checkName

        protected void checkName​(java.lang.String name)
      • findChild

        public ClientTag findChild​(java.lang.String tagName)
        Description copied from interface: ClientTag
        Attempts to find a tag with the given name (case insensitive).
        Specified by:
        findChild in interface ClientTag
      • removeChild

        public Tag removeChild​(java.lang.String tagName)
        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 interface ClientTag
        removeChild in class AbstractTag
      • setAttribute

        public void setAttribute​(Property<?> prop,
                                 QualifiedValue value)
                          throws java.lang.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
        setAttribute in class AbstractTag
      • setTypeAndValue

        public void setTypeAndValue​(DataType type,
                                    java.lang.Object value)
        For backwards compatability - this function is called during deserialization
      • setTypeAndValue

        public void setTypeAndValue​(DataType type,
                                    TagValue value)
      • setCurrentValue

        public void setCurrentValue​(QualifiedValue newValue)
                             throws java.lang.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
        setCurrentValue in class AbstractTag
      • getValueRaw

        public QualifiedValue 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 interface ClientTag
      • getAlarmStates

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

        public void setAlarmStates​(AlarmStateList list)
      • getPath

        public TagPath getPath()
      • onScriptError

        public void onScriptError​(java.lang.String id,
                                  java.lang.String message,
                                  java.lang.Exception error)
        Specified by:
        onScriptError in interface TagScriptMonitor
      • stopBinding

        public void stopBinding()
        Description copied from interface: ClientTag
        Stops any binding activities for this tag
        Specified by:
        stopBinding in interface ClientTag
      • sampleDiagnostics

        public void sampleDiagnostics​(DiagnosticsSample sample)
        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 call getSubSample() in order to specify a useful identifier for this object's data.
        Specified by:
        sampleDiagnostics in interface Diagnosable
      • transferState

        public void transferState​(ClientTag otherTag)
        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 interface ClientTag
      • 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 interface ClientTag
      • fireTagChange

        public void fireTagChange​(Property<?> prop)
      • fireScriptEvent

        protected void fireScriptEvent​(java.lang.String id,
                                       java.lang.Object... params)