Record Class Promotion

java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Promotion
Record Components:
name - the promotion process
startTime - epoch milliseconds when the promotion ran
duration - milliseconds between the build start and the promotion
user - who promoted, or "anonymous"
icon - path of the promotion's star icon relative to the Jenkins root
params - the promotion's parameters as "name: value" strings

@ExportedBean(defaultVisibility=100) public record Promotion(String name, long startTime, long duration, String user, String icon, List<String> params) extends Record
A promotion of a build.
  • Constructor Details

    • Promotion

      public Promotion(String name, long startTime, long duration, String user, String icon, List<String> params)
      Creates an instance of a Promotion record class.
      Parameters:
      name - the value for the name record component
      startTime - the value for the startTime record component
      duration - the value for the duration record component
      user - the value for the user record component
      icon - the value for the icon record component
      params - the value for the params record component
  • Method Details

    • 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
    • startTime

      @Exported public long startTime()
      Returns the value of the startTime record component.
      Returns:
      the value of the startTime record component
    • duration

      @Exported public long duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component
    • user

      @Exported public String user()
      Returns the value of the user record component.
      Returns:
      the value of the user record component
    • icon

      @Exported public String icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component
    • params

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