Interface GatewayTagManager

    • Method Detail

      • getTagProvider

        @Nullable
        @Nullable TagProvider getTagProvider​(@Nonnull
                                             java.lang.String name)
      • getTagProviders

        @Nonnull
        java.util.List<TagProvider> getTagProviders()
      • registerProviderType

        void registerProviderType​(TagProviderExtensionPointType providerType)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unregisterProviderType

        void unregisterProviderType​(TagProviderExtensionPointType providerType)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTagProviderNames

        java.util.List<java.lang.String> getTagProviderNames()
        Returns:
        a list of the names of all available tag providers
      • getOrCreateManagedProvider

        ManagedTagProvider getOrCreateManagedProvider​(ProviderConfiguration config)
        Creates a ManagedTagProvider with the given configuration. If the provider does not exist, it will be created. If it already exists, the configuration will be applied, which _may_ cause the provider to be restarted. Managed Tag Providers are tag providers that are "managed" by outside code, not users. They provide an easy way for module authors and subsystems to provide tag based data to the system.
      • getOrCreateManagedProvider

        ManagedTagProvider getOrCreateManagedProvider​(ProviderConfiguration config,
                                                      boolean forceRestart)
        See getOrCreateManagedProvider(config). This version can force the provider to be recreated, even if the config hasn't changed.
      • getSystemTags

        GatewaySystemTags getSystemTags()
        Returns the tag provider for gateway status tags.
      • addTagStructureListener

        void addTagStructureListener​(java.lang.String provider,
                                     TagStructureListener listener)
        Adds a listener that will be notified when tags are added, removed, or renamed. Will not be notified on initial add.
      • removeTagStructureListener

        void removeTagStructureListener​(java.lang.String provider,
                                        TagStructureListener listener)
        Removes a previously registered tag structure listener.
      • getLicensedTagCount

        int getLicensedTagCount()
        Returns:
        For a limited tag license, returns the number of currently licensed tags. This number will never exceed the tag limit. For an unlimited tag license, 0 is returned.
      • getLicensedTagLimit

        int getLicensedTagLimit()
        Returns:
        For a limited tag license, returns the tag license limit. For an unlimited tag license, 0 is returned.
      • pasteTags

        java.util.concurrent.CompletableFuture<java.util.List<QualityCode>> pasteTags​(java.util.List<TagConfigurationModel> tagConfigs,
                                                                                      TagPath destination,
                                                                                      boolean removeOriginal,
                                                                                      SecurityContext securityContext)
        Copies tagConfigs to the destination path
        Parameters:
        removeOriginal - After copy, remove tags from their original location (Cut/Drag)
      • pasteTags

        default java.util.concurrent.CompletableFuture<java.util.List<QualityCode>> pasteTags​(java.util.List<TagConfigurationModel> tagConfigs,
                                                                                              TagPath destination,
                                                                                              boolean removeOriginal)
      • renameTag

        java.util.concurrent.CompletableFuture<java.util.List<QualityCode>> renameTag​(TagPath tag,
                                                                                      java.lang.String newName,
                                                                                      CollisionPolicy collisionPolicy,
                                                                                      SecurityContext securityContext)
        Renames a tag. This method will not delete and recreate the tag, but will simply update the tag's name property.
        Parameters:
        tag - the TagPath of the tag to rename
        newName - the new tag name
        collisionPolicy - the action to take if another tag with the new name already exists
        Returns:
        a CompletableFuture whose value holds the result of the rename operation
      • renameTag

        default java.util.concurrent.CompletableFuture<java.util.List<QualityCode>> renameTag​(TagPath tag,
                                                                                              java.lang.String newName,
                                                                                              CollisionPolicy collisionPolicy)
      • importTagsAsync

        default java.util.concurrent.CompletableFuture<java.util.List<QualityCode>> importTagsAsync​(TagPath basePath,
                                                                                                    java.lang.String importText,
                                                                                                    java.lang.String importType,
                                                                                                    CollisionPolicy collisionPolicy)
        Specified by:
        importTagsAsync in interface TagManager
        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 import
        importType - 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