jetbrains.buildServer.serverSide.vcs
Interface VcsLabelManager

All Superinterfaces:
ServerExtension, TeamCityExtension

public interface VcsLabelManager
extends ServerExtension

Updates and provides information about vcs labels made by TeamCity


Method Summary
 java.util.List<VcsLabel> getLabels(Build build)
          Returns all labels for the gixen build
 java.lang.String getLabelText(SBuild build)
          Returns label text for the build.
 boolean isLabelingSupported(SBuild build, VcsRootInstance root)
          Returns if it is possible to label the given build on the given vcs root.
 void setLabel(SBuild build, java.lang.String labelValue, java.util.List<VcsRootInstance> rootsToLabel)
          Sets label for the specified build on the specified vcs roots.
 

Method Detail

getLabels

@NotNull
java.util.List<VcsLabel> getLabels(@NotNull
                                           Build build)
Returns all labels for the gixen build

Parameters:
build - specified build instance.
Returns:
collection of labels set by TeamCity for the given build sources.

getLabelText

java.lang.String getLabelText(@NotNull
                              SBuild build)
                              throws ParametersResolvingFailedException
Returns label text for the build.

Parameters:
build - specified build.
Returns:
label value.
Throws:
ParametersResolvingFailedException - if label contains references to parameters for which values cannot be found

setLabel

void setLabel(@NotNull
              SBuild build,
              @NotNull
              java.lang.String labelValue,
              @NotNull
              java.util.List<VcsRootInstance> rootsToLabel)
              throws VcsException
Sets label for the specified build on the specified vcs roots.

Parameters:
build - specified build.
labelValue - specified label text.
rootsToLabel - roots to label list.
Throws:
VcsException - problem to set label in version control.

isLabelingSupported

boolean isLabelingSupported(@NotNull
                            SBuild build,
                            @NotNull
                            VcsRootInstance root)
Returns if it is possible to label the given build on the given vcs root.

Parameters:
build - specified build.
root - specified root.
Returns:
true if the root supports labeling and revision of the root fpr the build is not a null, false otherwise.