Class RunApprovalNoticeAction
java.lang.Object
io.jenkins.plugins.batchcontrol.action.RunApprovalNoticeAction
- All Implemented Interfaces:
Action,ModelObject
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class RunApprovalNoticeAction
extends Object
implements Action
The build-page counterpart of the job-page approval notice (SPEC item 6, e2e re-audit DEF-31):
on every build of a job whose manual runs need an approved run request, the build page says so
and links the run request form for a viewer who may submit it. Rebuild and Retry are clicked on
the build page and a refusal there only produces core's generic "Failed." message, so the
explanation has to be where the button is.
Attached by RunApprovalNoticeActionFactory. No sidebar entry and no URL; its
summary.jelly is included by the build page. Every decision is delegated to the job's
JobActivationNoticeAction, so the two notices cannot disagree: shown only to
Item/Read holders while run control is on and the job requires approval; the form is
linked only for a viewer who may submit a run request (BatchControl/Request and
Item/Read, D-38a).
It never changes state.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionJob<?, ?> getJob()booleanWhether the viewer holdsBatchControl/Request.booleanWhether the run request form is linked (JobActivationNoticeAction.isCanRequestRun()).booleanisShown()Whether the notice is rendered (seeJobActivationNoticeAction.isApprovalRequired()).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
-
RunApprovalNoticeAction
-
-
Method Details
-
getJob
-
isShown
public boolean isShown()Whether the notice is rendered (seeJobActivationNoticeAction.isApprovalRequired()). -
isCanRequestRun
public boolean isCanRequestRun()Whether the run request form is linked (JobActivationNoticeAction.isCanRequestRun()). -
isCanRequest
public boolean isCanRequest()Whether the viewer holdsBatchControl/Request. -
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-