Add next page navigation for RDAP nameserver searches

Domain and entity searches will be handled in future CLs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178912832
This commit is contained in:
mountford 2017-12-13 09:28:30 -08:00 committed by Ben McIlwain
parent 7dc224627f
commit 359bab291b
12 changed files with 486 additions and 62 deletions

View file

@ -70,7 +70,7 @@ import org.joda.time.DateTime;
method = {GET, HEAD},
auth = Auth.AUTH_PUBLIC
)
public class RdapDomainSearchAction extends RdapActionBase {
public class RdapDomainSearchAction extends RdapSearchActionBase {
public static final String PATH = "/rdap/domains";
@ -320,7 +320,7 @@ public class RdapDomainSearchAction extends RdapActionBase {
HostResource.class,
"fullyQualifiedHostName",
partialStringQuery,
false, /* includeDeleted */
DeletedItemHandling.EXCLUDE,
MAX_NAMESERVERS_IN_FIRST_STAGE);
Optional<String> desiredRegistrar = getDesiredRegistrar();
if (desiredRegistrar.isPresent()) {
@ -423,7 +423,9 @@ public class RdapDomainSearchAction extends RdapActionBase {
HostResource.class,
"inetAddresses",
inetAddress.getHostAddress(),
false,
Optional.empty(),
Optional.empty(),
DeletedItemHandling.EXCLUDE,
MAX_NAMESERVERS_IN_FIRST_STAGE);
Optional<String> desiredRegistrar = getDesiredRegistrar();
if (desiredRegistrar.isPresent()) {
@ -530,6 +532,7 @@ public class RdapDomainSearchAction extends RdapActionBase {
? IncompletenessWarningType.TRUNCATED
: incompletenessWarningType;
metricInformationBuilder.setIncompletenessWarningType(finalIncompletenessWarningType);
return RdapSearchResults.create(ImmutableList.copyOf(jsonList), finalIncompletenessWarningType);
return RdapSearchResults.create(
ImmutableList.copyOf(jsonList), finalIncompletenessWarningType, Optional.empty());
}
}