mirror of
https://github.com/google/nomulus.git
synced 2025-05-17 17:59:41 +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
|
@ -17,6 +17,7 @@ package google.registry.reporting.icann;
|
|||
import com.google.common.io.Resources;
|
||||
import google.registry.util.ResourceUtils;
|
||||
import google.registry.util.SqlTemplate;
|
||||
import org.joda.time.YearMonth;
|
||||
|
||||
/**
|
||||
* DNS Count query for the basic case.
|
||||
|
@ -26,7 +27,7 @@ public class BasicDnsCountQueryCoordinator implements DnsCountQueryCoordinator {
|
|||
BasicDnsCountQueryCoordinator(DnsCountQueryCoordinator.Params params) {}
|
||||
|
||||
@Override
|
||||
public String createQuery() {
|
||||
public String createQuery(YearMonth yearMonth) {
|
||||
return SqlTemplate.create(
|
||||
ResourceUtils.readResourceUtf8(
|
||||
Resources.getResource(this.getClass(), "sql/" + "dns_counts.sql")))
|
||||
|
@ -34,5 +35,5 @@ public class BasicDnsCountQueryCoordinator implements DnsCountQueryCoordinator {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void prepareForQuery() throws Exception {}
|
||||
public void prepareForQuery(YearMonth yearMonth) throws Exception {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue