Class BuildParameterStrategy
- java.lang.Object
-
- jenkins.advancedqueue.priority.PriorityStrategy
-
- jenkins.advancedqueue.priority.strategy.AbstractDynamicPriorityStrategy
-
- jenkins.advancedqueue.priority.strategy.BuildParameterStrategy
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PriorityStrategy>
public class BuildParameterStrategy extends AbstractDynamicPriorityStrategy
- Since:
- 2.0
- Author:
- Magnus Sandberg
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BuildParameterStrategy.BuildParameterStrategyDescriptor
-
Nested classes/interfaces inherited from class jenkins.advancedqueue.priority.strategy.AbstractDynamicPriorityStrategy
AbstractDynamicPriorityStrategy.AbstractDynamicPriorityStrategyDescriptor
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description BuildParameterStrategy(String parameterName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getParameterName()
int
getPriority(Queue.Item item)
Gets priority of the queue item.boolean
isApplicable(Queue.Item item)
Method that checks if strategy can assign a priority to the providedQueue.Item
The caller guaranties that theQueue.Item.task
is aJob
-
Methods inherited from class jenkins.advancedqueue.priority.strategy.AbstractDynamicPriorityStrategy
getDescriptor, numberPrioritiesUpdates
-
Methods inherited from class jenkins.advancedqueue.priority.PriorityStrategy
all
-
-
-
-
Constructor Detail
-
BuildParameterStrategy
@DataBoundConstructor public BuildParameterStrategy(String parameterName)
-
-
Method Detail
-
getParameterName
public String getParameterName()
-
getPriority
public int getPriority(@NonNull Queue.Item item)
Gets priority of the queue item.- Specified by:
getPriority
in classPriorityStrategy
- Parameters:
item
- Queue item- Returns:
- Priority if it can be determined. Default priority otherwise
-
isApplicable
public boolean isApplicable(@NonNull Queue.Item item)
Description copied from class:PriorityStrategy
Method that checks if strategy can assign a priority to the providedQueue.Item
The caller guaranties that theQueue.Item.task
is aJob
- Specified by:
isApplicable
in classPriorityStrategy
- Parameters:
item
- theQueue.Item
to check- Returns:
true
if thePriorityStrategy
is applicable elsefalse
-
-