Package se.diabol.jenkins.pipeline.model
Record Class Component
java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Component
- Record Components:
name- the headingindex- the 1-based position in the view's configuration, used to address paging requestsfirstJob- the job the pipeline starts with, or null when it could not be resolvedpaging- where the shown pipelines are among all of them, or null when the view does not pagepipelines- the aggregated pipeline (first, when shown) and the run instances, newest firsterror- why the component could not be resolved, or null
@ExportedBean(defaultVisibility=100)
public record Component(String name, int index, JobRef firstJob, Paging paging, List<Pipeline> pipelines, String error)
extends Record
One pipeline of the view with its recent instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static ComponentfirstJob()Returns the value of thefirstJobrecord component.booleanWhether the newest pipeline instance has a failed task.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.booleanisActive()Whether the model contains a build that is still going on, which makes a cached copy go stale quickly.longEpoch milliseconds of the most recent task activity, 0 when none.name()Returns the value of thenamerecord component.paging()Returns the value of thepagingrecord component.Returns the value of thepipelinesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Component
public Component(String name, int index, JobRef firstJob, Paging paging, List<Pipeline> pipelines, String error) Creates an instance of aComponentrecord class.- Parameters:
name- the value for thenamerecord componentindex- the value for theindexrecord componentfirstJob- the value for thefirstJobrecord componentpaging- the value for thepagingrecord componentpipelines- the value for thepipelinesrecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
failed
-
lastActivity
@Exported public long lastActivity()Epoch milliseconds of the most recent task activity, 0 when none. -
hasFailure
public boolean hasFailure()Whether the newest pipeline instance has a failed task. -
isActive
public boolean isActive()Whether the model contains a build that is still going on, which makes a cached copy go stale quickly. -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
index
@Exported public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
firstJob
Returns the value of thefirstJobrecord component.- Returns:
- the value of the
firstJobrecord component
-
paging
Returns the value of thepagingrecord component.- Returns:
- the value of the
pagingrecord component
-
pipelines
Returns the value of thepipelinesrecord component.- Returns:
- the value of the
pipelinesrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-