Class MessageIdGenerator
- java.lang.Object
-
- com.google.gerrit.server.mail.send.MessageIdGenerator
-
public class MessageIdGenerator extends Object
A generator class that creates aMessageIdGenerator.MessageId
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MessageIdGenerator.MessageId
A unique id used which is a part of the header of all emails sent through by Gerrit.
-
Constructor Summary
Constructors Constructor Description MessageIdGenerator(GitRepositoryManager repositoryManager, AllUsersName allUsersName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageIdGenerator.MessageId
fromAccountUpdate(Account.Id accountId)
Create aMessageIdGenerator.MessageId
as a result of an account updateMessageIdGenerator.MessageId
fromChangeUpdate(Project.NameKey project, PatchSet.Id patchsetId)
MessageIdGenerator.MessageId
fromChangeUpdate(RepoView repoView, PatchSet.Id patchsetId)
Create aMessageIdGenerator.MessageId
as a result of a change update.MessageIdGenerator.MessageId
fromChangeUpdateAndReason(RepoView repoView, PatchSet.Id patchsetId, String reason)
MessageIdGenerator.MessageId
fromMailMessage(com.google.gerrit.mail.MailMessage mailMessage)
Create aMessageIdGenerator.MessageId
from a mail message.MessageIdGenerator.MessageId
fromReasonAccountIdAndTimestamp(String reason, Account.Id accountId, Instant timestamp)
Create aMessageIdGenerator.MessageId
from a reason, Account.Id, and timestamp.
-
-
-
Constructor Detail
-
MessageIdGenerator
@Inject public MessageIdGenerator(GitRepositoryManager repositoryManager, AllUsersName allUsersName)
-
-
Method Detail
-
fromChangeUpdate
public MessageIdGenerator.MessageId fromChangeUpdate(RepoView repoView, PatchSet.Id patchsetId)
Create aMessageIdGenerator.MessageId
as a result of a change update.- Returns:
- MessageId that depends on the patchset.
-
fromChangeUpdateAndReason
public MessageIdGenerator.MessageId fromChangeUpdateAndReason(RepoView repoView, PatchSet.Id patchsetId, String reason)
-
fromChangeUpdate
public MessageIdGenerator.MessageId fromChangeUpdate(Project.NameKey project, PatchSet.Id patchsetId)
-
fromAccountUpdate
public MessageIdGenerator.MessageId fromAccountUpdate(Account.Id accountId)
Create aMessageIdGenerator.MessageId
as a result of an account update- Returns:
MessageIdGenerator.MessageId
that depends on the account id.
-
fromMailMessage
public MessageIdGenerator.MessageId fromMailMessage(com.google.gerrit.mail.MailMessage mailMessage)
Create aMessageIdGenerator.MessageId
from a mail message.- Parameters:
mailMessage
- The message that was sent but was rejected.- Returns:
- MessageId that depends on the MailMessage that was rejected.
-
fromReasonAccountIdAndTimestamp
public MessageIdGenerator.MessageId fromReasonAccountIdAndTimestamp(String reason, Account.Id accountId, Instant timestamp)
Create aMessageIdGenerator.MessageId
from a reason, Account.Id, and timestamp.- Parameters:
reason
- for performing this account update- Returns:
- MessageId that depends on the reason, accountId, and timestamp.
-
-