Class BuildFeature

    • Constructor Detail

      • BuildFeature

        public BuildFeature()
    • Method Detail

      • getType

        @NotNull
        public abstract java.lang.String getType()
        Type of the feature, must be unique among all of the features.
        Returns:
        type of the feature
      • getDisplayName

        @NotNull
        public abstract java.lang.String getDisplayName()
        User presentable name of the feature.
        Specified by:
        getDisplayName in interface Describable
        Returns:
        name of the feature to show in the user interface.
      • describeParameters

        @NotNull
        public java.lang.String describeParameters​(@NotNull
                                                   java.util.Map<java.lang.String,​java.lang.String> params)
        Returns parameters description of the build feature, will be used in the TeamCity UI to describe this feature settings.
        Parameters:
        params - parameters to describe
        Returns:
        short description of parameters.
      • getParametersProcessor

        @Deprecated
        @Nullable
        public PropertiesProcessor getParametersProcessor()
        Deprecated.
        since 2022.04, implement getParametersProcessor(BuildTypeIdentity) instead
        Returns parameters processor which will be used to validate and alter parameters specified by user.
        Returns:
        see above
      • getParametersProcessor

        @Nullable
        public PropertiesProcessor getParametersProcessor​(@NotNull
                                                          BuildTypeIdentity buildTypeOrTemplate)
        Returns parameters processor which will be used to validate and alter parameters specified by user. Unlike the previous method, this one accepts build type or template context
        Parameters:
        buildTypeOrTemplate -
        Returns:
        Since:
        2022.04
      • getEditParametersUrl

        @Nullable
        public abstract java.lang.String getEditParametersUrl()
        Returns:
        absolute path to a JSP file or controller for editing parameters, should not include context path.
      • getDefaultParameters

        @Nullable
        public java.util.Map<java.lang.String,​java.lang.String> getDefaultParameters()
        Returns:
        default parameters
      • isMultipleFeaturesPerBuildTypeAllowed

        public boolean isMultipleFeaturesPerBuildTypeAllowed()
        Returns true if single build type can contain more than one build feature of this type.
        Returns:
        see above
      • isAvailable

        public boolean isAvailable​(BuildTypeSettings buildTypeSettings)
        Parameters:
        buildTypeSettings -
        Returns:
        true if this build feature should be available for a given build type. If false is returned then build feature should not appear on the available features list.
        Since:
        2022.04
      • isRequiresAgent

        public boolean isRequiresAgent()
        Returns:
        true if this build feature has some code which should be executed on the agent during the build. If false is returned then parameters of this feature will not be passed to an agent.
        Since:
        2017.2
      • getRequirements

        @NotNull
        public java.util.Collection<Requirement> getRequirements​(java.util.Map<java.lang.String,​java.lang.String> params)
        Returns agent requirements imposed by this build feature on build agents which can run builds when this feature is enabled
        Parameters:
        params - parameters of the build feature
        Returns:
        see above
        Since:
        2019.1
      • isUnchangedBySettingsFreeze

        public boolean isUnchangedBySettingsFreeze()
        Returns:
        true if the build feature is supposed to stay unchanged by settings freeze. This is important for build features that may affect a build before the settings freeze happens for that build. If any change in such a build feature is taken from VCS after the build is triggered, this change will not affect that build.
        Since:
        2020.1