Package com.google.gerrit.entities
Class ChangeMessage
- java.lang.Object
-
- com.google.gerrit.entities.ChangeMessage
-
public final class ChangeMessage extends Object
A message attached to aChange
. This message is persisted in data storage, that is why it must have template form that does not contain Gerrit user identifiable information. Hence, it requires processing to convert it to user-facing form.These messages are normally auto-generated by gerrit operations, but might also incorporate user input.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChangeMessage.Key
-
Field Summary
Fields Modifier and Type Field Description protected Account.Id
author
Who wrote this comment; null if it was written by the Gerrit system.protected ChangeMessage.Key
key
protected String
message
The text left by the user or Gerrit system in template form, that is free of Gerrit User Identifiable Information and can be persisted in data storage.protected PatchSet.Id
patchset
Which patchset (if any) was this message generated from?protected Account.Id
realAuthor
Real user that added this message on behalf of the user recorded inauthor
.protected String
tag
Tag associated with change messageprotected Timestamp
writtenOn
When this comment was drafted.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ChangeMessage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChangeMessage
create(ChangeMessage.Key k, Account.Id a, Timestamp wo, PatchSet.Id psid)
static ChangeMessage
create(ChangeMessage.Key k, Account.Id a, Timestamp wo, PatchSet.Id psid, String messageTemplate, Account.Id realAuthor, String tag)
boolean
equals(Object o)
Account.Id
getAuthor()
If null, the message was written 'by the Gerrit system'.ChangeMessage.Key
getKey()
String
getMessage()
Message template, as persisted in data storage.PatchSet.Id
getPatchSetId()
Account.Id
getRealAuthor()
String
getTag()
Timestamp
getWrittenOn()
int
hashCode()
static ChangeMessage.Key
key(Change.Id changeId, String uuid)
String
toString()
-
-
-
Field Detail
-
key
protected ChangeMessage.Key key
-
author
protected Account.Id author
Who wrote this comment; null if it was written by the Gerrit system.
-
writtenOn
protected Timestamp writtenOn
When this comment was drafted.
-
message
protected String message
The text left by the user or Gerrit system in template form, that is free of Gerrit User Identifiable Information and can be persisted in data storage.
-
patchset
protected PatchSet.Id patchset
Which patchset (if any) was this message generated from?
-
tag
protected String tag
Tag associated with change message
-
realAuthor
protected Account.Id realAuthor
Real user that added this message on behalf of the user recorded inauthor
.
-
-
Method Detail
-
key
public static ChangeMessage.Key key(Change.Id changeId, String uuid)
-
create
public static ChangeMessage create(ChangeMessage.Key k, Account.Id a, Timestamp wo, PatchSet.Id psid)
-
create
public static ChangeMessage create(ChangeMessage.Key k, Account.Id a, Timestamp wo, PatchSet.Id psid, String messageTemplate, Account.Id realAuthor, String tag)
-
getKey
public ChangeMessage.Key getKey()
-
getAuthor
public Account.Id getAuthor()
If null, the message was written 'by the Gerrit system'.
-
getRealAuthor
public Account.Id getRealAuthor()
-
getWrittenOn
public Timestamp getWrittenOn()
-
getMessage
public String getMessage()
Message template, as persisted in data storage.
-
getTag
public String getTag()
-
getPatchSetId
public PatchSet.Id getPatchSetId()
-
-