Class LegacyTagUtilities

java.lang.Object
com.inductiveautomation.ignition.common.script.builtin.LegacyTagUtilities
Direct Known Subclasses:
LegacyClientTagUtilities

public abstract class LegacyTagUtilities extends 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
  • Field Details

    • LEGACY_DEFAULT_TIMEOUT_MILLIS

      public static final int LEGACY_DEFAULT_TIMEOUT_MILLIS
      See Also:
    • 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 Details

    • LegacyTagUtilities

      public LegacyTagUtilities()
  • Method Details

    • addTag

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

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

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

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

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

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

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

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

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

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

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

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

      public final void writeSynchronous(String tagPathStr, Object value)
    • writeSynchronous

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

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

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

      @Deprecated public final int write(org.python.core.PyObject[] objects, 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(String tagPathStr, Object value)
      Deprecated.
    • writeToTag

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

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

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

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

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

      @Deprecated public void loadFromFile(String filePath, String providerName, int mode) throws 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:
      Exception
    • scan

      @Deprecated public final void scan(String provider, 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 Object getTagValue(String tagPathStr)
      Deprecated.
      in 7.9. Implementation needs to be left here for backwards compatibility.
    • getTagValues

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

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

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

      protected static Property<?> lookupLegacyProp(String legacyPropName)
    • addTagImpl

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

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

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

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

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

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

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

      protected abstract QualifiedValue[] read(List<TagPath> paths) throws Exception
      Throws:
      Exception
    • writeToTagImpl

      protected abstract int writeToTagImpl(TagPath tagPath, Object value, boolean suppressErrors)
    • writeToTagsImpl

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

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

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

      protected abstract void removeTagsImpl(List<TagPath> paths) throws Exception
      Throws:
      Exception
    • scanImpl

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

      protected abstract String getDefaultTagProvider()
    • loadFromFileImpl

      protected abstract void loadFromFileImpl(String fileAsString, String fileType, String providerName, CollisionPolicy policy) throws Exception
      Throws:
      Exception