Add extra flow logic hooks for application delete and update

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138393251
This commit is contained in:
mountford 2016-08-16 08:20:48 -04:00 committed by Ben McIlwain
parent cef07f6bc5
commit baaaacd4f5
10 changed files with 234 additions and 33 deletions

View file

@ -109,10 +109,21 @@ public final class DomainApplicationDeleteFlow implements TransactionalFlow {
.build();
updateForeignKeyIndexDeletionTime(newApplication);
handlePendingTransferOnDelete(existingApplication, newApplication, now, historyEntry);
handleExtraFlowLogic(tld, historyEntry, existingApplication, now);
ofy().save().<Object>entities(newApplication, historyEntry);
return responseBuilder.build();
}
private void handleExtraFlowLogic(String tld, HistoryEntry historyEntry,
DomainApplication existingApplication, DateTime now) throws EppException {
Optional<RegistryExtraFlowLogic> extraFlowLogic =
RegistryExtraFlowLogicProxy.newInstanceForTld(tld);
if (extraFlowLogic.isPresent()) {
extraFlowLogic.get().performAdditionalApplicationDeleteLogic(
existingApplication, clientId, now, eppInput, historyEntry);
}
}
/** A sunrise application cannot be deleted during landrush. */
static class SunriseApplicationCannotBeDeletedInLandrushException
extends StatusProhibitsOperationException {