mirror of
https://github.com/google/nomulus
synced 2026-02-10 06:50:30 +00:00
Turn Flow into an interface and inject all its fields
This concludes your flow flattening experience. Please fill out a flow flattening satisfaction survey before exiting. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=137903095
This commit is contained in:
@@ -17,19 +17,20 @@ package google.registry.flows.session;
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.ExtensionManager;
|
||||
import google.registry.flows.Flow;
|
||||
import google.registry.model.eppoutput.EppOutput;
|
||||
import google.registry.model.eppoutput.Greeting;
|
||||
import google.registry.util.Clock;
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** A flow for an Epp "hello". */
|
||||
public class HelloFlow extends Flow {
|
||||
public class HelloFlow implements Flow {
|
||||
|
||||
@Inject ExtensionManager extensionManager;
|
||||
@Inject Clock clock;
|
||||
@Inject HelloFlow() {}
|
||||
|
||||
@Override
|
||||
public EppOutput run() throws EppException {
|
||||
public Greeting run() throws EppException {
|
||||
extensionManager.validate(); // There are no legal extensions for this flow.
|
||||
return EppOutput.create(Greeting.create(now));
|
||||
return Greeting.create(clock.nowUtc());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user