mirror of
https://github.com/google/nomulus
synced 2026-01-11 00:10:36 +00:00
Inject targetId into contact flows
Other flows to come. This removes the need for most of the flows to inject the command at all. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133163030
This commit is contained in:
@@ -186,6 +186,13 @@ public class FlowModule {
|
||||
return Optional.fromNullable(((SingleResourceCommand) resourceCommand).getAuthInfo());
|
||||
}
|
||||
|
||||
@Provides
|
||||
@FlowScope
|
||||
@TargetId
|
||||
static String provideTargetId(ResourceCommand resourceCommand) {
|
||||
return ((SingleResourceCommand) resourceCommand).getTargetId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a partially filled in {@link HistoryEntry} builder.
|
||||
*
|
||||
@@ -234,6 +241,11 @@ public class FlowModule {
|
||||
@Documented
|
||||
public @interface ClientId {}
|
||||
|
||||
/** Dagger qualifier for the target id (foreign key) for single resource flows. */
|
||||
@Qualifier
|
||||
@Documented
|
||||
public @interface TargetId {}
|
||||
|
||||
/** Dagger qualifier for whether a flow is in dry run mode. */
|
||||
@Qualifier
|
||||
@Documented
|
||||
|
||||
Reference in New Issue
Block a user