Class ProjectDefaultTagManagerFacade
java.lang.Object
com.inductiveautomation.ignition.gateway.tags.model.ProjectDefaultTagManagerFacade
- All Implemented Interfaces:
TagManager
,TagHistoryManager
public abstract class ProjectDefaultTagManagerFacade
extends Object
implements TagManager, TagHistoryManager
A tag manager that translates tag paths sources between the "default" source of empty string and the absolute name of
a project's default tag provider
-
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.common.tags.model.TagManager
BROWSE_LOCAL_SYSTEM, DATA_SOURCE_OPC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbrowseAsync
(TagPath tagPath, BrowseFilter filter) browseAsync
(TagPath tagPath, BrowseFilter filter, SecurityContext securityContext) browseHistoricalTags
(QualifiedPath root, BrowseFilter filter) browseHistoricalTags
(QualifiedPath root, BrowseFilter filter, boolean bustCache) browseTagDataSourcesAsync
(String provider, BrowseElement root, BrowseFilter filter) protected abstract String
protected abstract String
getDiagnosticsAsync
(TagPath path) getTagConfigModelAsync
(String provider) getTagGroupConfigModelAsync
(String provider) getTagGroupsAsync
(String provider) Returns the names of all of the registered tag history providers.importTagsAsync
(TagPath basePath, String importText, String importType, CollisionPolicy collisionPolicy) importTagsAsync
(TagPath basePath, String importText, String importType, CollisionPolicy collisionPolicy, SecurityContext securityContext) boolean
moveTagsAsync
(List<TagPath> tags, TagPath destination, boolean copy, CollisionPolicy collisionPolicy, SecurityContext securityContext) Copies tags from any sources to a specific destination.queryAnnotations
(List<? extends Path> path, Date start, Date end, TypeFilter filter) void
queryHistory
(TagHistoryQueryParams query, StreamingDatasetWriter writer) Queries the tag history system for the data as defined by the query parameters.void
queryHistoryDensity
(StreamingDatasetWriter writer, List<? extends Path> paths, Date start, Date end) Queries the tag store for data density information.readAsync
(List<TagPath> tagPaths, SecurityContext security) void
setDefaultTagProvider
(String newProvider) storeAnnotations
(List<Annotation> annotations) Stores the given annotations.subscribeAsync
(List<TagPath> paths, List<TagChangeListener> listeners) unsubscribeAsync
(List<TagPath> paths, List<TagChangeListener> listeners) writeAsync
(List<TagPath> tagPaths, List<Object> values, SecurityContext security) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.common.tags.model.TagManager
moveTagsAsync, readAsync, reinitializeTags, subscribeAsync, unsubscribeAsync, writeAsync
-
Constructor Details
-
ProjectDefaultTagManagerFacade
-
-
Method Details
-
matches
-
getDefaultTagProvider
-
getDefaultDatabaseName
-
browseTagDataSourcesAsync
public CompletableFuture<Results<BrowseElement>> browseTagDataSourcesAsync(String provider, BrowseElement root, BrowseFilter filter) - Specified by:
browseTagDataSourcesAsync
in interfaceTagManager
-
subscribeAsync
public CompletableFuture<Void> subscribeAsync(List<TagPath> paths, List<TagChangeListener> listeners) - Specified by:
subscribeAsync
in interfaceTagManager
-
unsubscribeAsync
public CompletableFuture<Void> unsubscribeAsync(List<TagPath> paths, List<TagChangeListener> listeners) - Specified by:
unsubscribeAsync
in interfaceTagManager
-
getTagGroupConfigModelAsync
- Specified by:
getTagGroupConfigModelAsync
in interfaceTagManager
-
getTagConfigModelAsync
- Specified by:
getTagConfigModelAsync
in interfaceTagManager
-
getTagGroupsAsync
- Specified by:
getTagGroupsAsync
in interfaceTagManager
-
browseAsync
public CompletableFuture<Results<NodeDescription>> browseAsync(TagPath tagPath, BrowseFilter filter) - Specified by:
browseAsync
in interfaceTagManager
-
browseAsync
public CompletableFuture<Results<NodeDescription>> browseAsync(TagPath tagPath, BrowseFilter filter, SecurityContext securityContext) - Specified by:
browseAsync
in interfaceTagManager
-
readAsync
public CompletableFuture<List<QualifiedValue>> readAsync(List<TagPath> tagPaths, SecurityContext security) - Specified by:
readAsync
in interfaceTagManager
-
writeAsync
public CompletableFuture<List<QualityCode>> writeAsync(List<TagPath> tagPaths, List<Object> values, SecurityContext security) - Specified by:
writeAsync
in interfaceTagManager
-
moveTagsAsync
public CompletableFuture<List<QualityCode>> moveTagsAsync(List<TagPath> tags, TagPath destination, boolean copy, CollisionPolicy collisionPolicy, SecurityContext securityContext) Description copied from interface:TagManager
Copies tags from any sources to a specific destination. Destination may be in a different provider. If the source and destination paths are all in the same provider, and copy is FALSE, it will be treated as a move.- Specified by:
moveTagsAsync
in interfaceTagManager
-
getDiagnosticsAsync
- Specified by:
getDiagnosticsAsync
in interfaceTagManager
-
importTagsAsync
public CompletableFuture<List<QualityCode>> importTagsAsync(TagPath basePath, String importText, String importType, CollisionPolicy collisionPolicy) - Specified by:
importTagsAsync
in interfaceTagManager
- Parameters:
basePath
- tags will be imported using this location as the base. The provider source must be set.importText
- a String holding the contents of the file to importimportType
- The import file type. Use "json", "xml" or "csv". Any other value will return an error.collisionPolicy
- The collision policy to use. Abort will throw an exception on the first tag collision, Ignore will not change the existing tag at all, Overwrite will overwrite the existing tag completely, and Rename will create a new tag with a similar name (MyTag becomes MyTag1).
-
importTagsAsync
public CompletableFuture<List<QualityCode>> importTagsAsync(TagPath basePath, String importText, String importType, CollisionPolicy collisionPolicy, SecurityContext securityContext) - Specified by:
importTagsAsync
in interfaceTagManager
- Parameters:
basePath
- tags will be imported using this location as the base. The provider source must be set.importText
- a String holding the contents of the file to importimportType
- The import file type. Use "json", "xml" or "csv". Any other value will return an error.collisionPolicy
- The collision policy to use. Abort will throw an exception on the first tag collision, Ignore will not change the existing tag at all, Overwrite will overwrite the existing tag completely, and Rename will create a new tag with a similar name (MyTag becomes MyTag1).securityContext
- theSecurityContext
of the user from the call site
-
setDefaultTagProvider
-
browseHistoricalTags
- Specified by:
browseHistoricalTags
in interfaceTagHistoryManager
-
browseHistoricalTags
public Results<Result> browseHistoricalTags(QualifiedPath root, BrowseFilter filter, boolean bustCache) - Specified by:
browseHistoricalTags
in interfaceTagHistoryManager
-
getTagHistoryProviders
Description copied from interface:TagHistoryManager
Returns the names of all of the registered tag history providers. The return list is immutable.- Specified by:
getTagHistoryProviders
in interfaceTagHistoryManager
-
queryHistory
Description copied from interface:TagHistoryManager
Queries the tag history system for the data as defined by the query parameters. The results are written to the providedStreamingDatasetWriter
. This allows results to be streamed and not collected in memory. However, in order to get a simple Dataset result, simply use theBasicStreamingDataset
.- Specified by:
queryHistory
in interfaceTagHistoryManager
-
queryHistoryDensity
public void queryHistoryDensity(StreamingDatasetWriter writer, List<? extends Path> paths, Date start, Date end) throws Exception Description copied from interface:TagHistoryManager
Queries the tag store for data density information. Will return a structure with two columns: a timestamp, and the "weight", which is not really defined, but instead relative across the return set. The weight is valid until the next entry.- Specified by:
queryHistoryDensity
in interfaceTagHistoryManager
- Throws:
Exception
-
queryAnnotations
public List<Annotation> queryAnnotations(List<? extends Path> path, Date start, Date end, TypeFilter filter) - Specified by:
queryAnnotations
in interfaceTagHistoryManager
-
storeAnnotations
Description copied from interface:TagHistoryManager
Stores the given annotations. Returns the new id of the stored annotation, if the quality code is good.- Specified by:
storeAnnotations
in interfaceTagHistoryManager
- Returns:
- a 1-to-1 result for each annotation, with the result quality, and the new storage id if successful.
-