Class AbstractTagUtilities
java.lang.Object
com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities
- Direct Known Subclasses:
ClientTagUtilities
Ignition 8 tag scripting functions
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbrowseHistoricalTags
(org.python.core.PyObject[] pyArgs, String[] keywords) protected abstract Results
browseHistoricalTagsImpl
(QualifiedPath root, BrowseFilter filter) protected abstract Results<PyTagDictionary>
browseImpl
(TagPath path, BrowseFilter browseFilter) protected abstract boolean
canEditForProvider
(String provider) final List<org.python.core.PyObject>
List<org.python.core.PyObject>
deleteAnnotations
(org.python.core.PyObject[] objects, String[] keywords) List<org.python.core.PyObject>
deleteTags
(List<String> tagPaths) boolean
protected abstract String
exportInternal
(String filePath, List<TagPath> tagPaths, boolean recursive, String exportType) For the exportType, use "json" or "xml"exportTags
(org.python.core.PyObject[] objects, String[] keywords) protected Aggregate
getAggregateFor
(String value) Returns an aggregate for the string.getConfiguration
(org.python.core.PyObject[] objects, String[] keywords) protected abstract List<TagConfigurationModel>
getConfigurationImpl
(List<TagPath> basePaths, boolean recursive) protected abstract CompletableFuture<List<QualifiedValue>>
getQualifiedValues
(List<TagPath> tagPaths) protected abstract TagConfigurationModel
protected abstract List<QualityCode>
importInternal
(TagPath basePath, String fileAsStr, String importType, CollisionPolicy cp) List<org.python.core.PyObject>
importTags
(org.python.core.PyObject[] objects, String[] keywords) Imports the JSON tag file at the provided path.protected AbstractTagUtilities.DateRange
interpretRange
(PyArgumentMap args) List<org.python.core.PyObject>
protected abstract List<QualityCode>
moveImpl
(List<TagPath> source, TagPath dest, boolean copy, CollisionPolicy policy) protected Results<PyTagDictionary>
nodeDescriptionToDictionary
(TagPath path, Results<NodeDescription> results) protected static TagPath
parseTagPath
(String path) Parses the tag path, using some special values from ScriptContext when appropriate for the default source, and to de-relativize if possible.parseTagPaths
(List<String> tagPaths) queryAnnotations
(org.python.core.PyObject[] objects, String[] keywords) protected abstract List<Annotation>
queryAnnotationsImpl
(List<Path> paths, Date start, Date end, TypeFilter filter) protected abstract Results<PyTagDictionary>
queryImpl
(String provider, TagQueryFilter queryFilter) queryTagCalculations
(org.python.core.PyObject[] objects, String[] keywords) protected abstract Dataset
queryTagCalculationsImpl
(List<QualifiedPath> paths, List<Aggregate> colAggModes, Date startDate, Date endDate, List<String> aliases, Flags queryFlags) queryTagDensity
(org.python.core.PyObject[] objects, String[] keywords) protected abstract Dataset
queryTagDensityImpl
(List<QualifiedPath> paths, Date startDate, Date endDate) queryTagHistory
(org.python.core.PyObject[] objects, String[] keywords) protected abstract Dataset
queryTagHistoryImpl
(List<QualifiedPath> paths, Date startDate, Date endDate, int returnSize, Aggregate aggregationMode, ReturnFormat format, List<String> aliases, List<Aggregate> colAggModes, Flags queryFlags, int timeout) void
protected abstract void
readAsyncImpl
(List<TagPath> tagPaths, org.python.core.PyObject callback) readBlocking
(org.python.core.PyObject[] objects, String[] keywords) protected abstract List<QualifiedValue>
readBlockingImpl
(List<TagPath> tagPaths, int timeoutMillis) protected abstract List<QualityCode>
removeTagsImpl
(List<TagPath> tagPaths) org.python.core.PyObject
protected abstract QualityCode
renameImpl
(TagPath tagPath, String newName, CollisionPolicy collisionPolicy) void
requestGroupExecution
(String provider, String tagGroup) protected abstract void
requestGroupExecutionImpl
(String provider, String tagGroup) protected abstract List<QualityCode>
saveTagConfigs
(String provider, List<TagConfiguration> tagEdits, CollisionPolicy policy) Processes tag edits.storeAnnotations
(org.python.core.PyObject[] objects, String[] keywords) protected abstract List<QualifiedValue>
storeAnnotationsImpl
(List<Annotation> annotations) void
storeTagHistory
(org.python.core.PyObject[] pyArgs, String[] keywords) protected abstract void
storeTagHistoryImpl
(org.python.core.PyObject[] pyArgs, String[] keywords) protected QualifiedPath
void
writeAsync
(org.python.core.PyObject[] objects, String[] keywords) protected abstract void
writeAsyncImpl
(List<TagPath> tagPaths, List<Object> values, org.python.core.PyObject callback) writeBlocking
(org.python.core.PyObject[] objects, String[] keywords) protected abstract List<QualityCode>
writeBlockingImpl
(List<TagPath> tagPaths, List<Object> values, int timeoutMillis)
-
Field Details
-
DEFAULT_TIMEOUT_MILLIS
public static final int DEFAULT_TIMEOUT_MILLIS- See Also:
-
-
Constructor Details
-
AbstractTagUtilities
public AbstractTagUtilities()
-
-
Method Details
-
parseTagPath
Parses the tag path, using some special values from ScriptContext when appropriate for the default source, and to de-relativize if possible.- Throws:
IOException
-
parseTagPaths
- Throws:
Exception
-
getConfiguration
public PyTagList getConfiguration(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
getConfigurationImpl
protected abstract List<TagConfigurationModel> getConfigurationImpl(List<TagPath> basePaths, boolean recursive) throws Exception - Throws:
Exception
-
configure
public final List<org.python.core.PyObject> configure(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
saveTagConfigs
protected abstract List<QualityCode> saveTagConfigs(String provider, 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 List<org.python.core.PyObject> importTags(org.python.core.PyObject[] objects, String[] keywords) throws 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:
Exception
-
importInternal
protected abstract List<QualityCode> importInternal(TagPath basePath, String fileAsStr, String importType, CollisionPolicy cp) throws Exception - Throws:
Exception
-
copy
public List<org.python.core.PyObject> copy(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
move
public List<org.python.core.PyObject> move(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
moveImpl
protected abstract List<QualityCode> moveImpl(List<TagPath> source, TagPath dest, boolean copy, CollisionPolicy policy) throws Exception - Throws:
Exception
-
nodeDescriptionToDictionary
protected Results<PyTagDictionary> nodeDescriptionToDictionary(TagPath path, Results<NodeDescription> results) -
browse
public Results.PyWrapper<PyTagDictionary> browse(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
browseImpl
-
query
public Results.PyWrapper<PyTagDictionary> query(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
queryImpl
-
readAsync
- Throws:
Exception
-
readAsyncImpl
-
readBlocking
public List<QualifiedValue> readBlocking(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
readBlockingImpl
-
writeAsync
- Throws:
Exception
-
writeAsyncImpl
-
writeBlocking
public List<QualityCode> writeBlocking(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
writeBlockingImpl
-
exportTags
- Throws:
Exception
-
exportInternal
protected abstract String exportInternal(String filePath, List<TagPath> tagPaths, boolean recursive, String exportType) throws Exception For the exportType, use "json" or "xml"- Throws:
Exception
-
deleteTags
- Throws:
Exception
-
removeTagsImpl
- Throws:
Exception
-
requestGroupExecution
- Throws:
Exception
-
requestGroupExecutionImpl
protected abstract void requestGroupExecutionImpl(String provider, String tagGroup) throws Exception - Throws:
Exception
-
storeTagHistory
- Throws:
Exception
-
storeTagHistoryImpl
protected abstract void storeTagHistoryImpl(org.python.core.PyObject[] pyArgs, String[] keywords) throws Exception - Throws:
Exception
-
queryTagHistory
public Dataset queryTagHistory(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
queryTagHistoryImpl
protected abstract Dataset queryTagHistoryImpl(List<QualifiedPath> paths, Date startDate, Date endDate, int returnSize, Aggregate aggregationMode, ReturnFormat format, List<String> aliases, List<Aggregate> colAggModes, Flags queryFlags, int timeout) throws Exception - Throws:
Exception
-
queryTagCalculations
public Dataset queryTagCalculations(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
queryTagCalculationsImpl
protected abstract Dataset queryTagCalculationsImpl(List<QualifiedPath> paths, List<Aggregate> colAggModes, Date startDate, Date endDate, List<String> aliases, Flags queryFlags) throws Exception - Throws:
Exception
-
queryTagDensity
public Dataset queryTagDensity(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
queryTagDensityImpl
protected abstract Dataset queryTagDensityImpl(List<QualifiedPath> paths, Date startDate, Date endDate) throws Exception - Throws:
Exception
-
browseHistoricalTags
-
storeAnnotations
public List<QualifiedValue> storeAnnotations(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
deleteAnnotations
public List<QualityCode> deleteAnnotations(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
storeAnnotationsImpl
-
queryAnnotations
public List<Annotation> queryAnnotations(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
queryAnnotationsImpl
protected abstract List<Annotation> queryAnnotationsImpl(List<Path> paths, Date start, Date end, TypeFilter filter) -
rename
public org.python.core.PyObject rename(org.python.core.PyObject[] objects, String[] keywords) throws Exception - Throws:
Exception
-
renameImpl
protected abstract QualityCode renameImpl(TagPath tagPath, String newName, CollisionPolicy collisionPolicy) throws Exception - Throws:
Exception
-
browseHistoricalTagsImpl
-
toQualifiedPathFromHistoricalString
-
getQualifiedValues
protected abstract CompletableFuture<List<QualifiedValue>> getQualifiedValues(List<TagPath> tagPaths) -
exists
-
getTagConfigurationModel
- Throws:
Exception
-
interpretRange
-
getAggregateFor
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:
Exception
-
canEditForProvider
-