Remove some fields from WHOIS output

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191445626
This commit is contained in:
jianglai 2018-04-03 08:45:04 -07:00 committed by Ben McIlwain
parent 377fe5f573
commit 839e4aa682
9 changed files with 34 additions and 161 deletions

View file

@ -135,8 +135,8 @@ abstract class WhoisResponseImpl implements WhoisResponse {
return emitField(Joiner.on(' ').join(nameParts), value);
}
/** Emit a contact address. */
E emitAddress(@Nullable String prefix, @Nullable Address address) {
/** Emit registrar address. */
E emitRegistrarAddress(@Nullable String prefix, @Nullable Address address) {
prefix = isNullOrEmpty(prefix) ? "" : prefix + " ";
if (address != null) {
emitList(prefix + "Street", address.getStreet());
@ -148,6 +148,16 @@ abstract class WhoisResponseImpl implements WhoisResponse {
return thisCastToDerived();
}
/** Emit registrant address. */
E emitRegistrantAddress(@Nullable String prefix, @Nullable Address address) {
prefix = isNullOrEmpty(prefix) ? "" : prefix + " ";
if (address != null) {
emitField(prefix + "State/Province", address.getState());
emitField(prefix + "Country", address.getCountryCode());
}
return thisCastToDerived();
}
/** Emit Whois Inaccuracy Complaint Form link. Only used for domain queries. */
E emitWicfLink() {
emitField(ICANN_REPORTING_URL_FIELD, ICANN_REPORTING_URL);