Class PendingCount
java.lang.Object
io.jenkins.plugins.batchcontrol.model.PendingCount
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class PendingCount
extends Object
How many PENDING requests of one kind concern a viewer (D-61): the requests awaiting
their decision as a designated approver holding
BatchControl/Approve, and their own
requests on which they are not a designated approver. Produced only by the
countPendingFor(Authentication) methods of the policy services, so the tab badges and
the sections share one rule.
Decisions come first: as soon as one request awaits the viewer's decision,
getCount() is that number; otherwise it is the number
of the viewer's own pending requests.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintPENDING requests on which the viewer is a designated approver holdingBatchControl/Approve.intgetCount()The number to display: decisions when there are any, else own requests; 0 when nothing is pending.intgetOwn()The viewer's own PENDING requests that are not already counted as awaiting their decision.inthashCode()booleanisEmpty()toString()
-
Field Details
-
NONE
Nothing pending for the viewer.
-
-
Constructor Details
-
PendingCount
public PendingCount(int awaitingDecision, int own)
-
-
Method Details
-
getAwaitingDecision
public int getAwaitingDecision()PENDING requests on which the viewer is a designated approver holdingBatchControl/Approve. -
getOwn
public int getOwn()The viewer's own PENDING requests that are not already counted as awaiting their decision. -
getCount
public int getCount()The number to display: decisions when there are any, else own requests; 0 when nothing is pending. -
isEmpty
public boolean isEmpty() -
equals
-
hashCode
public int hashCode() -
toString
-