mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Only inject @Parameter-created variables in the Action itself
Icann reports have 3 parameter-provided injections: - yearMonth - subdir - reportType We move all of them away from the "inner classes" and only @Inject them in the Actions themselves. This has 2 benefits: - it's much clearer what all the parameter inputs of the Actions are - the "inner injected classes" don't assume anything about the Action that uses them - they will work just as well for JSON actions as for "regular" actions. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=233625765
This commit is contained in:
parent
e6c46cab58
commit
4097dae3b2
20 changed files with 364 additions and 270 deletions
|
@ -21,7 +21,6 @@ import dagger.Module;
|
|||
import dagger.Provides;
|
||||
import google.registry.bigquery.BigqueryConnection;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import org.joda.time.YearMonth;
|
||||
|
||||
/** Dagger module to provide the DnsCountQueryCoordinator. */
|
||||
@Module
|
||||
|
@ -31,10 +30,9 @@ public class DnsCountQueryCoordinatorModule {
|
|||
static DnsCountQueryCoordinator provideDnsCountQueryCoordinator(
|
||||
@Config("dnsCountQueryCoordinatorClass") String customClass,
|
||||
BigqueryConnection bigquery,
|
||||
YearMonth yearMonth,
|
||||
@Config("projectId") String projectId) {
|
||||
DnsCountQueryCoordinator.Params params =
|
||||
new DnsCountQueryCoordinator.Params(bigquery, yearMonth, projectId);
|
||||
new DnsCountQueryCoordinator.Params(bigquery, projectId);
|
||||
DnsCountQueryCoordinator result =
|
||||
instantiate(getClassFromString(customClass, DnsCountQueryCoordinator.class), params);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue