mirror of
https://github.com/google/nomulus.git
synced 2025-05-17 09:57:17 +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
|
@ -37,22 +37,18 @@ public interface DnsCountQueryCoordinator {
|
|||
public class Params {
|
||||
public BigqueryConnection bigquery;
|
||||
|
||||
/** The year and month of the report. */
|
||||
public YearMonth yearMonth;
|
||||
|
||||
/** The Google Cloud project id. */
|
||||
public String projectId;
|
||||
|
||||
public Params(BigqueryConnection bigquery, YearMonth yearMonth, String projectId) {
|
||||
public Params(BigqueryConnection bigquery, String projectId) {
|
||||
this.bigquery = bigquery;
|
||||
this.yearMonth = yearMonth;
|
||||
this.projectId = projectId;
|
||||
}
|
||||
}
|
||||
|
||||
/** Creates the string used to query bigtable for DNS count information. */
|
||||
String createQuery();
|
||||
String createQuery(YearMonth yearMonth);
|
||||
|
||||
/** Do any necessry preparation for the DNS query. */
|
||||
void prepareForQuery() throws Exception;
|
||||
void prepareForQuery(YearMonth yearMonth) throws Exception;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue