Class LegacyTagUtilities

  • Direct Known Subclasses:
    LegacyClientTagUtilities

    public abstract class LegacyTagUtilities
    extends java.lang.Object
    All the system.tag functions that were formerly located in AbstractTagUtilities and AbstractIALabsTagFunctions. We need these functions for backwards compatibility, but we don't want them to be visible to users via the script hints system. Internally, the functions internally use 8.0 functionality to provide the equivalent capabilities as the old functions.
    Since:
    8.0
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addTag​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
      Deprecated.
      protected abstract void addTagImpl​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)  
      BrowseTag[] browseTags​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
      Deprecated.
      protected abstract BrowseTag[] browseTagsImpl​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)  
      BrowseTag[] browseTagsSimple​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
      Deprecated.
      protected abstract BrowseTag[] browseTagsSimpleImpl​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)  
      void editAlarmConfig​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
      Deprecated.
      protected abstract void editAlarmConfigImpl​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)  
      void editTag​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
      Deprecated.
      protected abstract void editTagImpl​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)  
      void editTags​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
      Deprecated.
      protected abstract void editTagsImpl​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)  
      TagAlarmDefinition[] getAlarmStates​(java.lang.String tagPath)
      Deprecated.
      protected abstract TagAlarmDefinition[] getAlarmStatesImpl​(java.lang.String tagPath)  
      java.lang.Object getAttribute​(java.lang.String tagPath, java.lang.String attribute)
      Deprecated.
      use readAll() instead.
      protected DataTypeClass getDataType​(java.lang.Object value)  
      protected abstract java.lang.String getDefaultTagProvider()  
      java.lang.Object getTagValue​(java.lang.String tagPathStr)
      Deprecated.
      in 7.9.
      java.lang.Object[] getTagValues​(java.lang.String[] tagPaths)
      Deprecated.
      use readAll() instead.
      void loadFromFile​(java.lang.String filePath, java.lang.String providerName, int mode)
      Deprecated.
      protected abstract void loadFromFileImpl​(java.lang.String fileAsString, java.lang.String fileType, java.lang.String providerName, CollisionPolicy policy)  
      protected static Property<?> lookupLegacyProp​(Property<?> legacyProp)  
      protected static Property<?> lookupLegacyProp​(java.lang.String legacyPropName)  
      protected TagPath parseTagPath​(java.lang.String path)
      Parses the tag path, using some special values from ScriptContext when appropriate for the default source, and to de-relativize if possible.
      QualifiedValue read​(java.lang.String tagPathStr)
      Deprecated.
      protected abstract QualifiedValue[] read​(java.util.List<TagPath> paths)  
      QualifiedValue[] readAll​(java.lang.String[] tagPathsArr)
      Deprecated.
      void removeTag​(java.lang.String tagPath)
      Deprecated.
      void removeTags​(java.lang.String[] tagPaths)
      Deprecated.
      protected abstract void removeTagsImpl​(java.util.List<TagPath> paths)  
      void scan​(java.lang.String provider, java.lang.String scname)
      Deprecated.
      protected abstract void scanImpl​(java.lang.String provider, java.lang.String scname)  
      void storeTagHistory​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
      Deprecated.
      protected abstract void storeTagHistoryImpl​(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)  
      int write​(org.python.core.PyObject[] objects, java.lang.String[] keywords)
      Deprecated.
      int[] writeAll​(java.lang.String[] tagPaths, java.lang.Object[] values)
      Deprecated.
      void writeAllSynchronous​(java.lang.String[] tagPathStr, java.lang.Object[] value)
      Deprecated.
      void writeAllSynchronous​(java.lang.String[] tagPaths, java.lang.Object[] values, int timeout)
      Deprecated.
      void writeSynchronous​(java.lang.String tagPathStr, java.lang.Object value)  
      void writeSynchronous​(java.lang.String tagPathStr, java.lang.Object value, int timeoutMillis)
      Deprecated.
      int writeToTag​(java.lang.String tagPathStr, java.lang.Object value)
      Deprecated.
      int writeToTag​(java.lang.String tagPathStr, java.lang.Object value, boolean suppressErrors)
      Deprecated.
      protected abstract int writeToTagImpl​(TagPath tagPath, java.lang.Object value, boolean suppressErrors)  
      int[] writeToTags​(java.lang.String[] tagPaths, java.lang.Object[] values)
      Deprecated.
      protected abstract int[] writeToTagsImpl​(java.util.List<TagPath> paths, java.util.List<java.lang.Object> values, boolean suppressErrors)  
      protected abstract void writeToTagsSynchronousImpl​(java.util.List<TagPath> paths, java.util.List<java.lang.Object> values, int timeout)  
      void writeToTagSynchronous​(java.lang.String tagPathStr, java.lang.Object value)
      Deprecated.
      void writeToTagSynchronous​(java.lang.String tagPathStr, java.lang.Object value, int timeoutMillis)
      Deprecated.
      protected abstract void writeToTagSynchronousImpl​(TagPath tagPath, java.lang.Object value, int timeout)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LEGACY_DEFAULT_TIMEOUT_MILLIS

        public static final int LEGACY_DEFAULT_TIMEOUT_MILLIS
        See Also:
        Constant Field Values
      • TAG_PATH

        public static final Field<PropertySet,​TagPath,​PathCondition> TAG_PATH
        WARNING- Only use this filter if you know that items to be filtered are guaranteed to be TagEditModels, as only those have a useable path
    • Constructor Detail

      • LegacyTagUtilities

        public LegacyTagUtilities()
    • Method Detail

      • addTag

        @Deprecated
        public void addTag​(org.python.core.PyObject[] pyArgs,
                           java.lang.String[] keywords)
                    throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • editTag

        @Deprecated
        public void editTag​(org.python.core.PyObject[] pyArgs,
                            java.lang.String[] keywords)
                     throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • editAlarmConfig

        @Deprecated
        public void editAlarmConfig​(org.python.core.PyObject[] pyArgs,
                                    java.lang.String[] keywords)
                             throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • editTags

        @Deprecated
        public void editTags​(org.python.core.PyObject[] pyArgs,
                             java.lang.String[] keywords)
                      throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • browseTags

        @Deprecated
        public BrowseTag[] browseTags​(org.python.core.PyObject[] pyArgs,
                                      java.lang.String[] keywords)
                               throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • browseTagsSimple

        @Deprecated
        public BrowseTag[] browseTagsSimple​(org.python.core.PyObject[] pyArgs,
                                            java.lang.String[] keywords)
                                     throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • getAlarmStates

        @Deprecated
        public TagAlarmDefinition[] getAlarmStates​(java.lang.String tagPath)
                                            throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • parseTagPath

        protected TagPath parseTagPath​(java.lang.String path)
                                throws java.io.IOException
        Parses the tag path, using some special values from ScriptContext when appropriate for the default source, and to de-relativize if possible.
        Throws:
        java.io.IOException
      • read

        @Deprecated
        public QualifiedValue read​(java.lang.String tagPathStr)
                            throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • readAll

        @Deprecated
        public QualifiedValue[] readAll​(java.lang.String[] tagPathsArr)
        Deprecated.
      • writeToTagSynchronous

        @Deprecated
        public final void writeToTagSynchronous​(java.lang.String tagPathStr,
                                                java.lang.Object value)
        Deprecated.
      • writeToTagSynchronous

        @Deprecated
        public final void writeToTagSynchronous​(java.lang.String tagPathStr,
                                                java.lang.Object value,
                                                int timeoutMillis)
        Deprecated.
      • writeSynchronous

        public final void writeSynchronous​(java.lang.String tagPathStr,
                                           java.lang.Object value)
      • writeSynchronous

        @Deprecated
        public final void writeSynchronous​(java.lang.String tagPathStr,
                                           java.lang.Object value,
                                           int timeoutMillis)
        Deprecated.
      • writeAllSynchronous

        @Deprecated
        public final void writeAllSynchronous​(java.lang.String[] tagPathStr,
                                              java.lang.Object[] value)
        Deprecated.
      • writeAllSynchronous

        @Deprecated
        public final void writeAllSynchronous​(java.lang.String[] tagPaths,
                                              java.lang.Object[] values,
                                              int timeout)
        Deprecated.
      • write

        @Deprecated
        public final int write​(org.python.core.PyObject[] objects,
                               java.lang.String[] keywords)
        Deprecated.
        Writes a value to a tag asynchronously. Before 8.0, the function returned 0 if the write failed, 1 if the write succeeded, and 2 if the write was pending. Now, we will always return 2 (unless the designer is in read-only mode, in which case we return 0). The completable future will later handle a write error with a log message (Gateway) or show the user an error dialog (Client), if supressErrors is False.
      • writeToTag

        @Deprecated
        public int writeToTag​(java.lang.String tagPathStr,
                              java.lang.Object value)
        Deprecated.
      • writeToTag

        @Deprecated
        public final int writeToTag​(java.lang.String tagPathStr,
                                    java.lang.Object value,
                                    boolean suppressErrors)
        Deprecated.
      • writeToTags

        @Deprecated
        public int[] writeToTags​(java.lang.String[] tagPaths,
                                 java.lang.Object[] values)
        Deprecated.
      • writeAll

        @Deprecated
        public int[] writeAll​(java.lang.String[] tagPaths,
                              java.lang.Object[] values)
        Deprecated.
      • removeTag

        @Deprecated
        public void removeTag​(java.lang.String tagPath)
                       throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • removeTags

        @Deprecated
        public void removeTags​(java.lang.String[] tagPaths)
                        throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • loadFromFile

        @Deprecated
        public void loadFromFile​(java.lang.String filePath,
                                 java.lang.String providerName,
                                 int mode)
                          throws java.lang.Exception
        Deprecated.
        Imports the tag file at the provided path into the specified provider. The mode dictates what happens if the tag already exists.
        Parameters:
        mode -
        • 0=Overwrite
        • 1=Ignore
        Throws:
        java.lang.Exception
      • scan

        @Deprecated
        public final void scan​(java.lang.String provider,
                               java.lang.String scname)
        Deprecated.
        Forces the execution of a tag group (called scan class before 8.0)
        Parameters:
        provider - If blank, the default provider will be used.
        scname - Name of the tag group (formerly called scan class) to execute. Required.
      • getTagValue

        @Deprecated
        public java.lang.Object getTagValue​(java.lang.String tagPathStr)
        Deprecated.
        in 7.9. Implementation needs to be left here for backwards compatibility.
      • getTagValues

        @Deprecated
        public java.lang.Object[] getTagValues​(java.lang.String[] tagPaths)
        Deprecated.
        use readAll() instead. Implementation needs to be left here for backwards compatibility.
      • getAttribute

        @Deprecated
        public java.lang.Object getAttribute​(java.lang.String tagPath,
                                             java.lang.String attribute)
                                      throws java.lang.Exception
        Deprecated.
        use readAll() instead. Implementation needs to be left here for backwards compatibility.
        Throws:
        java.lang.Exception
      • storeTagHistory

        @Deprecated
        public void storeTagHistory​(org.python.core.PyObject[] pyArgs,
                                    java.lang.String[] keywords)
                             throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • lookupLegacyProp

        protected static Property<?> lookupLegacyProp​(Property<?> legacyProp)
      • lookupLegacyProp

        protected static Property<?> lookupLegacyProp​(java.lang.String legacyPropName)
      • getDataType

        protected DataTypeClass getDataType​(java.lang.Object value)
      • addTagImpl

        protected abstract void addTagImpl​(org.python.core.PyObject[] pyArgs,
                                           java.lang.String[] keywords)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editTagImpl

        protected abstract void editTagImpl​(org.python.core.PyObject[] pyArgs,
                                            java.lang.String[] keywords)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editTagsImpl

        protected abstract void editTagsImpl​(org.python.core.PyObject[] pyArgs,
                                             java.lang.String[] keywords)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • editAlarmConfigImpl

        protected abstract void editAlarmConfigImpl​(org.python.core.PyObject[] pyArgs,
                                                    java.lang.String[] keywords)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • browseTagsImpl

        protected abstract BrowseTag[] browseTagsImpl​(org.python.core.PyObject[] pyArgs,
                                                      java.lang.String[] keywords)
                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • browseTagsSimpleImpl

        protected abstract BrowseTag[] browseTagsSimpleImpl​(org.python.core.PyObject[] pyArgs,
                                                            java.lang.String[] keywords)
                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getAlarmStatesImpl

        protected abstract TagAlarmDefinition[] getAlarmStatesImpl​(java.lang.String tagPath)
                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • read

        protected abstract QualifiedValue[] read​(java.util.List<TagPath> paths)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • writeToTagImpl

        protected abstract int writeToTagImpl​(TagPath tagPath,
                                              java.lang.Object value,
                                              boolean suppressErrors)
      • writeToTagsImpl

        protected abstract int[] writeToTagsImpl​(java.util.List<TagPath> paths,
                                                 java.util.List<java.lang.Object> values,
                                                 boolean suppressErrors)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • writeToTagSynchronousImpl

        protected abstract void writeToTagSynchronousImpl​(TagPath tagPath,
                                                          java.lang.Object value,
                                                          int timeout)
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • writeToTagsSynchronousImpl

        protected abstract void writeToTagsSynchronousImpl​(java.util.List<TagPath> paths,
                                                           java.util.List<java.lang.Object> values,
                                                           int timeout)
                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeTagsImpl

        protected abstract void removeTagsImpl​(java.util.List<TagPath> paths)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • scanImpl

        protected abstract void scanImpl​(java.lang.String provider,
                                         java.lang.String scname)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDefaultTagProvider

        protected abstract java.lang.String getDefaultTagProvider()
      • loadFromFileImpl

        protected abstract void loadFromFileImpl​(java.lang.String fileAsString,
                                                 java.lang.String fileType,
                                                 java.lang.String providerName,
                                                 CollisionPolicy policy)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • storeTagHistoryImpl

        protected abstract void storeTagHistoryImpl​(org.python.core.PyObject[] pyArgs,
                                                    java.lang.String[] keywords)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception