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, summary JSON 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.

  • Constructor Details

    • BatchControlRootAction

      public BatchControlRootAction()
  • Method Details

    • getIconFileName

      @CheckForNull public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      @CheckForNull public String getUrlName()
      null without any Batch Control permission: per Action.getUrlName() that makes the action unreachable, so the URL space answers 404 instead of disclosing it.
      Specified by:
      getUrlName in interface Action
    • 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 by SectionAccess), plus the configuration page for a BatchControl/Manage holder. 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:
      doContextMenu in interface ModelObjectWithContextMenu
    • getViewPermissions

      public Permission[] getViewPermissions()
      Permissions for the landing page's l:layout: any Batch Control permission.
    • pagerQuery

      public String pagerQuery(String parameter, long page)
      #45: the query string of a bc:pager link to page of the list paged with parameter, keeping the current URL's other parameters (Paging.query(java.lang.String, long)). The tag reaches it through this action, as bc:tabs does, because j:invokeStatic loads 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

      public List<SectionTabs.Tab> getTabs()
      The tabs the viewer may open, with their open-item badges (overview page).
    • getLinks

      public SectionAccess getLinks()
      Link predicates of the overview: each entry is shown only if it can be opened.
    • getConfigurationLink

      @CheckForNull public BatchControlConfigurationLink getConfigurationLink()
      e2e-03 DEF-10: the Batch Control configuration page for a BatchControl/Manage holder, who may not reach Manage Jenkins; null (no link) for anyone else, or while the page is not shipped.
    • getRequests

      public RequestsSection getRequests()
      Stapler: serves /batch-control/requests/....
    • getActivations

      public ActivationsSection getActivations()
      Stapler: serves /batch-control/activations/....
    • getGrants

      public GrantsSection getGrants()
      Stapler: serves /batch-control/grants/....
    • getChanges

      public ChangesSection getChanges()
      Stapler: serves /batch-control/changes/....
    • getDashboard

      public DashboardSection getDashboard()
      Stapler: serves /batch-control/dashboard/....
    • getIncidents

      public IncidentsSection getIncidents()
      Stapler: serves /batch-control/incidents/....
    • getHistory

      public HistorySection getHistory()
      Stapler: serves /batch-control/history/....
    • markedRuns

      public List<ReplayedRuns.Row> markedRuns(String itemFullName)
      D-58c, for the batch-control-strategy monitor's view (reached there through app.getExtensionList): the runs of the item named itemFullName replayed under a permission window. Not a Stapler route (no get/do prefix); the monitor is Administer-only, and the item is resolved as the viewer.
    • isCanRequestGrants

      public boolean isCanRequestGrants()
      For refusal pages outside this action (reached through app.getExtensionList, since j:invokeStatic cannot load plugin classes): whether the viewer may open the Grants screen and submit a grant request. Not a Stapler route (an is getter of a boolean is never dispatched to).
    • grantRequestUrl

      @CheckForNull public String grantRequestUrl(String fullName, String action)
      Root-relative URL of the new grant request form prefilled for the item and the action, or null when the viewer cannot see the item or it cannot carry a window. Not a Stapler route (no get/do prefix).
    • changedUnderGrant

      @CheckForNull public GuardInfo.Changed changedUnderGrant(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), or null. Not a Stapler route.
    • reviewOutcome

      @CheckForNull public GuardInfo.Outcome reviewOutcome(String itemFullName)
      For the monitor's reviewed view: what still guards the item after it was marked as reviewed, or null when that is not true now. Not a Stapler route.