Record Class InputPermissions
java.lang.Object
java.lang.Record
io.jenkins.plugins.pipelinegraphview.utils.InputPermissions
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public record InputPermissions(boolean canProceed, boolean canAbort)
extends Record
What the current user can do with an input step a run is waiting on.
Graphs and steps are cached and shared by every user, so these are worked out per request
and added to the JSON as it's written, as canProceed and canAbort on each
inputStep.
-
Constructor Summary
ConstructorsConstructorDescriptionInputPermissions(boolean canProceed, boolean canAbort) Creates an instance of aInputPermissionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapply(tools.jackson.databind.JsonNode json, Map<String, InputPermissions> permissions) SetscanProceedandcanAborton everyinputStepin the JSON.booleancanAbort()Returns the value of thecanAbortrecord component.booleanReturns the value of thecanProceedrecord component.final booleanIndicates whether some other object is "equal to" this one.static Map<String, InputPermissions> forCurrentUser(org.jenkinsci.plugins.workflow.job.WorkflowRun run) The current user's permissions for each input the run is waiting on, by input id.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InputPermissions
public InputPermissions(boolean canProceed, boolean canAbort) Creates an instance of aInputPermissionsrecord class.- Parameters:
canProceed- the value for thecanProceedrecord componentcanAbort- the value for thecanAbortrecord component
-
-
Method Details
-
forCurrentUser
public static Map<String,InputPermissions> forCurrentUser(org.jenkinsci.plugins.workflow.job.WorkflowRun run) The current user's permissions for each input the run is waiting on, by input id. -
apply
public static void apply(tools.jackson.databind.JsonNode json, Map<String, InputPermissions> permissions) SetscanProceedandcanAborton everyinputStepin the JSON. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
canProceed
public boolean canProceed()Returns the value of thecanProceedrecord component.- Returns:
- the value of the
canProceedrecord component
-
canAbort
public boolean canAbort()Returns the value of thecanAbortrecord component.- Returns:
- the value of the
canAbortrecord component
-