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:
cgoldfeder 2016-11-01 19:50:31 -07:00 committed by Ben McIlwain
parent 82b0bff9b5
commit 053538b1b5
49 changed files with 630 additions and 569 deletions

View file

@ -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());
}
}