Record Class Component

java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Component
Record Components:
name - the heading
index - the 1-based position in the view's configuration, used to address paging requests
firstJob - the job the pipeline starts with, or null when it could not be resolved
paging - where the shown pipelines are among all of them, or null when the view does not page
pipelines - the aggregated pipeline (first, when shown) and the run instances, newest first
error - 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 Details

    • Component

      public Component(String name, int index, JobRef firstJob, Paging paging, List<Pipeline> pipelines, String error)
      Creates an instance of a Component record class.
      Parameters:
      name - the value for the name record component
      index - the value for the index record component
      firstJob - the value for the firstJob record component
      paging - the value for the paging record component
      pipelines - the value for the pipelines record component
      error - the value for the error record component
  • Method Details

    • failed

      public static Component failed(String name, int index, String error)
    • 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      @Exported public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • index

      @Exported public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • firstJob

      @Exported public JobRef firstJob()
      Returns the value of the firstJob record component.
      Returns:
      the value of the firstJob record component
    • paging

      @Exported public Paging paging()
      Returns the value of the paging record component.
      Returns:
      the value of the paging record component
    • pipelines

      @Exported public List<Pipeline> pipelines()
      Returns the value of the pipelines record component.
      Returns:
      the value of the pipelines record component
    • error

      @Exported public String error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component