mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02: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:
parent
8c39e10dec
commit
65ef712f35
10 changed files with 38 additions and 39 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue