mirror of
https://github.com/google/nomulus.git
synced 2025-06-15 08:54:45 +02:00
Add ability to show full WHOIS output in nomulus command
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=197731992
This commit is contained in:
parent
ac500652ac
commit
86dd6bd59e
15 changed files with 181 additions and 62 deletions
|
@ -134,24 +134,18 @@ abstract class WhoisResponseImpl implements WhoisResponse {
|
|||
return emitField(Joiner.on(' ').join(nameParts), value);
|
||||
}
|
||||
|
||||
/** Emit registrar address. */
|
||||
E emitRegistrarAddress(@Nullable String prefix, @Nullable Address address) {
|
||||
prefix = isNullOrEmpty(prefix) ? "" : prefix + " ";
|
||||
if (address != null) {
|
||||
emitList(prefix + "Street", address.getStreet());
|
||||
emitField(prefix + "City", address.getCity());
|
||||
emitField(prefix + "State/Province", address.getState());
|
||||
emitField(prefix + "Postal Code", address.getZip());
|
||||
emitField(prefix + "Country", address.getCountryCode());
|
||||
}
|
||||
return thisCastToDerived();
|
||||
}
|
||||
|
||||
/** Emit registrant address. */
|
||||
E emitRegistrantAddress(@Nullable String prefix, @Nullable Address address) {
|
||||
/** Emit a contact address. */
|
||||
E emitAddress(@Nullable String prefix, @Nullable Address address, boolean fullOutput) {
|
||||
prefix = isNullOrEmpty(prefix) ? "" : prefix + " ";
|
||||
if (address != null) {
|
||||
if (fullOutput) {
|
||||
emitList(prefix + "Street", address.getStreet());
|
||||
emitField(prefix + "City", address.getCity());
|
||||
}
|
||||
emitField(prefix + "State/Province", address.getState());
|
||||
if (fullOutput) {
|
||||
emitField(prefix + "Postal Code", address.getZip());
|
||||
}
|
||||
emitField(prefix + "Country", address.getCountryCode());
|
||||
}
|
||||
return thisCastToDerived();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue