Class AttentionSetUpdate

java.lang.Object
com.google.gerrit.entities.AttentionSetUpdate

public abstract class AttentionSetUpdate extends Object
A single update to the attention set. To reconstruct the attention set these instances are parsed in reverse chronological order. Since each update contains all required information and invalidates all previous state, only the most recent record is relevant for each user.

See AttentionSetInput for the representation in the API.

  • Constructor Details

    • AttentionSetUpdate

      public AttentionSetUpdate()
  • Method Details

    • timestamp

      public abstract Instant timestamp()
      The time at which this status was set. This is null for instances to be written because the timestamp in the commit message will be used.
    • account

      public abstract Account.Id account()
      The user included in or excluded from the attention set.
    • operation

      public abstract AttentionSetUpdate.Operation operation()
      Indicates whether the user is added to or removed from the attention set.
    • reason

      public abstract String reason()
      A short human readable reason that explains this status (e.g. "manual").
    • createFromRead

      public static AttentionSetUpdate createFromRead(Instant timestamp, Account.Id account, AttentionSetUpdate.Operation operation, String reason)
      Create an instance from data read from NoteDB. This includes the timestamp taken from the commit.
    • createForWrite

      public static AttentionSetUpdate createForWrite(Account.Id account, AttentionSetUpdate.Operation operation, String reason)
      Create an instance to be written to NoteDB. This has no timestamp because the timestamp of the commit will be used.