Package com.google.gerrit.entities
Class AttentionSetUpdate
java.lang.Object
com.google.gerrit.entities.AttentionSetUpdate
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Users can be added to or removed from the attention set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Account.Id
account()
The user included in or excluded from the attention set.static AttentionSetUpdate
createForWrite
(Account.Id account, AttentionSetUpdate.Operation operation, String reason) Create an instance to be written to NoteDB.static AttentionSetUpdate
createFromRead
(Instant timestamp, Account.Id account, AttentionSetUpdate.Operation operation, String reason) Create an instance from data read from NoteDB.abstract AttentionSetUpdate.Operation
Indicates whether the user is added to or removed from the attention set.abstract String
reason()
A short human readable reason that explains this status (e.g.abstract Instant
The time at which this status was set.
-
Constructor Details
-
AttentionSetUpdate
public AttentionSetUpdate()
-
-
Method Details
-
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
The user included in or excluded from the attention set. -
operation
Indicates whether the user is added to or removed from the attention set. -
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.
-