mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +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
|
@ -31,6 +31,8 @@ import google.registry.model.eppinput.EppInput.Poll;
|
|||
import google.registry.model.eppinput.EppInput.ResourceCommandWrapper;
|
||||
import google.registry.model.eppinput.ResourceCommand;
|
||||
import google.registry.model.eppinput.ResourceCommand.SingleResourceCommand;
|
||||
import google.registry.model.eppoutput.EppResponse;
|
||||
import google.registry.model.eppoutput.Result;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import java.lang.annotation.Documented;
|
||||
import javax.inject.Qualifier;
|
||||
|
@ -244,6 +246,19 @@ public class FlowModule {
|
|||
return historyBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a partially filled in {@link EppResponse} builder.
|
||||
*
|
||||
* <p>This is not marked with {@link FlowScope} so that each retry gets a fresh one. Otherwise,
|
||||
* the fact that the builder is one-use would cause NPEs.
|
||||
*/
|
||||
@Provides
|
||||
static EppResponse.Builder provideEppResponseBuilder(Trid trid) {
|
||||
return new EppResponse.Builder()
|
||||
.setTrid(trid)
|
||||
.setResultFromCode(Result.Code.SUCCESS); // Default to success.
|
||||
}
|
||||
|
||||
/** Wrapper class to carry an {@link EppException} to the calling code. */
|
||||
static class EppExceptionInProviderException extends RuntimeException {
|
||||
EppExceptionInProviderException(EppException exception) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue