Remove as-of date from argument list for extra create flow logic

Lai points out that, for creation, the as-of date should always be equal to the creation time. And, in fact, there was a check to throw an exception if that is not the case. So it's more straightforward just to remove that argument entirely.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138783711
This commit is contained in:
mountford 2016-11-10 11:27:50 -08:00 committed by Ben McIlwain
parent 07a6e55f82
commit 0634e25822
3 changed files with 2 additions and 5 deletions

View file

@ -269,7 +269,7 @@ public class DomainCreateFlow implements TransactionalFlow {
.setContacts(command.getContacts()) .setContacts(command.getContacts())
.addGracePeriod(GracePeriod.forBillingEvent(GracePeriodStatus.ADD, createBillingEvent)) .addGracePeriod(GracePeriod.forBillingEvent(GracePeriodStatus.ADD, createBillingEvent))
.build(); .build();
handleExtraFlowLogic(registry.getTldStr(), years, historyEntry, newDomain, now); handleExtraFlowLogic(registry.getTldStr(), years, historyEntry, newDomain);
entitiesToSave.add( entitiesToSave.add(
newDomain, newDomain,
ForeignKeyIndex.create(newDomain, newDomain.getDeletionTime()), ForeignKeyIndex.create(newDomain, newDomain.getDeletionTime()),
@ -396,7 +396,7 @@ public class DomainCreateFlow implements TransactionalFlow {
} }
private void handleExtraFlowLogic( private void handleExtraFlowLogic(
String tld, int years, HistoryEntry historyEntry, DomainResource newDomain, DateTime now) String tld, int years, HistoryEntry historyEntry, DomainResource newDomain)
throws EppException { throws EppException {
Optional<RegistryExtraFlowLogic> extraFlowLogic = Optional<RegistryExtraFlowLogic> extraFlowLogic =
RegistryExtraFlowLogicProxy.newInstanceForTld(tld); RegistryExtraFlowLogicProxy.newInstanceForTld(tld);
@ -404,7 +404,6 @@ public class DomainCreateFlow implements TransactionalFlow {
extraFlowLogic.get().performAdditionalDomainCreateLogic( extraFlowLogic.get().performAdditionalDomainCreateLogic(
newDomain, newDomain,
clientId, clientId,
now,
years, years,
eppInput, eppInput,
historyEntry); historyEntry);

View file

@ -89,7 +89,6 @@ public interface RegistryExtraFlowLogic {
public void performAdditionalDomainCreateLogic( public void performAdditionalDomainCreateLogic(
DomainResource domain, DomainResource domain,
String clientId, String clientId,
DateTime asOfDate,
int years, int years,
EppInput eppInput, EppInput eppInput,
HistoryEntry historyEntry) throws EppException; HistoryEntry historyEntry) throws EppException;

View file

@ -198,7 +198,6 @@ public class TestExtraLogicManager implements RegistryExtraFlowLogic {
public void performAdditionalDomainCreateLogic( public void performAdditionalDomainCreateLogic(
DomainResource domain, DomainResource domain,
String clientId, String clientId,
DateTime asOfDate,
int years, int years,
EppInput eppInput, EppInput eppInput,
HistoryEntry historyEntry) throws EppException { HistoryEntry historyEntry) throws EppException {