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
|
@ -15,20 +15,14 @@
|
|||
package google.registry.flows;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import google.registry.model.eppcommon.Trid;
|
||||
import google.registry.model.eppinput.EppInput;
|
||||
import google.registry.model.eppinput.EppInput.CommandExtension;
|
||||
import google.registry.model.eppoutput.EppOutput;
|
||||
import google.registry.model.eppoutput.EppResponse;
|
||||
import google.registry.model.eppoutput.EppResponse.ResponseData;
|
||||
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
|
||||
import google.registry.model.eppoutput.Result;
|
||||
import google.registry.model.poll.MessageQueueInfo;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
|
@ -49,9 +43,6 @@ public abstract class Flow {
|
|||
/** Whether this flow is being run in a superuser mode that can skip some checks. */
|
||||
protected boolean isSuperuser;
|
||||
|
||||
/** The collection of allowed extensions for the flow. */
|
||||
private Set<Class<? extends CommandExtension>> validExtensions = new HashSet<>();
|
||||
|
||||
/** Flows can override this for custom initialization. */
|
||||
@SuppressWarnings("unused")
|
||||
protected void initFlow() throws EppException {}
|
||||
|
@ -107,27 +98,6 @@ public abstract class Flow {
|
|||
this.now = now;
|
||||
this.isSuperuser = isSuperuser;
|
||||
initFlow();
|
||||
validExtensions = ImmutableSet.copyOf(validExtensions);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an extension class as a valid extension for a flow.
|
||||
* Must be called in the init series of methods, as the validExtensions
|
||||
* becomes immutable once init is complete.
|
||||
*/
|
||||
@SafeVarargs
|
||||
protected final void registerExtensions(Class<? extends CommandExtension>... extensions) {
|
||||
Collections.addAll(validExtensions, extensions);
|
||||
}
|
||||
|
||||
protected final <E extends CommandExtension>
|
||||
void registerExtensions(List<Class<? extends E>> extensions) {
|
||||
validExtensions.addAll(extensions);
|
||||
}
|
||||
|
||||
/** Get the legal command extension types for this flow. */
|
||||
protected final Set<Class<? extends CommandExtension>> getValidRequestExtensions() {
|
||||
return ImmutableSet.copyOf(validExtensions);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue