mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02: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:
parent
0234795240
commit
84009eaccb
24 changed files with 309 additions and 240 deletions
|
@ -18,7 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import static google.registry.flows.FlowUtils.validateClientIsLoggedIn;
|
||||
import static google.registry.flows.ResourceFlowUtils.handlePendingTransferOnDelete;
|
||||
import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
|
||||
import static google.registry.flows.ResourceFlowUtils.prepareDeletedResourceAsBuilder;
|
||||
import static google.registry.flows.ResourceFlowUtils.resolvePendingTransfer;
|
||||
import static google.registry.flows.ResourceFlowUtils.updateForeignKeyIndexDeletionTime;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyNoDisallowedStatuses;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfo;
|
||||
|
@ -70,6 +70,7 @@ import google.registry.model.poll.PollMessage;
|
|||
import google.registry.model.poll.PollMessage.OneTime;
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
|
@ -119,7 +120,8 @@ public final class DomainDeleteFlow implements TransactionalFlow {
|
|||
Registry registry = Registry.get(existingDomain.getTld());
|
||||
verifyDeleteAllowed(existingDomain, registry, now);
|
||||
HistoryEntry historyEntry = buildHistoryEntry(existingDomain, now);
|
||||
Builder builder = (Builder) prepareDeletedResourceAsBuilder(existingDomain, now);
|
||||
Builder builder = resolvePendingTransfer(existingDomain, TransferStatus.SERVER_CANCELLED, null);
|
||||
builder.setDeletionTime(now).setStatusValues(null);
|
||||
// If the domain is in the Add Grace Period, we delete it immediately, which is already
|
||||
// reflected in the builder we just prepared. Otherwise we give it a PENDING_DELETE status.
|
||||
if (!existingDomain.getGracePeriodStatuses().contains(GracePeriodStatus.ADD)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue