mirror of
https://github.com/google/nomulus.git
synced 2025-05-31 01:34:05 +02:00
Change redacted output for domain whois query
The redacted text for the email field displays a longer prompt to contact the registrar, per the request filed at b/123573370. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=232716133
This commit is contained in:
parent
6a6c7e3b09
commit
7fe16689d8
18 changed files with 81 additions and 38 deletions
|
@ -59,11 +59,16 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
|||
/** Whether the full WHOIS output is to be displayed. */
|
||||
private final boolean fullOutput;
|
||||
|
||||
/** Creates new WHOIS domain response on the given domain. */
|
||||
DomainWhoisResponse(DomainBase domain, boolean fullOutput, DateTime timestamp) {
|
||||
/** When fullOutput is false, the text to display for the registrant's email fields. */
|
||||
private final String whoisRedactedEmailText;
|
||||
|
||||
/** Creates new WHOIS domain response on the given domain. */
|
||||
DomainWhoisResponse(
|
||||
DomainBase domain, boolean fullOutput, String whoisRedactedEmailText, DateTime timestamp) {
|
||||
super(timestamp);
|
||||
this.domain = checkNotNull(domain, "domain");
|
||||
this.fullOutput = fullOutput;
|
||||
this.whoisRedactedEmailText = whoisRedactedEmailText;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -176,8 +181,9 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
|||
}
|
||||
emitPhone(contactType, "Phone", contactResource.getVoiceNumber());
|
||||
emitPhone(contactType, "Fax", contactResource.getFaxNumber());
|
||||
emitField(
|
||||
ImmutableList.of(contactType, "Email"), contactResource.getEmailAddress(), fullOutput);
|
||||
String emailFieldContent =
|
||||
fullOutput ? contactResource.getEmailAddress() : whoisRedactedEmailText;
|
||||
emitField(ImmutableList.of(contactType, "Email"), emailFieldContent);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue