Interface TagsManager

    • Method Detail

      • findAll

        @NotNull
        java.util.List<Build> findAll​(java.lang.String tag)
        Returns all finished builds marked with the specified public tag.
        Parameters:
        tag - specified tag.
        Returns:
        all builds marked with the specified tag. Ordered by vcs revisions, most recent first.
      • findAll

        @NotNull
        java.util.List<Build> findAll​(java.lang.String tag,
                                      User user)
        Returns all finished builds marked with the specified private tag by provided user
        Parameters:
        tag - specified tag.
        user - user.
        Returns:
        all builds marked with the specified tag. Ordered by vcs revisions, most recent first.
      • findAll

        @NotNull
        java.util.List<Build> findAll​(java.lang.String tag,
                                      @NotNull
                                      BuildType configuration)
        Returns all finished builds marked with the specified public tag for the specified configuration.
        Parameters:
        tag - specified tag.
        configuration - specified configuration.
        Returns:
        all builds marked with the specified tag for the specified configuration. Ordered by vcs revisions, most recent first.
      • findAllPromotions

        @NotNull
        java.util.List<BuildPromotion> findAllPromotions​(java.lang.String tag)
        Returns all promotions marked with the specified public tag. Resulting collection contains promotions for all builds (including personal) in any state (queued, running, finished, interrupted, cancelled)
        Parameters:
        tag - specified tag.
        Returns:
        all promotions marked with the specified tag. Ordered by vcs revisions, most recent first.
        Since:
        9.0
      • findAllPromotions

        @NotNull
        java.util.List<BuildPromotion> findAllPromotions​(java.lang.String tag,
                                                         @NotNull
                                                         BuildType configuration)
        Returns all promotions marked with the specified public tag for the specified configuration. Resulting collection contains promotions for all builds (including personal) in any state (queued, running, finished, interrupted, cancelled)
        Parameters:
        tag - specified tag.
        configuration - specified configuration.
        Returns:
        all promotions marked with the specified tag for the specified configuration. Ordered by vcs revisions, most recent first.
        Since:
        9.0
      • getAllTags

        @NotNull
        java.util.List<java.lang.String> getAllTags​(@NotNull
                                                    Build build)
        Returns all public tags assigned for the specified build.
        Parameters:
        build - specified build instance.
        Returns:
        all tags assigned for the specified build, ordered by name.
      • getTagDatas

        @NotNull
        java.util.Collection<TagData> getTagDatas​(@NotNull
                                                  BuildPromotion build)
        Returns all public and private tags assigned for the specified promotion. Uniqueness of labels is supported, any order is not applied.
        Parameters:
        build - specified build instance.
        Returns:
        all tags assigned for the specified promotion, ordered by name.
        Since:
        9.0
      • setTags

        @Deprecated
        void setTags​(java.util.List<java.lang.String> tags,
                     @NotNull
                     SBuild build)
        Changes public tag set for the specified build.
        Parameters:
        tags - specified tag set.
        build - specified build.
      • setTags

        @Deprecated
        void setTags​(User user,
                     java.util.List<java.lang.String> tags,
                     @NotNull
                     SBuild build)
        Changes public tag set for the specified build.
        Parameters:
        user - user who set specified tags - the user who performs the action, not a owner for private tags
        tags - specified public tag set.
        build - specified build.
        Since:
        4.0.1
      • getAllTags

        @NotNull
        java.util.List<java.lang.String> getAllTags​(@NotNull
                                                    BuildType buildType)
        Returns all public tags assigned to configuration builds.
        Parameters:
        buildType - specified configuration.
        Returns:
        all tags assigned to configuration builds, ordered by name.
      • getAllTagDatas

        @NotNull
        java.util.Set<TagData> getAllTagDatas​(@NotNull
                                              BuildType buildType)
        Returns all public and private tags assigned to configuration builds.
        Parameters:
        buildType - specified configuration.
        Returns:
        all tags assigned to configuration builds, ordered by name.
        Since:
        9.0
      • setTagDatas

        void setTagDatas​(@NotNull
                         BuildPromotion buildPromotion,
                         @NotNull
                         java.util.Collection<TagData> tags)
        Change tag set to the specified build promotion, both public and private TagData All old tags related to the specified promotion will be removed, new tag set will be added.
        Parameters:
        buildPromotion - build promotion to tag
        tags - tags
        Since:
        9.0
      • addTagDatas

        void addTagDatas​(@NotNull
                         BuildPromotion buildPromotion,
                         @NotNull
                         java.util.Collection<TagData> tags)
        Add tag set to the specified build promotion. All old tags stay unchanged, both public and private TagData
        Parameters:
        buildPromotion - build promotion to tag
        tags - tags
        Since:
        9.0
      • removeTagDatas

        int removeTagDatas​(@NotNull
                           BuildPromotion buildPromotion,
                           @NotNull
                           java.util.Collection<TagData> tags)
        Remove particular tags from the specified build promotion.
        Parameters:
        buildPromotion - build promotion to tag
        tags - tags
        Returns:
        count of tags that were removed, if some tags from tags set were not found no exception will be raised
        Since:
        9.0
      • clearTagDatas

        void clearTagDatas​(@NotNull
                           BuildPromotion buildPromotion)
        Remove all tags from the specified build promotion.
        Parameters:
        buildPromotion - build promotion to tag
        Since:
        9.0
      • replacePublicTags

        void replacePublicTags​(@NotNull
                               BuildPromotion buildPromotion,
                               @NotNull
                               java.util.List<java.lang.String> tagLabels)
        Replace existing public tags with public tags created from provided labels
        Parameters:
        buildPromotion - build promotion to tag
        tagLabels - tag labels
        Since:
        9.0