Class WaitApprovalBuildPrecondition
- java.lang.Object
 - 
- jetbrains.buildServer.serverSide.impl.buildDistribution.WaitApprovalBuildPrecondition
 
 
- 
- All Implemented Interfaces:
 StartBuildPrecondition,ServerExtension,TeamCityExtension,PositionAware,PositionConstraintAware
public class WaitApprovalBuildPrecondition extends Object implements StartBuildPrecondition, PositionAware
 
- 
- 
Constructor Summary
Constructors Constructor Description WaitApprovalBuildPrecondition(NotificationProcessor notificationProcessor, EventDispatcher<BuildServerListener> dispatcher, UntrustedBuildsManager untrustedBuildsManager, ApprovableBuildManager approvableBuildManager, ProjectManager projectManager, ExecutorServices executorServices) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WaitReasoncanStart(QueuedBuildInfo queuedBuild, Map<QueuedBuildInfo,BuildAgent> canBeStarted, BuildDistributorInput buildDistributorInput, boolean emulationMode)Returns WaitReason if build cannot be started or null if TeamCity can start build.PositionConstraintgetConstraint()Constraint to be respected during objects sorting.StringgetOrderId()Returns object id that can be referenced by {PositionConstraint}voidsetRequiresApprovalAttribute(BuildPromotionEx buildPromotionEx, boolean canceledByTimeout)In case of approval configuration taken from untrusted settings, we need to explicetly set that build required approval at the moment it was allowed to start(or canceled due to approval settings) 
 - 
 
- 
- 
Field Detail
- 
ORDER_ID
public static final String ORDER_ID
 
 - 
 
- 
Constructor Detail
- 
WaitApprovalBuildPrecondition
public WaitApprovalBuildPrecondition(@NotNull NotificationProcessor notificationProcessor, @NotNull EventDispatcher<BuildServerListener> dispatcher, @NotNull UntrustedBuildsManager untrustedBuildsManager, @NotNull ApprovableBuildManager approvableBuildManager, @NotNull ProjectManager projectManager, @NotNull ExecutorServices executorServices) 
 - 
 
- 
Method Detail
- 
canStart
@Nullable public WaitReason canStart(@NotNull QueuedBuildInfo queuedBuild, @NotNull Map<QueuedBuildInfo,BuildAgent> canBeStarted, @NotNull BuildDistributorInput buildDistributorInput, boolean emulationMode)
Description copied from interface:StartBuildPreconditionReturns WaitReason if build cannot be started or null if TeamCity can start build.- Specified by:
 canStartin interfaceStartBuildPrecondition- Parameters:
 queuedBuild- snapshot of a queued buildcanBeStarted- contains map of builds already distributed among agents. Values can be null to indicate virtual agents.buildDistributorInput- input data for the build distributoremulationMode- true if extension is called from the build estimator- Returns:
 - see above
 
 
- 
setRequiresApprovalAttribute
public void setRequiresApprovalAttribute(@NotNull BuildPromotionEx buildPromotionEx, boolean canceledByTimeout)In case of approval configuration taken from untrusted settings, we need to explicetly set that build required approval at the moment it was allowed to start(or canceled due to approval settings) 
- 
getConstraint
@NotNull public PositionConstraint getConstraint()
Description copied from interface:PositionConstraintAwareConstraint to be respected during objects sorting.- Specified by:
 getConstraintin interfacePositionConstraintAware- Returns:
 - position constraint
 
 
- 
getOrderId
@NotNull public String getOrderId()
Description copied from interface:PositionAwareReturns object id that can be referenced by {PositionConstraint}- Specified by:
 getOrderIdin interfacePositionAware- Returns:
 - object id
 
 
 - 
 
 -