Class AbstractTagUtilities
- java.lang.Object
-
- com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities
-
- Direct Known Subclasses:
ClientTagUtilities
public abstract class AbstractTagUtilities extends java.lang.Object
Ignition 8 tag scripting functions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractTagUtilities.DateRange
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_TIMEOUT_MILLIS
-
Constructor Summary
Constructors Constructor Description AbstractTagUtilities()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Results<PyTagDictionary>
browse(org.python.core.PyObject[] objects, java.lang.String[] keywords)
Results
browseHistoricalTags(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
protected abstract Results
browseHistoricalTagsImpl(QualifiedPath root, BrowseFilter filter)
protected abstract Results<PyTagDictionary>
browseImpl(TagPath path, BrowseFilter browseFilter)
protected abstract boolean
canEditForProvider(java.lang.String provider)
java.util.List<org.python.core.PyObject>
configure(org.python.core.PyObject[] objects, java.lang.String[] keywords)
java.util.List<org.python.core.PyObject>
copy(org.python.core.PyObject[] objects, java.lang.String[] keywords)
java.util.List<QualityCode>
deleteAnnotations(org.python.core.PyObject[] objects, java.lang.String[] keywords)
java.util.List<org.python.core.PyObject>
deleteTags(java.util.List<java.lang.String> tagPaths)
boolean
exists(java.lang.String tagPathStr)
protected abstract void
exportInternal(java.lang.String filePath, java.util.List<TagPath> tagPaths, boolean recursive, java.lang.String exportType)
For the exportType, use "json" or "xml"void
exportTags(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected Aggregate
getAggregateFor(java.lang.String value)
Returns an aggregate for the string.PyTagList
getConfiguration(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract java.util.List<TagConfigurationModel>
getConfigurationImpl(java.util.List<TagPath> basePaths, boolean recursive)
protected abstract java.util.concurrent.CompletableFuture<java.util.List<QualifiedValue>>
getQualifiedValues(java.util.List<TagPath> tagPaths)
protected abstract TagConfigurationModel
getTagConfigurationModel(TagPath path)
protected abstract java.util.List<QualityCode>
importInternal(TagPath basePath, java.lang.String fileAsStr, java.lang.String importType, CollisionPolicy cp)
java.util.List<org.python.core.PyObject>
importTags(org.python.core.PyObject[] objects, java.lang.String[] keywords)
Imports the JSON tag file at the provided path.protected AbstractTagUtilities.DateRange
interpretRange(PyArgumentMap args)
java.util.List<org.python.core.PyObject>
move(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract java.util.List<QualityCode>
moveImpl(java.util.List<TagPath> source, TagPath dest, boolean copy, CollisionPolicy policy)
protected static 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.protected static java.util.List<TagPath>
parseTagPaths(java.util.List<java.lang.String> tagPaths)
java.util.List<Annotation>
queryAnnotations(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract java.util.List<Annotation>
queryAnnotationsImpl(java.util.List<Path> paths, java.util.Date start, java.util.Date end, TypeFilter filter)
Dataset
queryTagCalculations(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract Dataset
queryTagCalculationsImpl(java.util.List<QualifiedPath> paths, java.util.List<Aggregate> colAggModes, java.util.Date startDate, java.util.Date endDate, java.util.List<java.lang.String> aliases, Flags queryFlags)
Dataset
queryTagDensity(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract Dataset
queryTagDensityImpl(java.util.List<QualifiedPath> paths, java.util.Date startDate, java.util.Date endDate)
Dataset
queryTagHistory(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract Dataset
queryTagHistoryImpl(java.util.List<QualifiedPath> paths, java.util.Date startDate, java.util.Date endDate, int returnSize, Aggregate aggregationMode, ReturnFormat format, java.util.List<java.lang.String> aliases, java.util.List<Aggregate> colAggModes, Flags queryFlags, int timeout)
void
readAsync(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract void
readAsyncImpl(java.util.List<TagPath> tagPaths, org.python.core.PyFunction callback)
java.util.List<QualifiedValue>
readBlocking(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract java.util.List<QualifiedValue>
readBlockingImpl(java.util.List<TagPath> tagPaths, int timeoutMillis)
protected abstract java.util.List<QualityCode>
removeTagsImpl(java.util.List<TagPath> tagPaths)
org.python.core.PyObject
rename(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract QualityCode
renameImpl(TagPath tagPath, java.lang.String newName, CollisionPolicy collisionPolicy)
void
requestGroupExecution(java.lang.String provider, java.lang.String tagGroup)
protected abstract void
requestGroupExecutionImpl(java.lang.String provider, java.lang.String tagGroup)
protected abstract java.util.List<QualityCode>
saveTagConfigs(java.lang.String provider, java.util.List<TagConfiguration> tagEdits, CollisionPolicy policy)
Processes tag edits.java.util.List<QualifiedValue>
storeAnnotations(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract java.util.List<QualifiedValue>
storeAnnotationsImpl(java.util.List<Annotation> annotations)
protected QualifiedPath
toQualifiedPathFromHistoricalString(java.lang.String path)
void
writeAsync(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract void
writeAsyncImpl(java.util.List<TagPath> tagPaths, java.util.List<java.lang.Object> values, org.python.core.PyFunction callback)
java.util.List<QualityCode>
writeBlocking(org.python.core.PyObject[] objects, java.lang.String[] keywords)
protected abstract java.util.List<QualityCode>
writeBlockingImpl(java.util.List<TagPath> tagPaths, java.util.List<java.lang.Object> values, int timeoutMillis)
-
-
-
Field Detail
-
DEFAULT_TIMEOUT_MILLIS
public static final int DEFAULT_TIMEOUT_MILLIS
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseTagPath
protected static 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
-
parseTagPaths
protected static java.util.List<TagPath> parseTagPaths(java.util.List<java.lang.String> tagPaths) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getConfiguration
public PyTagList getConfiguration(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getConfigurationImpl
protected abstract java.util.List<TagConfigurationModel> getConfigurationImpl(java.util.List<TagPath> basePaths, boolean recursive) throws java.lang.Exception
- Throws:
java.lang.Exception
-
configure
public final java.util.List<org.python.core.PyObject> configure(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
saveTagConfigs
protected abstract java.util.List<QualityCode> saveTagConfigs(java.lang.String provider, java.util.List<TagConfiguration> tagEdits, CollisionPolicy policy)
Processes tag edits. The edit can represent a modification of a config, a new tag, or a deletion.
-
importTags
public java.util.List<org.python.core.PyObject> importTags(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
Imports the JSON tag file at the provided path. The mode dictates what happens if the tag already exists. Use the CollisionPolicy to control the behavior when an existing tag is found. The default collision policy is "Overwrite".- Throws:
java.lang.Exception
-
importInternal
protected abstract java.util.List<QualityCode> importInternal(TagPath basePath, java.lang.String fileAsStr, java.lang.String importType, CollisionPolicy cp) throws java.lang.Exception
- Throws:
java.lang.Exception
-
copy
public java.util.List<org.python.core.PyObject> copy(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
move
public java.util.List<org.python.core.PyObject> move(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
moveImpl
protected abstract java.util.List<QualityCode> moveImpl(java.util.List<TagPath> source, TagPath dest, boolean copy, CollisionPolicy policy) throws java.lang.Exception
- Throws:
java.lang.Exception
-
browse
public Results<PyTagDictionary> browse(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
browseImpl
protected abstract Results<PyTagDictionary> browseImpl(TagPath path, BrowseFilter browseFilter)
-
readAsync
public void readAsync(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
readAsyncImpl
protected abstract void readAsyncImpl(java.util.List<TagPath> tagPaths, org.python.core.PyFunction callback)
-
readBlocking
public java.util.List<QualifiedValue> readBlocking(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
readBlockingImpl
protected abstract java.util.List<QualifiedValue> readBlockingImpl(java.util.List<TagPath> tagPaths, int timeoutMillis)
-
writeAsync
public void writeAsync(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeAsyncImpl
protected abstract void writeAsyncImpl(java.util.List<TagPath> tagPaths, java.util.List<java.lang.Object> values, org.python.core.PyFunction callback)
-
writeBlocking
public java.util.List<QualityCode> writeBlocking(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeBlockingImpl
protected abstract java.util.List<QualityCode> writeBlockingImpl(java.util.List<TagPath> tagPaths, java.util.List<java.lang.Object> values, int timeoutMillis)
-
exportTags
public void exportTags(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
exportInternal
protected abstract void exportInternal(java.lang.String filePath, java.util.List<TagPath> tagPaths, boolean recursive, java.lang.String exportType) throws java.lang.Exception
For the exportType, use "json" or "xml"- Throws:
java.lang.Exception
-
deleteTags
public java.util.List<org.python.core.PyObject> deleteTags(java.util.List<java.lang.String> tagPaths) throws java.lang.Exception
- Throws:
java.lang.Exception
-
removeTagsImpl
protected abstract java.util.List<QualityCode> removeTagsImpl(java.util.List<TagPath> tagPaths) throws java.lang.Exception
- Throws:
java.lang.Exception
-
requestGroupExecution
public void requestGroupExecution(java.lang.String provider, java.lang.String tagGroup) throws java.lang.Exception
- Throws:
java.lang.Exception
-
requestGroupExecutionImpl
protected abstract void requestGroupExecutionImpl(java.lang.String provider, java.lang.String tagGroup) throws java.lang.Exception
- Throws:
java.lang.Exception
-
queryTagHistory
public Dataset queryTagHistory(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
queryTagHistoryImpl
protected abstract Dataset queryTagHistoryImpl(java.util.List<QualifiedPath> paths, java.util.Date startDate, java.util.Date endDate, int returnSize, Aggregate aggregationMode, ReturnFormat format, java.util.List<java.lang.String> aliases, java.util.List<Aggregate> colAggModes, Flags queryFlags, int timeout) throws java.lang.Exception
- Throws:
java.lang.Exception
-
queryTagCalculations
public Dataset queryTagCalculations(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
queryTagCalculationsImpl
protected abstract Dataset queryTagCalculationsImpl(java.util.List<QualifiedPath> paths, java.util.List<Aggregate> colAggModes, java.util.Date startDate, java.util.Date endDate, java.util.List<java.lang.String> aliases, Flags queryFlags) throws java.lang.Exception
- Throws:
java.lang.Exception
-
queryTagDensity
public Dataset queryTagDensity(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
queryTagDensityImpl
protected abstract Dataset queryTagDensityImpl(java.util.List<QualifiedPath> paths, java.util.Date startDate, java.util.Date endDate) throws java.lang.Exception
- Throws:
java.lang.Exception
-
browseHistoricalTags
public Results browseHistoricalTags(org.python.core.PyObject[] pyArgs, java.lang.String[] keywords)
-
storeAnnotations
public java.util.List<QualifiedValue> storeAnnotations(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
deleteAnnotations
public java.util.List<QualityCode> deleteAnnotations(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
storeAnnotationsImpl
protected abstract java.util.List<QualifiedValue> storeAnnotationsImpl(java.util.List<Annotation> annotations)
-
queryAnnotations
public java.util.List<Annotation> queryAnnotations(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
queryAnnotationsImpl
protected abstract java.util.List<Annotation> queryAnnotationsImpl(java.util.List<Path> paths, java.util.Date start, java.util.Date end, TypeFilter filter)
-
rename
public org.python.core.PyObject rename(org.python.core.PyObject[] objects, java.lang.String[] keywords) throws java.lang.Exception
- Throws:
java.lang.Exception
-
renameImpl
protected abstract QualityCode renameImpl(TagPath tagPath, java.lang.String newName, CollisionPolicy collisionPolicy) throws java.lang.Exception
- Throws:
java.lang.Exception
-
browseHistoricalTagsImpl
protected abstract Results browseHistoricalTagsImpl(QualifiedPath root, BrowseFilter filter)
-
toQualifiedPathFromHistoricalString
protected QualifiedPath toQualifiedPathFromHistoricalString(java.lang.String path)
-
getQualifiedValues
protected abstract java.util.concurrent.CompletableFuture<java.util.List<QualifiedValue>> getQualifiedValues(java.util.List<TagPath> tagPaths)
-
exists
public boolean exists(java.lang.String tagPathStr)
-
getTagConfigurationModel
protected abstract TagConfigurationModel getTagConfigurationModel(TagPath path) throws java.lang.Exception
- Throws:
java.lang.Exception
-
interpretRange
protected AbstractTagUtilities.DateRange interpretRange(PyArgumentMap args)
-
getAggregateFor
protected Aggregate getAggregateFor(java.lang.String value) throws java.lang.Exception
Returns an aggregate for the string. This will either be: a value of AggregationMode, a path to a function under the shared scripting library, or a python function prefaced with "python:". Returns null if none of these is true.- Throws:
java.lang.Exception
-
canEditForProvider
protected abstract boolean canEditForProvider(java.lang.String provider)
-
-