mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 06:44:51 +02:00
Remove deprecated extra flow logic and TLD-specific pricing proxy
This also adds a domain update pricing hook to DomainPricingCustomLogic. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=142286755
This commit is contained in:
parent
348cea9d8d
commit
f44557f34f
41 changed files with 494 additions and 1744 deletions
|
@ -22,7 +22,7 @@ import static com.google.common.collect.Iterables.concat;
|
|||
import static com.google.common.collect.Sets.difference;
|
||||
import static com.google.common.collect.Sets.union;
|
||||
import static google.registry.flows.EppXmlTransformer.unmarshal;
|
||||
import static google.registry.flows.domain.TldSpecificLogicProxy.getMatchingLrpToken;
|
||||
import static google.registry.flows.domain.DomainPricingLogic.getMatchingLrpToken;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.model.registry.Registries.findTldForName;
|
||||
|
@ -94,7 +94,6 @@ import google.registry.model.domain.secdns.SecDnsUpdateExtension;
|
|||
import google.registry.model.domain.secdns.SecDnsUpdateExtension.Add;
|
||||
import google.registry.model.domain.secdns.SecDnsUpdateExtension.Remove;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.eppinput.EppInput;
|
||||
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.mark.Mark;
|
||||
|
@ -586,10 +585,8 @@ public class DomainFlowUtils {
|
|||
FeeQueryCommandExtensionItem feeRequest,
|
||||
FeeQueryResponseExtensionItem.Builder<?, ?> builder,
|
||||
InternetDomainName domain,
|
||||
String clientId,
|
||||
@Nullable CurrencyUnit topLevelCurrency,
|
||||
DateTime currentDate,
|
||||
EppInput eppInput,
|
||||
DomainPricingLogic pricingLogic)
|
||||
throws EppException {
|
||||
DateTime now = currentDate;
|
||||
|
@ -617,7 +614,7 @@ public class DomainFlowUtils {
|
|||
.setCommand(feeRequest.getCommandName(), feeRequest.getPhase(), feeRequest.getSubphase())
|
||||
.setCurrencyIfSupported(registry.getCurrency())
|
||||
.setPeriod(feeRequest.getPeriod())
|
||||
.setClass(TldSpecificLogicProxy.getFeeClass(domainNameString, now).orNull());
|
||||
.setClass(pricingLogic.getFeeClass(domainNameString, now).orNull());
|
||||
|
||||
ImmutableList<Fee> fees = ImmutableList.of();
|
||||
switch (feeRequest.getCommandName()) {
|
||||
|
@ -633,26 +630,22 @@ public class DomainFlowUtils {
|
|||
break;
|
||||
case RENEW:
|
||||
builder.setAvailIfSupported(true);
|
||||
fees = TldSpecificLogicProxy.getRenewPrice(
|
||||
registry, domainNameString, clientId, now, years, eppInput).getFees();
|
||||
fees = pricingLogic.getRenewPrice(registry, domainNameString, now, years).getFees();
|
||||
break;
|
||||
case RESTORE:
|
||||
if (years != 1) {
|
||||
throw new RestoresAreAlwaysForOneYearException();
|
||||
}
|
||||
builder.setAvailIfSupported(true);
|
||||
fees = TldSpecificLogicProxy.getRestorePrice(
|
||||
registry, domainNameString, clientId, now, eppInput).getFees();
|
||||
fees = pricingLogic.getRestorePrice(registry, domainNameString, now).getFees();
|
||||
break;
|
||||
case TRANSFER:
|
||||
builder.setAvailIfSupported(true);
|
||||
fees = TldSpecificLogicProxy.getTransferPrice(
|
||||
registry, domainNameString, clientId, now, years, eppInput).getFees();
|
||||
fees = pricingLogic.getTransferPrice(registry, domainNameString, now, years).getFees();
|
||||
break;
|
||||
case UPDATE:
|
||||
builder.setAvailIfSupported(true);
|
||||
fees = TldSpecificLogicProxy.getUpdatePrice(
|
||||
registry, domainNameString, clientId, now, eppInput).getFees();
|
||||
fees = pricingLogic.getUpdatePrice(registry, domainNameString, now).getFees();
|
||||
break;
|
||||
default:
|
||||
throw new UnknownFeeCommandException(feeRequest.getUnparsedCommandName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue