mirror of
https://github.com/google/nomulus
synced 2026-01-09 23:47:49 +00:00
Scope down TransferData to only ContactResource and DomainResource
HostResource and DomainApplication are not transferable, (or at least, not directly in the case of hosts) and have no need for the TransferData field. In a flat-flow world, we can push it down to where it's actually used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139201423
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
package google.registry.flows.domain;
|
||||
|
||||
import static google.registry.flows.FlowUtils.validateClientIsLoggedIn;
|
||||
import static google.registry.flows.ResourceFlowUtils.handlePendingTransferOnDelete;
|
||||
import static google.registry.flows.ResourceFlowUtils.prepareDeletedResourceAsBuilder;
|
||||
import static google.registry.flows.ResourceFlowUtils.updateForeignKeyIndexDeletionTime;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyExistence;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfo;
|
||||
@@ -100,15 +98,16 @@ public final class DomainApplicationDeleteFlow implements TransactionalFlow {
|
||||
throw new SunriseApplicationCannotBeDeletedInLandrushException();
|
||||
}
|
||||
}
|
||||
DomainApplication newApplication =
|
||||
prepareDeletedResourceAsBuilder(existingApplication, now).build();
|
||||
DomainApplication newApplication = existingApplication.asBuilder()
|
||||
.setDeletionTime(now)
|
||||
.setStatusValues(null)
|
||||
.build();
|
||||
HistoryEntry historyEntry = historyBuilder
|
||||
.setType(HistoryEntry.Type.DOMAIN_APPLICATION_DELETE)
|
||||
.setModificationTime(now)
|
||||
.setParent(Key.create(existingApplication))
|
||||
.build();
|
||||
updateForeignKeyIndexDeletionTime(newApplication);
|
||||
handlePendingTransferOnDelete(existingApplication, newApplication, now, historyEntry);
|
||||
handleExtraFlowLogic(tld, historyEntry, existingApplication, now);
|
||||
ofy().save().<Object>entities(newApplication, historyEntry);
|
||||
return responseBuilder.build();
|
||||
|
||||
Reference in New Issue
Block a user