mirror of
https://github.com/google/nomulus
synced 2026-02-10 15:00:31 +00:00
Flatten and inject the poll flows
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133302791
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user