mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Initial, easy changes to support later addition of RDAP metrics
I split this out to avoid having a giant CL that changes everything. The actual metrics will follow later. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=174356874
This commit is contained in:
parent
c126c05810
commit
5b8ee87ecc
13 changed files with 127 additions and 46 deletions
|
@ -34,6 +34,7 @@ import google.registry.model.domain.DomainResource;
|
|||
import google.registry.model.host.HostResource;
|
||||
import google.registry.rdap.RdapJsonFormatter.BoilerplateType;
|
||||
import google.registry.rdap.RdapJsonFormatter.OutputDataType;
|
||||
import google.registry.rdap.RdapMetrics.EndpointType;
|
||||
import google.registry.rdap.RdapSearchResults.IncompletenessWarningType;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.request.HttpException.BadRequestException;
|
||||
|
@ -88,6 +89,11 @@ public class RdapDomainSearchAction extends RdapActionBase {
|
|||
return "domain search";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EndpointType getEndpointType() {
|
||||
return EndpointType.DOMAINS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getActionPath() {
|
||||
return PATH;
|
||||
|
@ -468,15 +474,10 @@ public class RdapDomainSearchAction extends RdapActionBase {
|
|||
return makeSearchResults(domains, IncompletenessWarningType.NONE, now);
|
||||
}
|
||||
|
||||
/** Output JSON from data in an {@link RdapResourcesAndIncompletenessWarningType} object. */
|
||||
/** Output JSON from data in an {@link RdapResultSet} object. */
|
||||
private RdapSearchResults makeSearchResults(
|
||||
RdapResourcesAndIncompletenessWarningType<DomainResource>
|
||||
resourcesAndIncompletenessWarningType,
|
||||
DateTime now) {
|
||||
return makeSearchResults(
|
||||
resourcesAndIncompletenessWarningType.resources(),
|
||||
resourcesAndIncompletenessWarningType.incompletenessWarningType(),
|
||||
now);
|
||||
RdapResultSet<DomainResource> resultSet, DateTime now) {
|
||||
return makeSearchResults(resultSet.resources(), resultSet.incompletenessWarningType(), now);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue