Package com.google.gerrit.server.notedb
Class ChangeNoteUtil
- java.lang.Object
-
- com.google.gerrit.server.notedb.ChangeNoteUtil
-
public class ChangeNoteUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChangeNoteUtil.AttentionStatusInNoteDb
Helper class for JSON serialization.static class
ChangeNoteUtil.CommitMessageRange
-
Constructor Summary
Constructors Constructor Description ChangeNoteUtil(ChangeNoteJson changeNoteJson, String serverId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
formatAccountIdentString(Account.Id account, String accountIdAsEmail)
String
getAccountIdAsEmailAddress(Account.Id accountId)
static String
getAccountIdAsUsername(Account.Id accountId)
Returns the string"Gerrit User " + accountId
, to pseudonymize user names.ChangeNoteJson
getChangeNoteJson()
org.eclipse.jgit.lib.PersonIdent
newAccountIdIdent(Account.Id accountId, Date when, org.eclipse.jgit.lib.PersonIdent serverIdent)
Returns aPersonIdent
that contains the account ID, but not the user's name or email address.static Optional<ChangeNoteUtil.CommitMessageRange>
parseCommitMessageRange(org.eclipse.jgit.revwalk.RevCommit commit)
-
-
-
Constructor Detail
-
ChangeNoteUtil
@Inject public ChangeNoteUtil(ChangeNoteJson changeNoteJson, String serverId)
-
-
Method Detail
-
getChangeNoteJson
public ChangeNoteJson getChangeNoteJson()
-
formatAccountIdentString
public static String formatAccountIdentString(Account.Id account, String accountIdAsEmail)
-
newAccountIdIdent
public org.eclipse.jgit.lib.PersonIdent newAccountIdIdent(Account.Id accountId, Date when, org.eclipse.jgit.lib.PersonIdent serverIdent)
Returns aPersonIdent
that contains the account ID, but not the user's name or email address.
-
getAccountIdAsUsername
public static String getAccountIdAsUsername(Account.Id accountId)
Returns the string"Gerrit User " + accountId
, to pseudonymize user names.
-
getAccountIdAsEmailAddress
public String getAccountIdAsEmailAddress(Account.Id accountId)
-
parseCommitMessageRange
public static Optional<ChangeNoteUtil.CommitMessageRange> parseCommitMessageRange(org.eclipse.jgit.revwalk.RevCommit commit)
-
-