Package com.google.gerrit.entities
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AttentionSetUpdate.Operation
Users can be added to or removed from the attention set.
-
Constructor Summary
Constructors Constructor Description AttentionSetUpdate()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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
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
timestamp()
The time at which this status was set.
-
-
-
Method Detail
-
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.
-
-