Class ProjectDefaultTagManagerFacade

  • All Implemented Interfaces:
    TagManager, TagHistoryManager

    public abstract class ProjectDefaultTagManagerFacade
    extends java.lang.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
    • Constructor Detail

      • ProjectDefaultTagManagerFacade

        public ProjectDefaultTagManagerFacade​(GatewayContext context,
                                              LoggerEx logger)
    • Method Detail

      • matches

        public boolean matches​(java.lang.String defaultTagProvider,
                               java.lang.String defaultDatabaseName)
      • getDefaultTagProvider

        @Nullable
        protected abstract java.lang.String getDefaultTagProvider()
      • getDefaultDatabaseName

        @Nullable
        protected abstract java.lang.String getDefaultDatabaseName()
      • moveTagsAsync

        public java.util.concurrent.CompletableFuture<java.util.List<QualityCode>> moveTagsAsync​(java.util.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 interface TagManager
      • importTagsAsync

        public 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 create a new tag with a similar name (MyTag becomes MyTag1).
      • setDefaultTagProvider

        public void setDefaultTagProvider​(java.lang.String newProvider)
      • getTagHistoryProviders

        public java.util.List<java.lang.String> 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 interface TagHistoryManager
      • queryHistoryDensity

        public void queryHistoryDensity​(StreamingDatasetWriter writer,
                                        java.util.List<? extends Path> paths,
                                        java.util.Date start,
                                        java.util.Date end)
                                 throws java.lang.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 interface TagHistoryManager
        Throws:
        java.lang.Exception