RDAP: Add registrar entities to nameserver query results

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211462672
This commit is contained in:
mountford 2018-09-04 08:42:37 -07:00 committed by jianglai
parent c5e6eae555
commit 8d131a52bd
26 changed files with 2153 additions and 67 deletions

View file

@ -696,6 +696,16 @@ public class RdapJsonFormatter {
jsonBuilder.put("ipAddresses", ipAddressesBuilder.build());
}
}
ImmutableList<ImmutableMap<String, Object>> entities =
addRegistrarEntity(
ImmutableList.of(),
hostResource.getPersistedCurrentSponsorClientId(),
linkBase,
whoisServer,
now);
if (!entities.isEmpty()) {
jsonBuilder.put("entities", entities);
}
if (whoisServer != null) {
jsonBuilder.put("port43", whoisServer);
}