mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Change DomainInfoFlowCustomLogic to use the new resData objects
Warning: This is a breaking change to custom logic for domain info. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146033749
This commit is contained in:
parent
517e374925
commit
565497a6d4
2 changed files with 13 additions and 13 deletions
|
@ -93,14 +93,6 @@ public final class DomainInfoFlow implements Flow {
|
|||
DomainResource domain = loadAndVerifyExistence(DomainResource.class, targetId, now);
|
||||
verifyOptionalAuthInfo(authInfo, domain);
|
||||
customLogic.afterValidation(AfterValidationParameters.newBuilder().setDomain(domain).build());
|
||||
BeforeResponseReturnData responseData =
|
||||
customLogic.beforeResponse(
|
||||
BeforeResponseParameters.newBuilder()
|
||||
.setDomain(domain)
|
||||
.setResData(domain)
|
||||
.setResponseExtensions(getDomainResponseExtensions(domain, now))
|
||||
.build());
|
||||
domain = responseData.resData();
|
||||
prefetchReferencedResources(domain);
|
||||
// Registrars can only see a few fields on unauthorized domains.
|
||||
// This is a policy decision that is left up to us by the rfcs.
|
||||
|
@ -130,8 +122,15 @@ public final class DomainInfoFlow implements Flow {
|
|||
.setLastTransferTime(domain.getLastTransferTime())
|
||||
.setAuthInfo(domain.getAuthInfo());
|
||||
}
|
||||
BeforeResponseReturnData responseData =
|
||||
customLogic.beforeResponse(
|
||||
BeforeResponseParameters.newBuilder()
|
||||
.setDomain(domain)
|
||||
.setResData(infoBuilder.build())
|
||||
.setResponseExtensions(getDomainResponseExtensions(domain, now))
|
||||
.build());
|
||||
return responseBuilder
|
||||
.setResData(infoBuilder.build())
|
||||
.setResData(responseData.resData())
|
||||
.setExtensions(responseData.responseExtensions())
|
||||
.build();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue