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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactionLabel(ActivationRequest.Action action) S-13-08: ACTIVATE and HOLD worded so they cannot be mistaken for each other.endedLabel(ActivationRequest request) How an ended request ended, in words: a superseded approval says so.Jelly helper: human-readable timestamp.Approved requests still in effect: the request that set its job's current activation state (ActivationState.getRequestId()), newest first.intintgetDynamic(String id) Stapler: serves/batch-control/activations/<id>/;nullrenders a 404.Superseded, rejected, cancelled, expired and invalidated requests, newest first.intintPending requests on the current page, oldest first (closest to its timeout on top).intintintgetTotal()Every visible request, for the empty state.Permissions for this screen'sl:layout(the same set its section gate checks).booleanisAwaitingMyDecision(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".booleanbooleanbooleanbooleanbooleanbooleanjobUrl(ActivationRequest request) Root-relative URL of the request's job or computed folder (D-46c) when the viewer may read it, elsenull(plain text).Jelly helper: an approver set for display (a1, a2).
-
Field Details
-
PAGE_SIZE
public static final int PAGE_SIZEPage size for the request list.- See Also:
-
-
Constructor Details
-
ActivationsSection
public ActivationsSection()
-
-
Method Details
-
getTarget
- Specified by:
getTargetin interfaceorg.kohsuke.stapler.StaplerProxy
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject
-
getViewPermissions
Permissions for this screen'sl:layout(the same set its section gate checks). -
getDynamic
Stapler: serves/batch-control/activations/<id>/;nullrenders 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
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
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
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
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
How an ended request ended, in words: a superseded approval says so. -
jobUrl
Root-relative URL of the request's job or computed folder (D-46c) when the viewer may read it, elsenull(plain text). -
actionLabel
S-13-08: ACTIVATE and HOLD worded so they cannot be mistaken for each other. -
join
Jelly helper: an approver set for display (a1, a2). -
format
Jelly helper: human-readable timestamp.
-