mirror of
https://github.com/google/nomulus
synced 2026-04-20 08:10:50 +00:00
Switch to constructor injection in a few actions
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=232552406
This commit is contained in:
@@ -38,11 +38,22 @@ import javax.inject.Inject;
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public final class RefreshDnsAction implements Runnable {
|
||||
|
||||
@Inject Clock clock;
|
||||
@Inject DnsQueue dnsQueue;
|
||||
@Inject @Parameter("domainOrHostName") String domainOrHostName;
|
||||
@Inject @Parameter("type") TargetType type;
|
||||
@Inject RefreshDnsAction() {}
|
||||
private final Clock clock;
|
||||
private final DnsQueue dnsQueue;
|
||||
private final String domainOrHostName;
|
||||
private final TargetType type;
|
||||
|
||||
@Inject
|
||||
RefreshDnsAction(
|
||||
@Parameter("domainOrHostName") String domainOrHostName,
|
||||
@Parameter("type") TargetType type,
|
||||
Clock clock,
|
||||
DnsQueue dnsQueue) {
|
||||
this.domainOrHostName = domainOrHostName;
|
||||
this.type = type;
|
||||
this.clock = clock;
|
||||
this.dnsQueue = dnsQueue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -58,9 +58,14 @@ public class DeleteEntityAction implements Runnable {
|
||||
public static final String PATH = "/_dr/admin/deleteEntity";
|
||||
public static final String PARAM_RAW_KEYS = "rawKeys";
|
||||
|
||||
@Inject @Parameter(PARAM_RAW_KEYS) String rawKeys;
|
||||
@Inject Response response;
|
||||
@Inject DeleteEntityAction() {}
|
||||
private final String rawKeys;
|
||||
private final Response response;
|
||||
|
||||
@Inject
|
||||
DeleteEntityAction(@Parameter(PARAM_RAW_KEYS) String rawKeys, Response response) {
|
||||
this.rawKeys = rawKeys;
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Reference in New Issue
Block a user