mirror of
https://github.com/google/nomulus.git
synced 2025-06-28 07:13:34 +02:00
Flatten and inject the poll flows
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133302791
This commit is contained in:
parent
939112318b
commit
4a723576d5
6 changed files with 107 additions and 131 deletions
|
@ -26,6 +26,7 @@ import google.registry.model.domain.metadata.MetadataExtension;
|
|||
import google.registry.model.eppcommon.AuthInfo;
|
||||
import google.registry.model.eppcommon.Trid;
|
||||
import google.registry.model.eppinput.EppInput;
|
||||
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;
|
||||
|
@ -193,6 +194,13 @@ public class FlowModule {
|
|||
return ((SingleResourceCommand) resourceCommand).getTargetId();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@FlowScope
|
||||
@PollMessageId
|
||||
static String providePollMessageId(EppInput eppInput) {
|
||||
return Strings.nullToEmpty(((Poll) eppInput.getCommandWrapper().getCommand()).getMessageId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a partially filled in {@link HistoryEntry} builder.
|
||||
*
|
||||
|
@ -246,6 +254,11 @@ public class FlowModule {
|
|||
@Documented
|
||||
public @interface TargetId {}
|
||||
|
||||
/** Dagger qualifier for the message id for poll flows. */
|
||||
@Qualifier
|
||||
@Documented
|
||||
public @interface PollMessageId {}
|
||||
|
||||
/** Dagger qualifier for whether a flow is in dry run mode. */
|
||||
@Qualifier
|
||||
@Documented
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue