mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02: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:
parent
82b0bff9b5
commit
053538b1b5
49 changed files with 630 additions and 569 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue