Class ActivationsSection

java.lang.Object
io.jenkins.plugins.batchcontrol.action.ActivationsSection
All Implemented Interfaces:
ModelObject, org.kohsuke.stapler.StaplerProxy

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class ActivationsSection extends Object implements ModelObject, org.kohsuke.stapler.StaplerProxy
The activation request screen at /batch-control/activations/ (SPEC item 6a, D-66): the activation and hold requests the viewer may see as pending (those awaiting the viewer's decision marked), active (the request in effect for its job) and ended, each in pages of 50 (?pendingPage=N, ?activePage=N, ?endedPage=N).

The subtree is gated by getTarget() with SectionAccess.activations(); rows and detail pages follow Visibility.canSeeActivationRequest(io.jenkins.plugins.batchcontrol.model.ActivationRequest) (P-09). No state logic lives here; decisions go through ActivationItem to ActivationService.

  • Field Details

    • PAGE_SIZE

      public static final int PAGE_SIZE
      Page size for the request list.
      See Also:
  • Constructor Details

    • ActivationsSection

      public ActivationsSection()
  • Method Details

    • getTarget

      public Object getTarget()
      Specified by:
      getTarget in interface org.kohsuke.stapler.StaplerProxy
    • getDisplayName

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

      public Permission[] getViewPermissions()
      Permissions for this screen's l:layout (the same set its section gate checks).
    • getDynamic

      @CheckForNull public ActivationItem getDynamic(String id)
      Stapler: serves /batch-control/activations/<id>/; null renders a 404. A request the caller may not see renders exactly like a nonexistent one (P-09), and so does every failed lookup (S-39-01, RecordLookup).
    • isAwaitingMyDecision

      public boolean isAwaitingMyDecision(ActivationRequest request)
      Whether the viewer is a designated approver of this pending request (the Activations tab badge's predicate), so its row says "awaiting your decision". D-66: the former inbox table repeated these rows; they are now marked in the Pending list instead.
    • getPendingItems

      public List<ActivationRequest> getPendingItems()
      Pending requests on the current page, oldest first (closest to its timeout on top).
    • getPendingPage

      public int getPendingPage()
    • getPendingTotal

      public int getPendingTotal()
    • isHasPendingPrevious

      public boolean isHasPendingPrevious()
    • isHasPendingNext

      public boolean isHasPendingNext()
    • getActiveItems

      public List<ActivationRequest> getActiveItems()
      Approved requests still in effect: the request that set its job's current activation state (ActivationState.getRequestId()), newest first.
    • getActivePage

      public int getActivePage()
    • getActiveTotal

      public int getActiveTotal()
    • isHasActivePrevious

      public boolean isHasActivePrevious()
    • isHasActiveNext

      public boolean isHasActiveNext()
    • getEndedItems

      public List<ActivationRequest> getEndedItems()
      Superseded, rejected, cancelled, expired and invalidated requests, newest first.
    • getEndedPage

      public int getEndedPage()
    • getEndedTotal

      public int getEndedTotal()
    • isHasEndedPrevious

      public boolean isHasEndedPrevious()
    • isHasEndedNext

      public boolean isHasEndedNext()
    • getTotal

      public int getTotal()
      Every visible request, for the empty state.
    • endedLabel

      public String endedLabel(ActivationRequest request)
      How an ended request ended, in words: a superseded approval says so.
    • jobUrl

      @CheckForNull public String jobUrl(ActivationRequest request)
      Root-relative URL of the request's job or computed folder (D-46c) when the viewer may read it, else null (plain text).
    • actionLabel

      public String actionLabel(ActivationRequest.Action action)
      S-13-08: ACTIVATE and HOLD worded so they cannot be mistaken for each other.
    • join

      public String join(@CheckForNull List<String> approvers)
      Jelly helper: an approver set for display (a1, a2).
    • format

      public String format(@CheckForNull Instant instant)
      Jelly helper: human-readable timestamp.