mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Remove LoggedInFlow
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=137444791
This commit is contained in:
parent
8b068250d6
commit
b84d7f1fb5
50 changed files with 763 additions and 429 deletions
|
@ -14,6 +14,7 @@
|
|||
|
||||
package google.registry.flows.host;
|
||||
|
||||
import static google.registry.flows.FlowUtils.validateClientIsLoggedIn;
|
||||
import static google.registry.flows.ResourceFlowUtils.failfastForAsyncDelete;
|
||||
import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyNoDisallowedStatuses;
|
||||
|
@ -27,9 +28,10 @@ import com.google.common.base.Optional;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.ExtensionManager;
|
||||
import google.registry.flows.Flow;
|
||||
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.AsyncFlowEnqueuer;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
|
@ -55,7 +57,7 @@ import javax.inject.Inject;
|
|||
* @error {@link google.registry.flows.exceptions.ResourceStatusProhibitsOperationException}
|
||||
* @error {@link google.registry.flows.exceptions.ResourceToDeleteIsReferencedException}
|
||||
*/
|
||||
public final class HostDeleteFlow extends LoggedInFlow implements TransactionalFlow {
|
||||
public final class HostDeleteFlow extends Flow implements TransactionalFlow {
|
||||
|
||||
private static final ImmutableSet<StatusValue> DISALLOWED_STATUSES = ImmutableSet.of(
|
||||
StatusValue.LINKED,
|
||||
|
@ -70,20 +72,19 @@ public final class HostDeleteFlow extends LoggedInFlow implements TransactionalF
|
|||
return domain.getNameservers();
|
||||
}};
|
||||
|
||||
@Inject AsyncFlowEnqueuer asyncFlowEnqueuer;
|
||||
@Inject ExtensionManager extensionManager;
|
||||
@Inject Optional<AuthInfo> authInfo;
|
||||
@Inject @ClientId String clientId;
|
||||
@Inject @TargetId String targetId;
|
||||
@Inject HistoryEntry.Builder historyBuilder;
|
||||
@Inject AsyncFlowEnqueuer asyncFlowEnqueuer;
|
||||
@Inject HostDeleteFlow() {}
|
||||
|
||||
@Override
|
||||
protected final void initLoggedInFlow() throws EppException {
|
||||
registerExtensions(MetadataExtension.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final EppOutput run() throws EppException {
|
||||
extensionManager.register(MetadataExtension.class);
|
||||
extensionManager.validate();
|
||||
validateClientIsLoggedIn(clientId);
|
||||
failfastForAsyncDelete(targetId, now, HostResource.class, GET_NAMESERVERS);
|
||||
HostResource existingHost = loadAndVerifyExistence(HostResource.class, targetId, now);
|
||||
verifyNoDisallowedStatuses(existingHost, DISALLOWED_STATUSES);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue