Class BatchControlRootAction
java.lang.Object
io.jenkins.plugins.batchcontrol.action.BatchControlRootAction
- All Implemented Interfaces:
ExtensionPoint,Action,ModelObject,RootAction,ModelObjectWithContextMenu
@Extension
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class BatchControlRootAction
extends Object
implements RootAction, ModelObjectWithContextMenu
Global "Batch Control" page at
/batch-control.
URL space (fixed contract, asserted by tests):
/batch-control/— landing page/batch-control/requests/— run request list (paged, newest first)/batch-control/requests/<id>/— request detail with decision endpoints/batch-control/activations/— activation approval inbox and list;<id>/detail with approve/reject/cancel/changeApprover endpoints (SPEC item 6a)/batch-control/grants/— grant request list, active grants, create/decision/revoke endpoints/batch-control/changes/— change record list (per month, read-only)/batch-control/dashboard/— run record dashboard (last 7 days by default)/batch-control/incidents/— incident list;<id>/detail with acknowledge/resolve/comment/rerun endpoints/batch-control/history/— filtered history,summaryJSON and CSV exports
The action is absent for a user who holds none of the Batch Control permissions
(SPEC item 2): getIconFileName() and getUrlName() both return
null, so it is not listed and /batch-control/ and every URL beneath it answer
404. A user who holds some Batch Control permission but not the one a section needs gets 403
from that section's gate.
Hosting review 2026-10-02 (PR6): the sections are reached through a tab bar
(bc:tabs, built from SectionTabs) instead of a side panel, and the action is a
ModelObjectWithContextMenu, so its breadcrumb offers the same sections as a dropdown
on every subpage.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchangedUnderGrant(String itemFullName) For the batch-control-strategy monitor's view: the permission window that recorded a change to the item (or a folder above it), ornull.doContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) The breadcrumb dropdown: the same tabs, in the same order and with the same badges, as the tab bar (SectionTabs.current(), permission-filtered bySectionAccess), plus the configuration page for aBatchControl/Manageholder.Stapler: serves/batch-control/activations/....Stapler: serves/batch-control/changes/....e2e-03 DEF-10: the Batch Control configuration page for aBatchControl/Manageholder, who may not reach Manage Jenkins;null(no link) for anyone else, or while the page is not shipped.Stapler: serves/batch-control/dashboard/....Stapler: serves/batch-control/grants/....Stapler: serves/batch-control/history/....Stapler: serves/batch-control/incidents/....getLinks()Link predicates of the overview: each entry is shown only if it can be opened.Stapler: serves/batch-control/requests/....getTabs()The tabs the viewer may open, with their open-item badges (overview page).nullwithout any Batch Control permission: perAction.getUrlName()that makes the action unreachable, so the URL space answers 404 instead of disclosing it.Permissions for the landing page'sl:layout: any Batch Control permission.grantRequestUrl(String fullName, String action) Root-relative URL of the new grant request form prefilled for the item and the action, ornullwhen the viewer cannot see the item or it cannot carry a window.booleanFor refusal pages outside this action (reached throughapp.getExtensionList, sincej:invokeStaticcannot load plugin classes): whether the viewer may open the Grants screen and submit a grant request.markedRuns(String itemFullName) D-58c, for the batch-control-strategy monitor's view (reached there throughapp.getExtensionList): the runs of the item nameditemFullNamereplayed under a permission window.pagerQuery(String parameter, long page) #45: the query string of abc:pagerlink topageof the list paged withparameter, keeping the current URL's other parameters (Paging.query(java.lang.String, long)).reviewOutcome(String itemFullName) For the monitor'sreviewedview: what still guards the item after it was marked as reviewed, ornullwhen that is not true now.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, isVisibleInContextMenuMethods inherited from interface jenkins.model.ModelObjectWithContextMenu
doContextMenuMethods inherited from interface hudson.model.RootAction
getBadge, isPrimaryAction
-
Constructor Details
-
BatchControlRootAction
public BatchControlRootAction()
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
nullwithout any Batch Control permission: perAction.getUrlName()that makes the action unreachable, so the URL space answers 404 instead of disclosing it.- Specified by:
getUrlNamein interfaceAction
-
doContextMenu
public ModelObjectWithContextMenu.ContextMenu doContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) The breadcrumb dropdown: the same tabs, in the same order and with the same badges, as the tab bar (SectionTabs.current(), permission-filtered bySectionAccess), plus the configuration page for aBatchControl/Manageholder. Read-only; empty for a user the page does not admit (SectionAccess.canOpenRoot(), the gate of the tab bar too), who gets 404 before reaching it anyway.- Specified by:
doContextMenuin interfaceModelObjectWithContextMenu
-
getViewPermissions
Permissions for the landing page'sl:layout: any Batch Control permission. -
pagerQuery
#45: the query string of abc:pagerlink topageof the list paged withparameter, keeping the current URL's other parameters (Paging.query(java.lang.String, long)). The tag reaches it through this action, asbc:tabsdoes, becausej:invokeStaticloads classes with core's class loader and cannot see plugin classes in a real Jenkins.long, so the view's arithmetic on the page number binds whatever its number type. -
getTabs
The tabs the viewer may open, with their open-item badges (overview page). -
getLinks
Link predicates of the overview: each entry is shown only if it can be opened. -
getConfigurationLink
e2e-03 DEF-10: the Batch Control configuration page for aBatchControl/Manageholder, who may not reach Manage Jenkins;null(no link) for anyone else, or while the page is not shipped. -
getRequests
Stapler: serves/batch-control/requests/.... -
getActivations
Stapler: serves/batch-control/activations/.... -
getGrants
Stapler: serves/batch-control/grants/.... -
getChanges
Stapler: serves/batch-control/changes/.... -
getDashboard
Stapler: serves/batch-control/dashboard/.... -
getIncidents
Stapler: serves/batch-control/incidents/.... -
getHistory
Stapler: serves/batch-control/history/.... -
markedRuns
D-58c, for the batch-control-strategy monitor's view (reached there throughapp.getExtensionList): the runs of the item nameditemFullNamereplayed under a permission window. Not a Stapler route (noget/doprefix); the monitor is Administer-only, and the item is resolved as the viewer. -
isCanRequestGrants
public boolean isCanRequestGrants()For refusal pages outside this action (reached throughapp.getExtensionList, sincej:invokeStaticcannot load plugin classes): whether the viewer may open the Grants screen and submit a grant request. Not a Stapler route (anisgetter of a boolean is never dispatched to). -
grantRequestUrl
Root-relative URL of the new grant request form prefilled for the item and the action, ornullwhen the viewer cannot see the item or it cannot carry a window. Not a Stapler route (noget/doprefix). -
changedUnderGrant
For the batch-control-strategy monitor's view: the permission window that recorded a change to the item (or a folder above it), ornull. Not a Stapler route. -
reviewOutcome
For the monitor'sreviewedview: what still guards the item after it was marked as reviewed, ornullwhen that is not true now. Not a Stapler route.
-