RDAP: Display summary data for search result items

It appears to be standard RDAP practice when returning result sets for domain, nameserver and entity searches to give only summary data for each result item. Any information that can be gleaned from the object itself is included, but related resources are not included. For a domain, for instance, the domain information is included, but nameservers, entities and events (which come from history entries) are suppressed. In their place, there is a standard boilerplate remark in the object indicating that only summary data is included, and that the user should query the item directly to get the full data. Note that summary data is used only for searches; direct queries for an item will still return full data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133973835
This commit is contained in:
mountford 2016-09-22 11:00:37 -07:00 committed by Ben McIlwain
parent 740d49e22e
commit b5e421cee3
25 changed files with 773 additions and 1120 deletions

View file

@ -26,8 +26,8 @@ import com.googlecode.objectify.Key;
import google.registry.model.contact.ContactResource;
import google.registry.model.domain.DesignatedContact;
import google.registry.model.registrar.Registrar;
import google.registry.rdap.RdapJsonFormatter.OutputDataType;
import google.registry.request.Action;
import google.registry.request.HttpException;
import google.registry.request.HttpException.BadRequestException;
import google.registry.request.HttpException.NotFoundException;
import google.registry.util.Clock;
@ -66,7 +66,7 @@ public class RdapEntityAction extends RdapActionBase {
@Override
public ImmutableMap<String, Object> getJsonObjectForResource(
String pathSearchString, boolean isHeadRequest, String linkBase) throws HttpException {
String pathSearchString, boolean isHeadRequest, String linkBase) {
DateTime now = clock.nowUtc();
// The query string is not used; the RDAP syntax is /rdap/entity/handle (the handle is the roid
// for contacts and the client identifier for registrars). Since RDAP's concept of an entity
@ -85,7 +85,8 @@ public class RdapEntityAction extends RdapActionBase {
Optional.<DesignatedContact.Type>absent(),
rdapLinkBase,
rdapWhoisServer,
now);
now,
OutputDataType.FULL);
}
}
try {
@ -95,7 +96,7 @@ public class RdapEntityAction extends RdapActionBase {
Registrar.loadByIanaIdentifierRange(ianaIdentifier, ianaIdentifier + 1, 1), null);
if ((registrar != null) && registrar.isActiveAndPubliclyVisible()) {
return RdapJsonFormatter.makeRdapJsonForRegistrar(
registrar, true, rdapLinkBase, rdapWhoisServer, now);
registrar, true, rdapLinkBase, rdapWhoisServer, now, OutputDataType.FULL);
}
} catch (NumberFormatException e) {
// Although the search string was not a valid IANA identifier, it might still have been a