mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Rename TldSpecificLogicEngine to TldSpecificLogicProxy
This new name is a more accurate description of what the actual class does. TldSpecificLogicEngine is an interface that will be added in the near future, implementations of which will provide custom per-TLD logic. The class being renamed is more properly a proxy that only handles logic generic to all TLDs. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=127088913
This commit is contained in:
parent
b74ab4bc27
commit
cd23ece924
4 changed files with 119 additions and 12 deletions
|
@ -65,8 +65,8 @@ import google.registry.model.registry.Registry;
|
|||
import google.registry.model.registry.Registry.TldState;
|
||||
import google.registry.model.smd.SignedMark;
|
||||
import google.registry.model.tmch.ClaimsListShard;
|
||||
import google.registry.pricing.TldSpecificLogicEngine;
|
||||
import google.registry.pricing.TldSpecificLogicEngine.EppCommandOperations;
|
||||
import google.registry.pricing.TldSpecificLogicProxy;
|
||||
import google.registry.pricing.TldSpecificLogicProxy.EppCommandOperations;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -180,7 +180,7 @@ public abstract class BaseDomainCreateFlow<R extends DomainBase, B extends Build
|
|||
tldState = registry.getTldState(now);
|
||||
checkRegistryStateForTld(tld);
|
||||
domainLabel = domainName.parts().get(0);
|
||||
commandOperations = TldSpecificLogicEngine.getCreatePrice(
|
||||
commandOperations = TldSpecificLogicProxy.getCreatePrice(
|
||||
registry, domainName.toString(), now, command.getPeriod().getValue());
|
||||
// The TLD should always be the parent of the requested domain name.
|
||||
isAnchorTenantViaReservation = matchesAnchorTenantReservation(
|
||||
|
|
|
@ -88,7 +88,7 @@ import google.registry.model.smd.AbstractSignedMark;
|
|||
import google.registry.model.smd.EncodedSignedMark;
|
||||
import google.registry.model.smd.SignedMark;
|
||||
import google.registry.model.smd.SignedMarkRevocationList;
|
||||
import google.registry.pricing.TldSpecificLogicEngine;
|
||||
import google.registry.pricing.TldSpecificLogicProxy;
|
||||
import google.registry.tmch.TmchXmlSignature;
|
||||
import google.registry.tmch.TmchXmlSignature.CertificateSignatureException;
|
||||
import google.registry.util.Idn;
|
||||
|
@ -580,7 +580,7 @@ public class DomainFlowUtils {
|
|||
.setCommand(feeCommand)
|
||||
.setCurrency(registry.getCurrency())
|
||||
.setPeriod(feeRequest.getPeriod())
|
||||
.setClass(TldSpecificLogicEngine.getFeeClass(domainName, now).orNull());
|
||||
.setClass(TldSpecificLogicProxy.getFeeClass(domainName, now).orNull());
|
||||
|
||||
switch (feeCommand.getCommand()) {
|
||||
case UNKNOWN:
|
||||
|
@ -590,7 +590,7 @@ public class DomainFlowUtils {
|
|||
builder.setClass("reserved"); // Override whatever class we've set above.
|
||||
} else {
|
||||
builder.setFees(
|
||||
TldSpecificLogicEngine.getCreatePrice(registry, domainName, now, years).getFees());
|
||||
TldSpecificLogicProxy.getCreatePrice(registry, domainName, now, years).getFees());
|
||||
}
|
||||
break;
|
||||
case RESTORE:
|
||||
|
@ -598,12 +598,12 @@ public class DomainFlowUtils {
|
|||
throw new RestoresAreAlwaysForOneYearException();
|
||||
}
|
||||
builder.setFees(
|
||||
TldSpecificLogicEngine.getRestorePrice(registry, domainName, now, years).getFees());
|
||||
TldSpecificLogicProxy.getRestorePrice(registry, domainName, now, years).getFees());
|
||||
break;
|
||||
default:
|
||||
// Anything else (transfer|renew) will have a "renew" fee.
|
||||
builder.setFees(
|
||||
TldSpecificLogicEngine.getRenewPrice(registry, domainName, now, years).getFees());
|
||||
TldSpecificLogicProxy.getRenewPrice(registry, domainName, now, years).getFees());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@ import org.joda.money.Money;
|
|||
import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
* Provides specialized pricing, billing and update logic per TLD. TODO: consider making these
|
||||
* methods of Registry.
|
||||
* Provides pricing, billing, and update logic, with call-outs that can be customized by providing
|
||||
* implementations on a per-TLD basis.
|
||||
*/
|
||||
public final class TldSpecificLogicEngine {
|
||||
public final class TldSpecificLogicProxy {
|
||||
|
||||
private static final String EAP_DESCRIPTION_FORMAT = "Early Access Period, fee expires: %s";
|
||||
|
||||
|
@ -80,7 +80,7 @@ public final class TldSpecificLogicEngine {
|
|||
}
|
||||
}
|
||||
|
||||
private TldSpecificLogicEngine() {}
|
||||
private TldSpecificLogicProxy() {}
|
||||
|
||||
/**
|
||||
* Returns a new "create" price for the Pricer.
|
Loading…
Add table
Add a link
Reference in a new issue