Class AccountTemplateUtil

java.lang.Object
com.google.gerrit.server.util.AccountTemplateUtil

public class AccountTemplateUtil extends Object
Utility functions for text that can be persisted in data storage and should not contain user identifiable information, e.g. ChangeMessage or AttentionSetUpdate.reason().
  • Field Details

    • ACCOUNT_TEMPLATE

      public static final String ACCOUNT_TEMPLATE
      Template to represent account in pseudonymized form in text, that might be persisted in data storage.
      See Also:
    • ACCOUNT_TEMPLATE_REGEX

      public static final String ACCOUNT_TEMPLATE_REGEX
      See Also:
    • ACCOUNT_TEMPLATE_PATTERN

      public static final Pattern ACCOUNT_TEMPLATE_PATTERN
  • Method Details

    • parseTemplates

      public static com.google.common.collect.ImmutableSet<Account.Id> parseTemplates(String textTemplate)
      Returns account ids that are used in text, that might contain ACCOUNT_TEMPLATE.
    • getAccountTemplate

      public static String getAccountTemplate(Account.Id accountId)
    • replaceTemplates

      public String replaceTemplates(String messageTemplate)
      Builds user-readable text from text, that might contain ACCOUNT_TEMPLATE.