Add extra flow logic hooks for transfer approve, cancel and reject

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139217498
This commit is contained in:
mountford 2016-11-15 10:32:46 -08:00 committed by Ben McIlwain
parent 5262cd2854
commit fb47d2563d
12 changed files with 150 additions and 6 deletions

View file

@ -90,6 +90,7 @@ public final class DomainTransferRejectFlow implements TransactionalFlow {
checkAllowedAccessToTld(clientId, existingDomain.getTld());
DomainResource newDomain =
denyPendingTransfer(existingDomain, TransferStatus.CLIENT_REJECTED, now);
handleExtraFlowLogic(existingDomain.getTld(), historyEntry, existingDomain);
ofy().save().<ImmutableObject>entities(
newDomain,
historyEntry,
@ -105,4 +106,16 @@ public final class DomainTransferRejectFlow implements TransactionalFlow {
.setResData(createTransferResponse(targetId, newDomain.getTransferData(), null))
.build();
}
private void handleExtraFlowLogic(
String tld, HistoryEntry historyEntry, DomainResource existingDomain) throws EppException {
Optional<RegistryExtraFlowLogic> extraFlowLogic =
RegistryExtraFlowLogicProxy.newInstanceForTld(tld);
if (extraFlowLogic.isPresent()) {
extraFlowLogic.get().performAdditionalDomainTransferRejectLogic(
existingDomain,
clientId,
historyEntry);
}
}
}