Class JobTriggerLockAction
java.lang.Object
io.jenkins.plugins.batchcontrol.action.JobTriggerLockAction
- All Implemented Interfaces:
Action,ModelObject
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class JobTriggerLockAction
extends Object
implements Action
The job-page notice for blocked unattended triggers (SPEC item 6). A job whose
blockTimer or blockUpstream switch is on refuses those runs with nobody to tell,
so its main page (jobMain.jelly, included for every action by both the Freestyle and the
Pipeline job page) names the switch and says it is cleared in the job configuration, which is
change-controlled.
The action has no sidebar entry and no URL (getIconFileName() and
getUrlName() are null); it is attached to every job by
JobRequestActionFactory and decides from getBlockingSwitches() whether there
is anything to show. It never changes state.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe switches that refuse unattended runs of this job right now, for a viewer holdingItem/Read, whether or not the job requires approval for manual runs; empty when run control is off, both switches are off, or the viewer may not read the job (the notice is then not rendered).Job<?, ?> getJob()getLinks()Link predicates: the Grants screen is linked only for a user who may open it.booleanWhether the viewer may open the job configuration, so the notice links to it.booleanWhether change control is on, so clearing a switch needs a permission window.booleanWhetherblockTimeris refusing cron runs (Jelly).booleanWhetherblockUpstreamis refusing upstream-triggered runs (Jelly).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Action
getDescription, getEvent, getGroup, getSemantic, isVisibleInContextMenu
-
Constructor Details
-
JobTriggerLockAction
-
-
Method Details
-
getJob
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getBlockingSwitches
The switches that refuse unattended runs of this job right now, for a viewer holdingItem/Read, whether or not the job requires approval for manual runs; empty when run control is off, both switches are off, or the viewer may not read the job (the notice is then not rendered). -
isTimerBlocked
public boolean isTimerBlocked()WhetherblockTimeris refusing cron runs (Jelly). -
isUpstreamBlocked
public boolean isUpstreamBlocked()WhetherblockUpstreamis refusing upstream-triggered runs (Jelly). -
isCanConfigure
public boolean isCanConfigure()Whether the viewer may open the job configuration, so the notice links to it. -
isChangeControlEnabled
public boolean isChangeControlEnabled()Whether change control is on, so clearing a switch needs a permission window. -
getLinks
Link predicates: the Grants screen is linked only for a user who may open it.
-