Record Class TaskComment

java.lang.Object
java.lang.Record
com.xebialabs.xlrelease.osgi.api.tasks.TaskComment
Record Components:
text - the comment body, in markdown
author - the name the comment is attributed to; never null, but not guaranteed to be a real user
date - when the comment was made

public record TaskComment(String text, String author, Instant date) extends Record
One comment on a task, as read back by TaskExecutionContext.getComments() - markdown text, the name it is attributed to (a user's login name, or a system marker such as "TASK COMMENT" for script/automated output; never null, but not guaranteed to be a real user), and when it was made.

Deliberately independent of the host's own Comment configuration item: this record crosses the bundle boundary, so it carries only plain, bundle-visible types.

  • Constructor Details

    • TaskComment

      public TaskComment(String text, String author, Instant date)
      Creates an instance of a TaskComment record class.
      Parameters:
      text - the value for the text record component
      author - the value for the author record component
      date - the value for the date 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • author

      public String author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • date

      public Instant date()
      Returns the value of the date record component.
      Returns:
      the value of the date record component