Class AbstractUserCauseRestriction
java.lang.Object
com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction
com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.AbstractUserCauseRestriction
- All Implemented Interfaces:
ExtensionPoint,Describable<JobRestriction>,Serializable
- Direct Known Subclasses:
StartedByMemberOfGroupRestriction,StartedByUserRestriction
Abstract class, which defines the logic of UserCause-based restrictions.
- Since:
- 0.4
- Author:
- Christopher Suarez, Oleg Nenashev
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanacceptsUser(String userId) Check if the method accepts the specified user.booleancanTake(Queue.BuildableItem item) Check if theQueueitem can be taken.booleanfinal booleanMethods inherited from class com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction
all, allDescriptors, getDescriptor
-
Constructor Details
-
AbstractUserCauseRestriction
public AbstractUserCauseRestriction(boolean checkUpstreamProjects)
-
-
Method Details
-
isCheckUpstreamProjects
public final boolean isCheckUpstreamProjects() -
acceptsUser
Check if the method accepts the specified user. The user will be automatically extracted by the logic inAbstractUserCauseRestriction.- Parameters:
userId- User id- Returns:
- true if the restriction accepts the user
-
canTake
Description copied from class:JobRestrictionCheck 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.- Specified by:
canTakein classJobRestriction- Parameters:
item- An item to be checked- Returns:
- true if the node can take the item
-
canTake
Description copied from class:JobRestrictionCheck if theJobcan be executed according to the specifiedRun. If the job cannot be executed, it will be aborted by the plugin.- Specified by:
canTakein classJobRestriction- Parameters:
run- ARunto be checked- Returns:
- true if the build can be executed
-