Class JobRestriction
java.lang.Object
com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction
- All Implemented Interfaces:
ExtensionPoint,Describable<JobRestriction>,Serializable
- Direct Known Subclasses:
AbstractUserCauseRestriction,AndJobRestriction,AnyJobRestriction,JobClassNameRestriction,MultipleAndJobRestriction,MultipleOrJobRestriction,NotJobRestriction,OrJobRestriction,RegexNameRestriction
public abstract class JobRestriction
extends Object
implements ExtensionPoint, Describable<JobRestriction>, Serializable
The extension point, which allows to restrict job executions.
- Author:
- Oleg Nenashev
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionall()Get list of all registeredJobRestrictions.static List<JobRestrictionDescriptor>Returns list ofJobRestrictionDescriptors.abstract booleancanTake(Queue.BuildableItem item) Check if theQueueitem can be taken.abstract boolean
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
JobRestriction
public JobRestriction()
-
-
Method Details
-
canTake
Check if theQueueitem can be taken. This method is being used to check if theNodecan take the specified job. If the job cannot be taken, Jenkins will try to launch the job on other nodes.- Parameters:
item- An item to be checked- Returns:
- true if the node can take the item
-
canTake
Check if theJobcan be executed according to the specifiedRun. If the job cannot be executed, it will be aborted by the plugin.- Parameters:
run- ARunto be checked- Returns:
- true if the build can be executed
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<JobRestriction>
-
all
Get list of all registeredJobRestrictions.- Returns:
- List of
JobRestrictions.
-
allDescriptors
Returns list ofJobRestrictionDescriptors.- Returns:
- List of available descriptors.
- Since:
- 0.2
-