mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +00:00
Remove buildWithoutImplicitStatusValues
This was used in DomainInfoFlow to return a DomainResource with no nameservers without making INACTIVE show up. It was nominally used in DomainApplicationInfoFlow for the same reason, but that's just an artifact of the old flow hierarchy since applications never have INACTIVE set anyways. In either case, now that we have the DomainInfo return object instead of returning DomainResource directly from the flow, it's better handled within the flow. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145582317
This commit is contained in:
@@ -97,7 +97,7 @@ public final class DomainApplicationInfoFlow implements Flow {
|
||||
}
|
||||
// We don't support authInfo for applications, so if it's another registrar always fail.
|
||||
verifyResourceOwnership(clientId, application);
|
||||
application = getResourceInfo(application);
|
||||
boolean showDelegatedHosts = ((Info) resourceCommand).getHostsRequest().requestDelegated();
|
||||
prefetchReferencedResources(application);
|
||||
return responseBuilder
|
||||
.setResData(DomainInfoData.newBuilder()
|
||||
@@ -106,7 +106,9 @@ public final class DomainApplicationInfoFlow implements Flow {
|
||||
.setStatusValues(application.getStatusValues())
|
||||
.setRegistrant(ofy().load().key(application.getRegistrant()).now().getContactId())
|
||||
.setContacts(loadForeignKeyedDesignatedContacts(application.getContacts()))
|
||||
.setNameservers(application.loadNameserverFullyQualifiedHostNames())
|
||||
.setNameservers(showDelegatedHosts
|
||||
? application.loadNameserverFullyQualifiedHostNames()
|
||||
: null)
|
||||
.setCurrentSponsorClientId(application.getCurrentSponsorClientId())
|
||||
.setCreationClientId(application.getCreationClientId())
|
||||
.setCreationTime(application.getCreationTime())
|
||||
@@ -118,18 +120,6 @@ public final class DomainApplicationInfoFlow implements Flow {
|
||||
.build();
|
||||
}
|
||||
|
||||
DomainApplication getResourceInfo(DomainApplication application) {
|
||||
if (!((Info) resourceCommand).getHostsRequest().requestDelegated()) {
|
||||
// Delegated hosts are present by default, so clear them out if they aren't wanted.
|
||||
// This requires overriding the implicit status values so that we don't get INACTIVE added due
|
||||
// to the missing nameservers.
|
||||
return application.asBuilder()
|
||||
.setNameservers(null)
|
||||
.buildWithoutImplicitStatusValues();
|
||||
}
|
||||
return application;
|
||||
}
|
||||
|
||||
ImmutableList<ResponseExtension> getDomainResponseExtensions(
|
||||
DomainApplication application, LaunchInfoExtension launchInfo) {
|
||||
ImmutableList.Builder<Mark> marksBuilder = new ImmutableList.Builder<>();
|
||||
|
||||
Reference in New Issue
Block a user