Record Class Task

java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Task
Record Components:
id - identifies the task within its pipeline; the job's full name for a chained job, the flow node id for a Pipeline stage
name - what the box says
url - where the box links to, relative to the Jenkins root
jobFullName - the job the task belongs to, which actions are posted for and whose permissions decide what the current user may do with the task
buildNumber - the build the task shows, or null
status - the status of that build
description - the task's description as safe HTML, or null
rebuildable - whether the build could be rebuilt from the view by a user who may build the job; for a Pipeline stage, whether the run can be restarted from the task's top-level stage
restart - the name of the top-level stage a rebuild restarts the Pipeline run from, or null when a rebuild builds the job again
requiresInput - whether the task is a Pipeline run waiting at an input step
inputUrl - where to provide the input when the waiting input step has parameters, relative to the Jenkins root; null when the step can be proceeded from the view or the task is not waiting
manual - the manual trigger leading to the task, or null
tests - test results of the build
analysis - static analysis results of the build
promotions - promotions of the build
downstream - ids of the tasks this task triggers

@ExportedBean(defaultVisibility=100) public record Task(String id, String name, String url, String jobFullName, Integer buildNumber, Status status, String description, boolean rebuildable, String restart, boolean requiresInput, String inputUrl, ManualStep manual, List<TestSummary> tests, List<AnalysisSummary> analysis, List<Promotion> promotions, List<String> downstream) extends Record
One box of a stage: a job of a chain of jobs, or a stage, nested stage or parallel branch of a Pipeline run.
  • Constructor Details

    • Task

      public Task(String id, String name, String url, String jobFullName, Integer buildNumber, Status status, String description, boolean rebuildable, String restart, boolean requiresInput, String inputUrl, ManualStep manual, List<TestSummary> tests, List<AnalysisSummary> analysis, List<Promotion> promotions, List<String> downstream)
      Creates an instance of a Task record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      url - the value for the url record component
      jobFullName - the value for the jobFullName record component
      buildNumber - the value for the buildNumber record component
      status - the value for the status record component
      description - the value for the description record component
      rebuildable - the value for the rebuildable record component
      restart - the value for the restart record component
      requiresInput - the value for the requiresInput record component
      inputUrl - the value for the inputUrl record component
      manual - the value for the manual record component
      tests - the value for the tests record component
      analysis - the value for the analysis record component
      promotions - the value for the promotions record component
      downstream - the value for the downstream record component
  • Method Details

    • permissions

      @Exported public Permissions permissions()
      Permissions of the current user on the task's job.
    • withoutDetails

      public Task withoutDetails(boolean keepTests, boolean keepAnalysis)
      The same task with only the details the view shows.
    • lastActivity

      public long lastActivity()
      Epoch milliseconds of the task's last activity, 0 when none.
    • 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.
    • id

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

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

      @Exported public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • jobFullName

      @Exported public String jobFullName()
      Returns the value of the jobFullName record component.
      Returns:
      the value of the jobFullName record component
    • buildNumber

      @Exported public Integer buildNumber()
      Returns the value of the buildNumber record component.
      Returns:
      the value of the buildNumber record component
    • status

      @Exported public Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • description

      @Exported public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • rebuildable

      @Exported public boolean rebuildable()
      Returns the value of the rebuildable record component.
      Returns:
      the value of the rebuildable record component
    • restart

      @Exported public String restart()
      Returns the value of the restart record component.
      Returns:
      the value of the restart record component
    • requiresInput

      @Exported public boolean requiresInput()
      Returns the value of the requiresInput record component.
      Returns:
      the value of the requiresInput record component
    • inputUrl

      @Exported public String inputUrl()
      Returns the value of the inputUrl record component.
      Returns:
      the value of the inputUrl record component
    • manual

      @Exported public ManualStep manual()
      Returns the value of the manual record component.
      Returns:
      the value of the manual record component
    • tests

      @Exported public List<TestSummary> tests()
      Returns the value of the tests record component.
      Returns:
      the value of the tests record component
    • analysis

      @Exported public List<AnalysisSummary> analysis()
      Returns the value of the analysis record component.
      Returns:
      the value of the analysis record component
    • promotions

      @Exported public List<Promotion> promotions()
      Returns the value of the promotions record component.
      Returns:
      the value of the promotions record component
    • downstream

      @Exported public List<String> downstream()
      Returns the value of the downstream record component.
      Returns:
      the value of the downstream record component