Package se.diabol.jenkins.pipeline.model
Record Class Stage
java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Stage
- Record Components:
id- identifies the stage within its pipelinename- the heading of the boxrow- the row of the grid the stage sits in, starting at 0column- the column of the grid, starting at 0version- in the aggregated pipeline, the version that last reached the stage, which for a Pipeline job is the display name of the newest run that ran the stage; null otherwisetasks- the tasks, in orderdownstream- ids of the stages this stage leads to, for drawing arrowsstatus- the stage's own status: for a Pipeline stage that of the whole stage block, which can be worse than any of its tasks when steps outside them failed or went unstable; null for a stage of a chain of jobs, whose tasks are builds of their own
@ExportedBean(defaultVisibility=100)
public record Stage(String id, String name, int row, int column, String version, List<Task> tasks, List<String> downstream, Status status)
extends Record
A column of tasks in the pipeline grid.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcolumn()Returns the value of thecolumnrecord component.Returns the value of thedownstreamrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.introw()Returns the value of therowrecord component.status()Returns the value of thestatusrecord component.tasks()Returns the value of thetasksrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.withoutDetails(boolean keepTests, boolean keepAnalysis) The same stage with only the task details the view shows.withPosition(int row, int column)
-
Constructor Details
-
Stage
public Stage(String id, String name, int row, int column, String version, List<Task> tasks, List<String> downstream, Status status) Creates an instance of aStagerecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentrow- the value for therowrecord componentcolumn- the value for thecolumnrecord componentversion- the value for theversionrecord componenttasks- the value for thetasksrecord componentdownstream- the value for thedownstreamrecord componentstatus- the value for thestatusrecord component
-
-
Method Details
-
withPosition
-
withTasks
-
withoutDetails
The same stage with only the task details the view shows. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
row
@Exported public int row()Returns the value of therowrecord component.- Returns:
- the value of the
rowrecord component
-
column
@Exported public int column()Returns the value of thecolumnrecord component.- Returns:
- the value of the
columnrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
tasks
Returns the value of thetasksrecord component.- Returns:
- the value of the
tasksrecord component
-
downstream
Returns the value of thedownstreamrecord component.- Returns:
- the value of the
downstreamrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-