public abstract class AbstractUserCauseRestriction extends JobRestriction
StartedByUserRestriction
,
StartedByMemberOfGroupRestriction
,
Serialized FormDEFAULT
Constructor and Description |
---|
AbstractUserCauseRestriction(boolean checkUpstreamProjects) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
acceptsUser(String userId)
Check if the method accepts the specified user.
|
boolean |
canTake(hudson.model.Queue.BuildableItem item)
Check if the
Queue item can be taken. |
boolean |
canTake(hudson.model.Run run)
Check if the
Job can be executed according to the specified Run . |
boolean |
isCheckUpstreamProjects() |
all, allDescriptors, getDescriptor
public AbstractUserCauseRestriction(boolean checkUpstreamProjects)
public final boolean isCheckUpstreamProjects()
protected abstract boolean acceptsUser(@CheckForNull String userId)
AbstractUserCauseRestriction
.userId
- User idpublic boolean canTake(hudson.model.Queue.BuildableItem item)
JobRestriction
Queue
item can be taken.
This method is being used to check if the Node
can take the
specified job. If the job cannot be taken, Jenkins will try to launch
the job on other nodes.canTake
in class JobRestriction
item
- An item to be checkedpublic boolean canTake(hudson.model.Run run)
JobRestriction
Job
can be executed according to the specified Run
.
If the job cannot be executed, it will be aborted by the plugin.canTake
in class JobRestriction
run
- A Run
to be checkedCopyright © 2016–2018. All rights reserved.