Package jetbrains.buildServer.vcs.impl
Class VcsLabeler
- java.lang.Object
 - 
- jetbrains.buildServer.vcs.impl.VcsLabeler
 
 
- 
- All Implemented Interfaces:
 ServerExtension,VcsLabelManager,TeamCityExtension
public class VcsLabeler extends Object implements VcsLabelManager
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_LABEL_MESSAGEstatic StringFEATURE_TOGGLE_CUSTOM_LABEL_MESSAGEstatic StringMANUAL_VCS_LABELING_REPEAT_ATTEMPTS 
- 
Constructor Summary
Constructors Constructor Description VcsLabeler(EventDispatcher<BuildServerListener> dispatcher, VcsRootInstancesManager vcsRootInstancesManager, BuildsManager builds, BranchSpecs specs, ExecutorServiceManager executors, SQLRunnerEx db, ServerResponsibilityEx serverResponsibility, BuildsRelatedMultiNodeTasks buildTasks) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<VcsLabel>getLabels(Build build)Returns all labels for the given buildbooleanisLabelingSupported(SBuild build, VcsRootInstance root)Returns if it is possible to label the given build on the given vcs root.voidlabelingFailed(Build build, VcsRootInstance root, String label, Throwable ex)voidsetLabel(SBuild build, String labelValue, String message, List<VcsRootInstance> rootsToLabel)voidsetLabel(SBuild build, String labelValue, List<VcsRootInstance> rootToLabel)Sets label for the specified build on the specified vcs roots.voidupdateBuildLabel(Build build, VcsRootInstance root, String label, VcsLabel.VcsLabelStatus status, String failureReason) 
 - 
 
- 
- 
Field Detail
- 
MANUAL_VCS_LABELING_REPEAT_ATTEMPTS
public static final String MANUAL_VCS_LABELING_REPEAT_ATTEMPTS
- See Also:
 - Constant Field Values
 
 
- 
FEATURE_TOGGLE_CUSTOM_LABEL_MESSAGE
public static final String FEATURE_TOGGLE_CUSTOM_LABEL_MESSAGE
- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_LABEL_MESSAGE
public static final String DEFAULT_LABEL_MESSAGE
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
VcsLabeler
public VcsLabeler(@NotNull EventDispatcher<BuildServerListener> dispatcher, @NotNull VcsRootInstancesManager vcsRootInstancesManager, @NotNull BuildsManager builds, @NotNull BranchSpecs specs, @NotNull ExecutorServiceManager executors, @NotNull SQLRunnerEx db, @NotNull ServerResponsibilityEx serverResponsibility, @NotNull BuildsRelatedMultiNodeTasks buildTasks) 
 - 
 
- 
Method Detail
- 
updateBuildLabel
public void updateBuildLabel(@NotNull Build build, @NotNull VcsRootInstance root, @NotNull String label, @NotNull VcsLabel.VcsLabelStatus status, @Nullable String failureReason) 
- 
labelingFailed
public void labelingFailed(@NotNull Build build, @NotNull VcsRootInstance root, @NotNull String label, @NotNull Throwable ex) 
- 
getLabels
@NotNull public List<VcsLabel> getLabels(@NotNull Build build)
Description copied from interface:VcsLabelManagerReturns all labels for the given build- Specified by:
 getLabelsin interfaceVcsLabelManager- Parameters:
 build- specified build instance.- Returns:
 - collection of labels set by TeamCity for the given build sources.
 
 
- 
setLabel
public void setLabel(@NotNull SBuild build, @NotNull String labelValue, @NotNull List<VcsRootInstance> rootToLabel) throws VcsExceptionDescription copied from interface:VcsLabelManagerSets label for the specified build on the specified vcs roots.- Specified by:
 setLabelin interfaceVcsLabelManager- Parameters:
 build- specified build.labelValue- specified label text.rootToLabel- roots to label list.- Throws:
 VcsException- problem to set label in version control.
 
- 
setLabel
public void setLabel(@NotNull SBuild build, @NotNull String labelValue, @Nullable String message, @NotNull List<VcsRootInstance> rootsToLabel) throws VcsException- Specified by:
 setLabelin interfaceVcsLabelManager- Throws:
 VcsException
 
- 
isLabelingSupported
public boolean isLabelingSupported(@NotNull SBuild build, @NotNull VcsRootInstance root)Description copied from interface:VcsLabelManagerReturns if it is possible to label the given build on the given vcs root.- Specified by:
 isLabelingSupportedin interfaceVcsLabelManager- Parameters:
 build- specified build.root- specified root.- Returns:
 trueif the root supports labeling and revision of the root fpr the build is not anull,falseotherwise.
 
 - 
 
 -