mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 09:27:16 +02:00
Inject targetId into contact flows
Other flows to come. This removes the need for most of the flows to inject the command at all. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133163030
This commit is contained in:
parent
8c39e10dec
commit
65ef712f35
10 changed files with 38 additions and 39 deletions
|
@ -30,19 +30,18 @@ import com.googlecode.objectify.Key;
|
|||
import google.registry.config.ConfigModule.Config;
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.FlowModule.ClientId;
|
||||
import google.registry.flows.FlowModule.TargetId;
|
||||
import google.registry.flows.LoggedInFlow;
|
||||
import google.registry.flows.TransactionalFlow;
|
||||
import google.registry.flows.async.AsyncFlowUtils;
|
||||
import google.registry.flows.async.DeleteContactResourceAction;
|
||||
import google.registry.flows.async.DeleteEppResourceAction;
|
||||
import google.registry.flows.exceptions.ResourceToMutateDoesNotExistException;
|
||||
import google.registry.model.contact.ContactCommand.Delete;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.domain.metadata.MetadataExtension;
|
||||
import google.registry.model.eppcommon.AuthInfo;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.eppinput.ResourceCommand;
|
||||
import google.registry.model.eppoutput.EppOutput;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import javax.inject.Inject;
|
||||
|
@ -64,8 +63,8 @@ public class ContactDeleteFlow extends LoggedInFlow implements TransactionalFlow
|
|||
StatusValue.PENDING_DELETE,
|
||||
StatusValue.SERVER_DELETE_PROHIBITED);
|
||||
|
||||
@Inject ResourceCommand resourceCommand;
|
||||
@Inject @ClientId String clientId;
|
||||
@Inject @TargetId String targetId;
|
||||
@Inject Optional<AuthInfo> authInfo;
|
||||
@Inject @Config("asyncDeleteFlowMapreduceDelay") Duration mapreduceDelay;
|
||||
@Inject HistoryEntry.Builder historyBuilder;
|
||||
|
@ -78,8 +77,6 @@ public class ContactDeleteFlow extends LoggedInFlow implements TransactionalFlow
|
|||
|
||||
@Override
|
||||
public final EppOutput run() throws EppException {
|
||||
Delete command = (Delete) resourceCommand;
|
||||
String targetId = command.getTargetId();
|
||||
failfastForAsyncDelete(
|
||||
targetId,
|
||||
now,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue