Interface BuildTypeTemplate

    • Method Detail

      • getId

        @NotNull
        java.lang.String getId()
        Returns the internal identifier (that is used inside the database).
        Returns:
        the internal identifier.
        See Also:
        BuildTypeIdentity.getExternalId()
      • getDescription

        @NotNull
        java.lang.String getDescription()
        Returns:
        template description
        Since:
        2018.1
      • setDescription

        void setDescription​(@NotNull
                            java.lang.String description)
                     throws ReadOnlyEntityException
        Sets template description
        Parameters:
        description - template description
        Throws:
        ReadOnlyEntityException
        Since:
        2018.1
      • persist

        void persist()
        Persist this template settings, should be called after settings modifications to preserve template state.
        Specified by:
        persist in interface BuildTypeSettings
        Specified by:
        persist in interface SPersistentEntity
      • getUsages

        java.util.Collection<SBuildType> getUsages()
        Returns collection of build configurations attached to this template. This does not include the build configurations that use this template because it is defined as default template in the respective projects
        Returns:
        see above.
      • getAllUsages

        java.util.Collection<SBuildType> getAllUsages()
        Same as #getUsages() but also returns configurations that use this template as default template
        Returns:
        see above
        Since:
        2020.2
      • getUsagesAsDefaultTemplate

        java.util.Collection<SProject> getUsagesAsDefaultTemplate()
        Returns collection of projects where this template is used as a default template. This does not include projects that use it as a default template because it is set up as such in one of the higher level projects in their paths
        Returns:
        see above
        Since:
        2017.2
      • getNumberOfUsages

        int getNumberOfUsages()
        Returns total number of this template usages (without permissions filtering) in build configurations
        Returns:
        see above
      • getNumberOfUsagesAsDefaultTemplate

        int getNumberOfUsagesAsDefaultTemplate()
        Returns total number of projects (without permissions filtering) using this template as a default template
        Returns:
        see above
        Since:
        2017.2
      • getParentProject

        @NotNull
        @Deprecated
        SProject getParentProject()
        Deprecated.
        Returns project to which this template belongs
        Returns:
        see above
      • getParentProjectId

        @NotNull
        @Deprecated
        java.lang.String getParentProjectId()
        Deprecated.
        Returns id of the project to which this template belongs
        Returns:
        see above
        Since:
        6.5
      • getProjectId

        @NotNull
        java.lang.String getProjectId()
        Returns internal id of the project to which this template belongs
        Returns:
        see above
        Since:
        6.5
      • applyRunnersOrder

        void applyRunnersOrder​(@NotNull
                               java.lang.String[] ids)
                        throws ReadOnlyEntityException
        Changes order of build runners in this template and in all of the inherited build configurations. Note that after that persist operation invoked on the template will also persist inherited build configurations.
        Specified by:
        applyRunnersOrder in interface BuildTypeSettings
        Parameters:
        ids - runner identifiers
        Throws:
        ReadOnlyEntityException
      • belongsTo

        boolean belongsTo​(@NotNull
                          SProject project)
        Returns true if the specified project or some of its subprojects (not only direct) contains this build configuration template.
        Specified by:
        belongsTo in interface BuildTypeIdentity
        Parameters:
        project - project
        Returns:
        see above
        Since:
        8.0
      • isAccessibleFrom

        boolean isAccessibleFrom​(@NotNull
                                 SProject project)
        Returns true if this template is accessible from specified project, i.e. it belongs to this project or to some of its parents
        Parameters:
        project - project to check
        Returns:
        see above
        Since:
        8.0