mirror of
https://github.com/google/nomulus.git
synced 2025-05-19 18:59:35 +02:00
Rename Runnable classes from Tasks to Actions
This is cleanup relating to a naming decision that we made awhile ago but never got around to. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117244827
This commit is contained in:
parent
5f7bf57cf9
commit
57fa57968d
48 changed files with 320 additions and 318 deletions
|
@ -132,7 +132,7 @@ public final class ConfigModule {
|
|||
return projectId + "-icann-brda";
|
||||
}
|
||||
|
||||
/** @see com.google.domain.registry.rde.BrdaCopyTask */
|
||||
/** @see com.google.domain.registry.rde.BrdaCopyAction */
|
||||
@Provides
|
||||
@Config("brdaDayOfWeek")
|
||||
public static int provideBrdaDayOfWeek() {
|
||||
|
@ -238,8 +238,8 @@ public final class ConfigModule {
|
|||
/**
|
||||
* Returns the publicly accessible domain name for the running Google Apps instance.
|
||||
*
|
||||
* @see com.google.domain.registry.export.SyncGroupMembersTask
|
||||
* @see com.google.domain.registry.tools.server.CreateGroupsTask
|
||||
* @see com.google.domain.registry.export.SyncGroupMembersAction
|
||||
* @see com.google.domain.registry.tools.server.CreateGroupsAction
|
||||
*/
|
||||
@Provides
|
||||
@Config("publicDomainName")
|
||||
|
@ -264,7 +264,7 @@ public final class ConfigModule {
|
|||
* <p>This file needs to be downloaded at least once a day and verified to make sure it was
|
||||
* signed by {@code icann-tmch.crt}.
|
||||
*
|
||||
* @see com.google.domain.registry.tmch.TmchCrlTask
|
||||
* @see com.google.domain.registry.tmch.TmchCrlAction
|
||||
* @see "http://tools.ietf.org/html/draft-lozano-tmch-func-spec-08#section-5.2.3.2"
|
||||
*/
|
||||
@Provides
|
||||
|
@ -325,7 +325,7 @@ public final class ConfigModule {
|
|||
*
|
||||
* <p>You must append {@code "/TLD/ID"} to this URL.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.RdeReportTask
|
||||
* @see com.google.domain.registry.rde.RdeReportAction
|
||||
*/
|
||||
@Provides
|
||||
@Config("rdeReportUrlPrefix")
|
||||
|
@ -382,7 +382,7 @@ public final class ConfigModule {
|
|||
* which cloud storage files are uploaded. The password should not be included, as it's better to
|
||||
* use public key authentication.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.RdeUploadTask
|
||||
* @see com.google.domain.registry.rde.RdeUploadAction
|
||||
*/
|
||||
@Provides
|
||||
@Config("rdeUploadUrl")
|
||||
|
@ -407,7 +407,7 @@ public final class ConfigModule {
|
|||
*
|
||||
* <p>This ID, as you'd expect, comes from the URL of the spreadsheet.
|
||||
*
|
||||
* @see com.google.domain.registry.export.sheet.SyncRegistrarsSheetTask
|
||||
* @see com.google.domain.registry.export.sheet.SyncRegistrarsSheetAction
|
||||
*/
|
||||
@Provides
|
||||
@Config("sheetRegistrarId")
|
||||
|
@ -437,7 +437,7 @@ public final class ConfigModule {
|
|||
/**
|
||||
* Returns SSH client connection and read timeout.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.RdeUploadTask
|
||||
* @see com.google.domain.registry.rde.RdeUploadAction
|
||||
*/
|
||||
@Provides
|
||||
@Config("sshTimeout")
|
||||
|
|
|
@ -28,15 +28,15 @@ import com.google.domain.registry.util.Clock;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** Endpoint for manually triggering refresh of DNS information. */
|
||||
/** Action that manually triggers refresh of DNS information. */
|
||||
@Action(path = "/_dr/dnsRefresh", automaticallyPrintOk = true)
|
||||
public final class RefreshDns implements Runnable {
|
||||
public final class RefreshDnsAction implements Runnable {
|
||||
|
||||
@Inject Clock clock;
|
||||
@Inject DnsQueue dnsQueue;
|
||||
@Inject @Parameter("name") String domainOrHostName;
|
||||
@Inject @Parameter("type") TargetType type;
|
||||
@Inject RefreshDns() {}
|
||||
@Inject RefreshDnsAction() {}
|
||||
|
||||
@Override
|
||||
public void run() {
|
|
@ -49,9 +49,9 @@ import java.util.concurrent.Callable;
|
|||
import javax.inject.Inject;
|
||||
import javax.inject.Provider;
|
||||
|
||||
/** Task that consumes pull-queue for zone updates to write to the DNS server. */
|
||||
/** Action that consumes pull-queue for zone updates to write to the DNS server. */
|
||||
@Action(path = "/_dr/task/writeDns", method = POST, automaticallyPrintOk = true)
|
||||
public final class WriteDnsTask implements Runnable, Callable<Void> {
|
||||
public final class WriteDnsAction implements Runnable, Callable<Void> {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
|
||||
|
@ -59,7 +59,7 @@ public final class WriteDnsTask implements Runnable, Callable<Void> {
|
|||
@Inject Provider<DnsWriter> writerProvider;
|
||||
@Inject @Config("dnsWriteLockTimeout") Duration timeout;
|
||||
@Inject @Parameter(RequestParameters.PARAM_TLD) String tld;
|
||||
@Inject WriteDnsTask() {}
|
||||
@Inject WriteDnsAction() {}
|
||||
|
||||
/** Runs the task. */
|
||||
@Override
|
|
@ -34,9 +34,9 @@ import com.google.domain.registry.util.FormattingLogger;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** Exports the publicly viewable reserved terms list for a TLD to Google Drive. */
|
||||
/** Action that exports the publicly viewable reserved terms list for a TLD to Google Drive. */
|
||||
@Action(path = "/_dr/task/exportReservedTerms", method = POST)
|
||||
public class ExportReservedTermsTask implements Runnable {
|
||||
public class ExportReservedTermsAction implements Runnable {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
static final MediaType EXPORT_MIME_TYPE = MediaType.PLAIN_TEXT_UTF_8;
|
||||
|
@ -45,7 +45,7 @@ public class ExportReservedTermsTask implements Runnable {
|
|||
@Inject DriveConnection driveConnection;
|
||||
@Inject @Parameter(RequestParameters.PARAM_TLD) String tld;
|
||||
@Inject Response response;
|
||||
@Inject ExportReservedTermsTask() {}
|
||||
@Inject ExportReservedTermsAction() {}
|
||||
|
||||
/**
|
||||
* Exports the reserved terms for the TLD specified via the "tld" param to a newline-delimited
|
|
@ -48,10 +48,12 @@ import javax.annotation.Nullable;
|
|||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* Syncs changes to {@link RegistrarContact} entities with Google Groups using the Directory API.
|
||||
* Action that syncs changes to {@link RegistrarContact} entities with Google Groups.
|
||||
*
|
||||
* <p>This uses the <a href="https://developers.google.com/admin-sdk/directory/">Directory API</a>.
|
||||
*/
|
||||
@Action(path = "/_dr/task/syncGroupMembers", method = POST)
|
||||
public final class SyncGroupMembersTask implements Runnable {
|
||||
public final class SyncGroupMembersAction implements Runnable {
|
||||
|
||||
/**
|
||||
* The number of threads to run simultaneously (one per registrar) while processing group syncs.
|
||||
|
@ -90,7 +92,7 @@ public final class SyncGroupMembersTask implements Runnable {
|
|||
@Inject GroupsConnection groupsConnection;
|
||||
@Inject Response response;
|
||||
@Inject @Config("publicDomainName") String publicDomainName;
|
||||
@Inject SyncGroupMembersTask() {}
|
||||
@Inject SyncGroupMembersAction() {}
|
||||
|
||||
private void sendResponse(Result result, @Nullable List<Throwable> causes) {
|
||||
for (Throwable cause : nullToEmpty(causes)) {
|
|
@ -49,7 +49,7 @@ import javax.inject.Inject;
|
|||
/**
|
||||
* Class for synchronizing all {@link Registrar} datastore objects to a Google Spreadsheet.
|
||||
*
|
||||
* @see SyncRegistrarsSheetTask
|
||||
* @see SyncRegistrarsSheetAction
|
||||
*/
|
||||
class SyncRegistrarsSheet {
|
||||
|
||||
|
|
|
@ -46,14 +46,14 @@ import javax.annotation.Nullable;
|
|||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* Task for synchronizing the registrars spreadsheet.
|
||||
* Action for synchronizing the registrars spreadsheet.
|
||||
*
|
||||
* <p>You can specify the spreadsheet ID by passing the "id" parameter. If this parameter is not
|
||||
* specified, then the spreadsheet ID will be obtained from the registry configuration.
|
||||
*
|
||||
* <p>Cron will run this task hourly. So in order to minimize Google Spreadsheets I/O, this task
|
||||
* <p>Cron will run this action hourly. So in order to minimize Google Spreadsheets I/O, this action
|
||||
* will iterate through all registrars and check if any entries were modified in the past hour. If
|
||||
* no modifications were made, the task will exit without performing any syncing.
|
||||
* no modifications were made, the action will exit without performing any syncing.
|
||||
*
|
||||
* <p><b>Note:</b> Setting the "id" parameter will disable the registrar update check.
|
||||
*
|
||||
|
@ -63,8 +63,8 @@ import javax.inject.Inject;
|
|||
*
|
||||
* @see SyncRegistrarsSheet
|
||||
*/
|
||||
@Action(path = SyncRegistrarsSheetTask.PATH, method = POST)
|
||||
public class SyncRegistrarsSheetTask implements Runnable {
|
||||
@Action(path = SyncRegistrarsSheetAction.PATH, method = POST)
|
||||
public class SyncRegistrarsSheetAction implements Runnable {
|
||||
|
||||
private enum Result {
|
||||
OK(SC_OK, "Sheet successfully updated."),
|
||||
|
@ -116,7 +116,7 @@ public class SyncRegistrarsSheetTask implements Runnable {
|
|||
@Inject @Config("sheetRegistrarId") Optional<String> idConfig;
|
||||
@Inject @Config("sheetRegistrarInterval") Duration interval;
|
||||
@Inject @Parameter("id") Optional<String> idParam;
|
||||
@Inject SyncRegistrarsSheetTask() {}
|
||||
@Inject SyncRegistrarsSheetAction() {}
|
||||
|
||||
@Override
|
||||
public void run() {
|
|
@ -38,7 +38,7 @@ public interface Keyring extends AutoCloseable {
|
|||
* <p>This keypair should only be known to the domain registry shared
|
||||
* registry system.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.RdeUploadTask
|
||||
* @see com.google.domain.registry.rde.RdeUploadAction
|
||||
*/
|
||||
PGPKeyPair getRdeSigningKey();
|
||||
|
||||
|
@ -65,28 +65,28 @@ public interface Keyring extends AutoCloseable {
|
|||
* invocation of the RDE upload thing.
|
||||
*
|
||||
* @see #getRdeStagingEncryptionKey()
|
||||
* @see com.google.domain.registry.rde.RdeUploadTask
|
||||
* @see com.google.domain.registry.rde.RdeUploadAction
|
||||
*/
|
||||
PGPPrivateKey getRdeStagingDecryptionKey();
|
||||
|
||||
/**
|
||||
* Returns public key of escrow agent for encrypting deposits as they're uploaded.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.RdeUploadTask
|
||||
* @see com.google.domain.registry.rde.RdeUploadAction
|
||||
*/
|
||||
PGPPublicKey getRdeReceiverKey();
|
||||
|
||||
/**
|
||||
* Returns the PGP key we use to sign Bulk Registration Data Access (BRDA) deposits.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.BrdaCopyTask
|
||||
* @see com.google.domain.registry.rde.BrdaCopyAction
|
||||
*/
|
||||
PGPKeyPair getBrdaSigningKey();
|
||||
|
||||
/**
|
||||
* Returns public key of receiver of Bulk Registration Data Access (BRDA) deposits.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.BrdaCopyTask
|
||||
* @see com.google.domain.registry.rde.BrdaCopyAction
|
||||
*/
|
||||
PGPPublicKey getBrdaReceiverKey();
|
||||
|
||||
|
@ -97,7 +97,7 @@ public interface Keyring extends AutoCloseable {
|
|||
* {@code ~/.ssh/id_rsa.pub} file. It's usually a single line with the name of
|
||||
* the algorithm, the base64 key, and the email address of the owner.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.RdeUploadTask
|
||||
* @see com.google.domain.registry.rde.RdeUploadAction
|
||||
*/
|
||||
String getRdeSshClientPublicKey();
|
||||
|
||||
|
@ -112,21 +112,21 @@ public interface Keyring extends AutoCloseable {
|
|||
* admin console. The request should originate from a backend task queue servlet
|
||||
* invocation of the RDE upload thing.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.RdeUploadTask
|
||||
* @see com.google.domain.registry.rde.RdeUploadAction
|
||||
*/
|
||||
String getRdeSshClientPrivateKey();
|
||||
|
||||
/**
|
||||
* Returns password to be used when uploading reports to ICANN.
|
||||
*
|
||||
* @see com.google.domain.registry.rde.RdeReportTask
|
||||
* @see com.google.domain.registry.rde.RdeReportAction
|
||||
*/
|
||||
String getIcannReportingPassword();
|
||||
|
||||
/**
|
||||
* Returns {@code user:password} login for TMCH MarksDB HTTP server DNL interface.
|
||||
*
|
||||
* @see com.google.domain.registry.tmch.TmchDnlTask
|
||||
* @see com.google.domain.registry.tmch.TmchDnlAction
|
||||
*/
|
||||
String getMarksdbDnlLogin();
|
||||
|
||||
|
@ -140,7 +140,7 @@ public interface Keyring extends AutoCloseable {
|
|||
/**
|
||||
* Returns {@code user:password} login for TMCH MarksDB HTTP server SMDRL interface.
|
||||
*
|
||||
* @see com.google.domain.registry.tmch.TmchSmdrlTask
|
||||
* @see com.google.domain.registry.tmch.TmchSmdrlAction
|
||||
*/
|
||||
String getMarksdbSmdrlLogin();
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
@Module
|
||||
public final class LoadTestModule {
|
||||
|
||||
// There's already an @Parameter("clientId") for CreateGroupsTask that's only optional, and we
|
||||
// There's already an @Parameter("clientId") for CreateGroupsAction that's only optional, and we
|
||||
// want this one to be required, so give it a different name.
|
||||
@Provides
|
||||
@Parameter("loadtestClientId")
|
||||
|
|
|
@ -52,10 +52,10 @@ public class RegistryCursor extends ImmutableObject {
|
|||
* of each other will be merged into a single deposit. This is problematic in situations where
|
||||
* the cursor might be a few days behind and is trying to catch up.
|
||||
*
|
||||
* <p>The way we solve this problem is by having {@code RdeUploadTask} check this cursor before
|
||||
* performing an upload for a given TLD. If the cursor is less than two hours old, the task will
|
||||
* fail with a status code above 300 and App Engine will keep retrying the task until it's
|
||||
* ready.
|
||||
* <p>The way we solve this problem is by having {@code RdeUploadAction} check this cursor
|
||||
* before performing an upload for a given TLD. If the cursor is less than two hours old, the
|
||||
* action will fail with a status code above 300 and App Engine will keep retrying the action
|
||||
* until it's ready.
|
||||
*/
|
||||
RDE_UPLOAD_SFTP;
|
||||
}
|
||||
|
|
|
@ -25,34 +25,34 @@ import com.google.domain.registry.cron.TldFanoutAction;
|
|||
import com.google.domain.registry.dns.DnsModule;
|
||||
import com.google.domain.registry.dns.PublishDnsUpdatesAction;
|
||||
import com.google.domain.registry.dns.ReadDnsQueueAction;
|
||||
import com.google.domain.registry.dns.RefreshDns;
|
||||
import com.google.domain.registry.dns.WriteDnsTask;
|
||||
import com.google.domain.registry.dns.RefreshDnsAction;
|
||||
import com.google.domain.registry.dns.WriteDnsAction;
|
||||
import com.google.domain.registry.export.BigqueryPollJobAction;
|
||||
import com.google.domain.registry.export.ExportDomainListsAction;
|
||||
import com.google.domain.registry.export.ExportRequestModule;
|
||||
import com.google.domain.registry.export.ExportReservedTermsTask;
|
||||
import com.google.domain.registry.export.SyncGroupMembersTask;
|
||||
import com.google.domain.registry.export.ExportReservedTermsAction;
|
||||
import com.google.domain.registry.export.SyncGroupMembersAction;
|
||||
import com.google.domain.registry.export.sheet.SheetModule;
|
||||
import com.google.domain.registry.export.sheet.SyncRegistrarsSheetTask;
|
||||
import com.google.domain.registry.export.sheet.SyncRegistrarsSheetAction;
|
||||
import com.google.domain.registry.flows.async.AsyncFlowsModule;
|
||||
import com.google.domain.registry.flows.async.DeleteContactResourceAction;
|
||||
import com.google.domain.registry.flows.async.DeleteHostResourceAction;
|
||||
import com.google.domain.registry.flows.async.DnsRefreshForHostRenameAction;
|
||||
import com.google.domain.registry.mapreduce.MapreduceModule;
|
||||
import com.google.domain.registry.rde.BrdaCopyTask;
|
||||
import com.google.domain.registry.rde.BrdaCopyAction;
|
||||
import com.google.domain.registry.rde.RdeModule;
|
||||
import com.google.domain.registry.rde.RdeReportTask;
|
||||
import com.google.domain.registry.rde.RdeReportAction;
|
||||
import com.google.domain.registry.rde.RdeReporter;
|
||||
import com.google.domain.registry.rde.RdeStagingAction;
|
||||
import com.google.domain.registry.rde.RdeUploadTask;
|
||||
import com.google.domain.registry.rde.RdeUploadAction;
|
||||
import com.google.domain.registry.request.RequestModule;
|
||||
import com.google.domain.registry.request.RequestScope;
|
||||
import com.google.domain.registry.tmch.NordnUploadAction;
|
||||
import com.google.domain.registry.tmch.NordnVerifyAction;
|
||||
import com.google.domain.registry.tmch.TmchCrlTask;
|
||||
import com.google.domain.registry.tmch.TmchDnlTask;
|
||||
import com.google.domain.registry.tmch.TmchCrlAction;
|
||||
import com.google.domain.registry.tmch.TmchDnlAction;
|
||||
import com.google.domain.registry.tmch.TmchModule;
|
||||
import com.google.domain.registry.tmch.TmchSmdrlTask;
|
||||
import com.google.domain.registry.tmch.TmchSmdrlAction;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
|
@ -74,7 +74,7 @@ import dagger.Subcomponent;
|
|||
})
|
||||
interface BackendRequestComponent {
|
||||
BigqueryPollJobAction bigqueryPollJobAction();
|
||||
BrdaCopyTask brdaCopyTask();
|
||||
BrdaCopyAction brdaCopyAction();
|
||||
CommitLogCheckpointAction commitLogCheckpointAction();
|
||||
CommitLogFanoutAction commitLogFanoutAction();
|
||||
DeleteContactResourceAction deleteContactResourceAction();
|
||||
|
@ -83,22 +83,22 @@ interface BackendRequestComponent {
|
|||
DnsRefreshForHostRenameAction dnsRefreshForHostRenameAction();
|
||||
ExportCommitLogDiffAction exportCommitLogDiffAction();
|
||||
ExportDomainListsAction exportDomainListsAction();
|
||||
ExportReservedTermsTask exportReservedTermsTask();
|
||||
ExportReservedTermsAction exportReservedTermsAction();
|
||||
NordnUploadAction nordnUploadAction();
|
||||
NordnVerifyAction nordnVerifyAction();
|
||||
PublishDnsUpdatesAction publishDnsUpdatesAction();
|
||||
ReadDnsQueueAction readDnsQueueAction();
|
||||
RdeReportTask rdeReportTask();
|
||||
RdeReportAction rdeReportAction();
|
||||
RdeStagingAction rdeStagingAction();
|
||||
RdeUploadTask rdeUploadTask();
|
||||
RdeUploadAction rdeUploadAction();
|
||||
RdeReporter rdeReporter();
|
||||
RefreshDns refreshDns();
|
||||
RefreshDnsAction refreshDnsAction();
|
||||
RestoreCommitLogsAction restoreCommitLogsAction();
|
||||
SyncGroupMembersTask syncGroupMembersTask();
|
||||
SyncRegistrarsSheetTask syncRegistrarsSheetTask();
|
||||
SyncGroupMembersAction syncGroupMembersAction();
|
||||
SyncRegistrarsSheetAction syncRegistrarsSheetAction();
|
||||
TldFanoutAction tldFanoutAction();
|
||||
TmchCrlTask tmchCrlTask();
|
||||
TmchDnlTask tmchDnlTask();
|
||||
TmchSmdrlTask tmchSmdrlTask();
|
||||
WriteDnsTask writeDnsTask();
|
||||
TmchCrlAction tmchCrlAction();
|
||||
TmchDnlAction tmchDnlAction();
|
||||
TmchSmdrlAction tmchSmdrlAction();
|
||||
WriteDnsAction writeDnsAction();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.google.domain.registry.request.RequestModule;
|
|||
import com.google.domain.registry.request.RequestScope;
|
||||
import com.google.domain.registry.tools.mapreduce.DeleteProberDataAction;
|
||||
import com.google.domain.registry.tools.mapreduce.ResaveAllEppResourcesAction;
|
||||
import com.google.domain.registry.tools.server.CreateGroupsTask;
|
||||
import com.google.domain.registry.tools.server.CreateGroupsAction;
|
||||
import com.google.domain.registry.tools.server.CreatePremiumListAction;
|
||||
import com.google.domain.registry.tools.server.DeleteEntityAction;
|
||||
import com.google.domain.registry.tools.server.GenerateZoneFilesAction;
|
||||
|
@ -52,7 +52,7 @@ import dagger.Subcomponent;
|
|||
})
|
||||
interface ToolsRequestComponent {
|
||||
AnnihilateNonDefaultNamespacesAction annihilateNonDefaultNamespacesAction();
|
||||
CreateGroupsTask createGroupsTask();
|
||||
CreateGroupsAction createGroupsAction();
|
||||
CreatePremiumListAction createPremiumListAction();
|
||||
DeleteEntityAction deleteEntityAction();
|
||||
DeleteProberDataAction deleteProberDataAction();
|
||||
|
|
|
@ -43,11 +43,11 @@ import java.io.OutputStream;
|
|||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* Task that re-encrypts a BRDA escrow deposit and puts it into the upload bucket.
|
||||
* Action that re-encrypts a BRDA escrow deposit and puts it into the upload bucket.
|
||||
*
|
||||
* <p>This task is run by the mapreduce for each BRDA staging file it generates. The staging file is
|
||||
* encrypted with our internal {@link Ghostryde} encryption. We then re-encrypt it as a RyDE file,
|
||||
* which is what the third-party escrow provider understands.
|
||||
* <p>This action is run by the mapreduce for each BRDA staging file it generates. The staging file
|
||||
* is encrypted with our internal {@link Ghostryde} encryption. We then re-encrypt it as a RyDE
|
||||
* file, which is what the third-party escrow provider understands.
|
||||
*
|
||||
* <p>Then we put the RyDE file (along with our digital signature) into the configured BRDA bucket.
|
||||
* This bucket is special because a separate script will rsync it to the third party escrow provider
|
||||
|
@ -55,8 +55,8 @@ import javax.inject.Inject;
|
|||
*
|
||||
* @see "http://newgtlds.icann.org/en/applicants/agb/agreement-approved-09jan14-en.htm"
|
||||
*/
|
||||
@Action(path = BrdaCopyTask.PATH, method = POST, automaticallyPrintOk = true)
|
||||
public final class BrdaCopyTask implements Runnable {
|
||||
@Action(path = BrdaCopyAction.PATH, method = POST, automaticallyPrintOk = true)
|
||||
public final class BrdaCopyAction implements Runnable {
|
||||
|
||||
static final String PATH = "/_dr/task/brdaCopy";
|
||||
|
||||
|
@ -76,7 +76,7 @@ public final class BrdaCopyTask implements Runnable {
|
|||
@Inject @Key("brdaReceiverKey") PGPPublicKey receiverKey;
|
||||
@Inject @Key("brdaSigningKey") PGPKeyPair signingKey;
|
||||
@Inject @Key("rdeStagingDecryptionKey") PGPPrivateKey stagingDecryptionKey;
|
||||
@Inject BrdaCopyTask() {}
|
||||
@Inject BrdaCopyAction() {}
|
||||
|
||||
@Override
|
||||
public void run() {
|
|
@ -40,7 +40,7 @@ import javax.inject.Inject;
|
|||
* as-needed basis.
|
||||
*
|
||||
* @see JSchSftpChannel
|
||||
* @see RdeUploadTask
|
||||
* @see RdeUploadAction
|
||||
* @see com.jcraft.jsch.Session
|
||||
*/
|
||||
final class JSchSshSession implements Closeable {
|
||||
|
|
|
@ -48,10 +48,10 @@ import java.io.InputStream;
|
|||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* Uploads a small XML RDE report to ICANN after {@link RdeUploadTask} has finished.
|
||||
* Action that uploads a small XML RDE report to ICANN after {@link RdeUploadAction} has finished.
|
||||
*/
|
||||
@Action(path = RdeReportTask.PATH, method = POST)
|
||||
public final class RdeReportTask implements Runnable, EscrowTask {
|
||||
@Action(path = RdeReportAction.PATH, method = POST)
|
||||
public final class RdeReportAction implements Runnable, EscrowTask {
|
||||
|
||||
static final String PATH = "/_dr/task/rdeReport";
|
||||
|
||||
|
@ -67,7 +67,7 @@ public final class RdeReportTask implements Runnable, EscrowTask {
|
|||
@Inject @Config("rdeInterval") Duration interval;
|
||||
@Inject @Config("rdeReportLockTimeout") Duration timeout;
|
||||
@Inject @Key("rdeStagingDecryptionKey") PGPPrivateKey stagingDecryptionKey;
|
||||
@Inject RdeReportTask() {}
|
||||
@Inject RdeReportAction() {}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -80,7 +80,7 @@ public final class RdeReportTask implements Runnable, EscrowTask {
|
|||
RegistryCursor.load(Registry.get(tld), CursorType.RDE_UPLOAD).or(START_OF_TIME);
|
||||
if (!stagingCursor.isAfter(watermark)) {
|
||||
logger.infofmt("tld=%s reportCursor=%s uploadCursor=%s", tld, watermark, stagingCursor);
|
||||
throw new NoContentException("Waiting for RdeUploadTask to complete");
|
||||
throw new NoContentException("Waiting for RdeUploadAction to complete");
|
||||
}
|
||||
String prefix = RdeNamingUtils.makeRydeFilename(tld, watermark, FULL, 1, 0);
|
||||
GcsFilename reportFilename = new GcsFilename(bucket, prefix + "-report.xml.ghostryde");
|
|
@ -51,7 +51,7 @@ import javax.inject.Inject;
|
|||
/**
|
||||
* Class that uploads a decrypted XML deposit report to ICANN's webserver.
|
||||
*
|
||||
* @see RdeReportTask
|
||||
* @see RdeReportAction
|
||||
*/
|
||||
public class RdeReporter {
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ import javax.inject.Inject;
|
|||
* <p>The XML deposit files generated by this job are humongous. A tiny XML report file is generated
|
||||
* for each deposit, telling us how much of what it contains.
|
||||
*
|
||||
* <p>Once a deposit is successfully generated, an {@link RdeUploadTask} is enqueued which will
|
||||
* <p>Once a deposit is successfully generated, an {@link RdeUploadAction} is enqueued which will
|
||||
* upload it via SFTP to the third-party escrow provider.
|
||||
*
|
||||
* <p>To generate escrow deposits manually and locally, use the {@code registry_tool} command
|
||||
|
@ -128,7 +128,7 @@ import javax.inject.Inject;
|
|||
* Duplicate jobs may exist {@code <=cursor}. So a transaction will not bother changing the cursor
|
||||
* if it's already been rolled forward.
|
||||
*
|
||||
* <p>Enqueueing {@code RdeUploadTask} is also part of the cursor transaction. This is necessary
|
||||
* <p>Enqueueing {@code RdeUploadAction} is also part of the cursor transaction. This is necessary
|
||||
* because the first thing the upload task does is check the staging cursor to verify it's been
|
||||
* completed, so we can't enqueue before we roll. We also can't enqueue after the roll, because then
|
||||
* if enqueueing fails, the upload might never be enqueued.
|
||||
|
|
|
@ -169,7 +169,7 @@ public final class RdeStagingReducer extends Reducer<PendingDeposit, DepositFrag
|
|||
|
||||
// Write a file to GCS containing the byte length (ASCII) of the raw unencrypted XML.
|
||||
//
|
||||
// This is necessary because RdeUploadTask creates a tar file which requires that the length
|
||||
// This is necessary because RdeUploadAction creates a tar file which requires that the length
|
||||
// be outputted. We don't want to have to decrypt the entire ghostryde file to determine the
|
||||
// length, so we just save it separately.
|
||||
logger.infofmt("Writing %s", xmlLengthFilename);
|
||||
|
@ -195,7 +195,7 @@ public final class RdeStagingReducer extends Reducer<PendingDeposit, DepositFrag
|
|||
}
|
||||
}
|
||||
|
||||
// Now that we're done, kick off RdeUploadTask and roll forward the cursor transactionally.
|
||||
// Now that we're done, kick off RdeUploadAction and roll forward the cursor transactionally.
|
||||
ofy().transact(new VoidWork() {
|
||||
@Override
|
||||
public void vrun() {
|
||||
|
@ -213,11 +213,11 @@ public final class RdeStagingReducer extends Reducer<PendingDeposit, DepositFrag
|
|||
RdeRevision.saveRevision(tld, watermark, mode, revision);
|
||||
if (mode == RdeMode.FULL) {
|
||||
taskEnqueuer.enqueue(getQueue("rde-upload"),
|
||||
withUrl(RdeUploadTask.PATH)
|
||||
withUrl(RdeUploadAction.PATH)
|
||||
.param(RequestParameters.PARAM_TLD, tld));
|
||||
} else {
|
||||
taskEnqueuer.enqueue(getQueue("brda"),
|
||||
withUrl(BrdaCopyTask.PATH)
|
||||
withUrl(BrdaCopyAction.PATH)
|
||||
.param(RequestParameters.PARAM_TLD, tld)
|
||||
.param(RdeModule.PARAM_WATERMARK, watermark.toString()));
|
||||
}
|
||||
|
|
|
@ -67,17 +67,17 @@ import javax.inject.Inject;
|
|||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
* Task that securely uploads an RDE XML file from Cloud Storage to a trusted third party (such as
|
||||
* Action that securely uploads an RDE XML file from Cloud Storage to a trusted third party (such as
|
||||
* Iron Mountain) via SFTP.
|
||||
*
|
||||
* <p>This task is invoked by {@link RdeStagingAction} once it's created the files we need. The date
|
||||
* is calculated from {@link CursorType#RDE_UPLOAD}.
|
||||
* <p>This action is invoked by {@link RdeStagingAction} once it's created the files we need. The
|
||||
* date is calculated from {@link CursorType#RDE_UPLOAD}.
|
||||
*
|
||||
* <p>Once this task completes, it rolls the cursor forward a day and triggers
|
||||
* {@link RdeReportTask}.
|
||||
* <p>Once this action completes, it rolls the cursor forward a day and triggers
|
||||
* {@link RdeReportAction}.
|
||||
*/
|
||||
@Action(path = RdeUploadTask.PATH, method = POST)
|
||||
public final class RdeUploadTask implements Runnable, EscrowTask {
|
||||
@Action(path = RdeUploadAction.PATH, method = POST)
|
||||
public final class RdeUploadAction implements Runnable, EscrowTask {
|
||||
|
||||
static final String PATH = "/_dr/task/rdeUpload";
|
||||
|
||||
|
@ -106,14 +106,14 @@ public final class RdeUploadTask implements Runnable, EscrowTask {
|
|||
@Inject @Key("rdeSigningKey") PGPKeyPair signingKey;
|
||||
@Inject @Key("rdeStagingDecryptionKey") PGPPrivateKey stagingDecryptionKey;
|
||||
@Inject @Named("rde-report") Queue reportQueue;
|
||||
@Inject RdeUploadTask() {}
|
||||
@Inject RdeUploadAction() {}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
runner.lockRunAndRollForward(this, Registry.get(tld), timeout, CursorType.RDE_UPLOAD, interval);
|
||||
taskEnqueuer.enqueue(
|
||||
reportQueue,
|
||||
withUrl(RdeReportTask.PATH).param(RequestParameters.PARAM_TLD, tld));
|
||||
withUrl(RdeReportAction.PATH).param(RequestParameters.PARAM_TLD, tld));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -122,7 +122,7 @@ public final class RdeUploadTask implements Runnable, EscrowTask {
|
|||
RegistryCursor.load(Registry.get(tld), CursorType.RDE_STAGING).or(START_OF_TIME);
|
||||
if (!stagingCursor.isAfter(watermark)) {
|
||||
logger.infofmt("tld=%s uploadCursor=%s stagingCursor=%s", tld, watermark, stagingCursor);
|
||||
throw new ServiceUnavailableException("Waiting for RdeStagingTask to complete");
|
||||
throw new ServiceUnavailableException("Waiting for RdeStagingAction to complete");
|
||||
}
|
||||
DateTime sftpCursor =
|
||||
RegistryCursor.load(Registry.get(tld), CursorType.RDE_UPLOAD_SFTP).or(START_OF_TIME);
|
|
@ -37,7 +37,7 @@ import javax.annotation.concurrent.Immutable;
|
|||
* preferable to using a plain {@link URI}.
|
||||
*
|
||||
* @see java.net.URI
|
||||
* @see RdeUploadTask
|
||||
* @see RdeUploadAction
|
||||
*/
|
||||
@Immutable
|
||||
final class RdeUploadUrl implements Comparable<RdeUploadUrl> {
|
||||
|
|
|
@ -27,13 +27,13 @@ import java.security.GeneralSecurityException;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** Task to download the latest ICANN TMCH CRL from MarksDB. */
|
||||
/** Action to download the latest ICANN TMCH CRL from MarksDB. */
|
||||
@Action(path = "/_dr/task/tmchCrl", method = POST, automaticallyPrintOk = true)
|
||||
public final class TmchCrlTask implements Runnable {
|
||||
public final class TmchCrlAction implements Runnable {
|
||||
|
||||
@Inject Marksdb marksdb;
|
||||
@Inject @Config("tmchCrlUrl") URL tmchCrlUrl;
|
||||
@Inject TmchCrlTask() {}
|
||||
@Inject TmchCrlAction() {}
|
||||
|
||||
/** Synchronously fetches latest ICANN TMCH CRL and saves it to datastore. */
|
||||
@Override
|
|
@ -30,9 +30,9 @@ import java.util.List;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** Task to download the latest domain name list (aka claims list) from MarksDB. */
|
||||
/** Action to download the latest domain name list (aka claims list) from MarksDB. */
|
||||
@Action(path = "/_dr/task/tmchDnl", method = POST, automaticallyPrintOk = true)
|
||||
public final class TmchDnlTask implements Runnable {
|
||||
public final class TmchDnlAction implements Runnable {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final String DNL_CSV_PATH = "/dnl/dnl-latest.csv";
|
||||
|
@ -40,7 +40,7 @@ public final class TmchDnlTask implements Runnable {
|
|||
|
||||
@Inject Marksdb marksdb;
|
||||
@Inject @Key("marksdbDnlLogin") Optional<String> marksdbDnlLogin;
|
||||
@Inject TmchDnlTask() {}
|
||||
@Inject TmchDnlAction() {}
|
||||
|
||||
/** Synchronously fetches latest domain name list and saves it to datastore. */
|
||||
@Override
|
|
@ -30,9 +30,9 @@ import java.util.List;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** Task to download the latest signed mark revocation list from MarksDB. */
|
||||
/** Action to download the latest signed mark revocation list from MarksDB. */
|
||||
@Action(path = "/_dr/task/tmchSmdrl", method = POST, automaticallyPrintOk = true)
|
||||
public final class TmchSmdrlTask implements Runnable {
|
||||
public final class TmchSmdrlAction implements Runnable {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final String SMDRL_CSV_PATH = "/smdrl/smdrl-latest.csv";
|
||||
|
@ -40,7 +40,7 @@ public final class TmchSmdrlTask implements Runnable {
|
|||
|
||||
@Inject Marksdb marksdb;
|
||||
@Inject @Key("marksdbSmdrlLogin") Optional<String> marksdbSmdrlLogin;
|
||||
@Inject TmchSmdrlTask() {}
|
||||
@Inject TmchSmdrlAction() {}
|
||||
|
||||
/** Synchronously fetches latest signed mark revocation list and saves it to datastore. */
|
||||
@Override
|
|
@ -23,7 +23,7 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.net.MediaType;
|
||||
import com.google.domain.registry.model.registrar.Registrar;
|
||||
import com.google.domain.registry.tools.Command.GtechCommand;
|
||||
import com.google.domain.registry.tools.server.CreateGroupsTask;
|
||||
import com.google.domain.registry.tools.server.CreateGroupsAction;
|
||||
|
||||
import com.beust.jcommander.Parameter;
|
||||
import com.beust.jcommander.Parameters;
|
||||
|
@ -77,8 +77,8 @@ public class CreateRegistrarGroupsCommand extends ConfirmingCommand
|
|||
protected String execute() throws IOException {
|
||||
for (Registrar registrar : registrars) {
|
||||
connection.send(
|
||||
CreateGroupsTask.PATH,
|
||||
ImmutableMap.of(CreateGroupsTask.CLIENT_ID_PARAM, registrar.getClientIdentifier()),
|
||||
CreateGroupsAction.PATH,
|
||||
ImmutableMap.of(CreateGroupsAction.CLIENT_ID_PARAM, registrar.getClientIdentifier()),
|
||||
MediaType.PLAIN_TEXT_UTF_8,
|
||||
new byte[0]);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
package com.google.domain.registry.tools.server;
|
||||
|
||||
import static com.google.domain.registry.export.SyncGroupMembersTask.getGroupEmailAddressForContactType;
|
||||
import static com.google.domain.registry.export.SyncGroupMembersAction.getGroupEmailAddressForContactType;
|
||||
import static com.google.domain.registry.request.Action.Method.POST;
|
||||
import static java.util.Arrays.asList;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_OK;
|
||||
|
@ -42,9 +42,9 @@ import java.util.List;
|
|||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** A task that creates Google Groups for a registrar's mailing lists. */
|
||||
@Action(path = CreateGroupsTask.PATH, method = POST)
|
||||
public class CreateGroupsTask implements Runnable {
|
||||
/** Action that creates Google Groups for a registrar's mailing lists. */
|
||||
@Action(path = CreateGroupsAction.PATH, method = POST)
|
||||
public class CreateGroupsAction implements Runnable {
|
||||
|
||||
public static final String PATH = "/_dr/admin/createGroups";
|
||||
public static final String CLIENT_ID_PARAM = "clientId";
|
||||
|
@ -55,7 +55,7 @@ public class CreateGroupsTask implements Runnable {
|
|||
@Inject Response response;
|
||||
@Inject @Config("publicDomainName") String publicDomainName;
|
||||
@Inject @Parameter("clientId") Optional<String> clientId;
|
||||
@Inject CreateGroupsTask() {}
|
||||
@Inject CreateGroupsAction() {}
|
||||
|
||||
@Override
|
||||
public void run() {
|
|
@ -36,7 +36,7 @@ public class ToolsServerModule {
|
|||
@Provides
|
||||
@Parameter("clientId")
|
||||
static Optional<String> provideClientId(HttpServletRequest req) {
|
||||
return Optional.fromNullable(emptyToNull(req.getParameter(CreateGroupsTask.CLIENT_ID_PARAM)));
|
||||
return Optional.fromNullable(emptyToNull(req.getParameter(CreateGroupsAction.CLIENT_ID_PARAM)));
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
|
|
@ -29,7 +29,7 @@ import com.google.common.collect.ImmutableSet;
|
|||
import com.google.common.collect.Multimap;
|
||||
import com.google.domain.registry.config.RegistryConfig;
|
||||
import com.google.domain.registry.config.RegistryEnvironment;
|
||||
import com.google.domain.registry.export.sheet.SyncRegistrarsSheetTask;
|
||||
import com.google.domain.registry.export.sheet.SyncRegistrarsSheetAction;
|
||||
import com.google.domain.registry.model.registrar.Registrar;
|
||||
import com.google.domain.registry.model.registrar.RegistrarContact;
|
||||
import com.google.domain.registry.security.JsonResponseHelper;
|
||||
|
@ -148,7 +148,7 @@ public class RegistrarServlet extends ResourceServlet {
|
|||
if (CollectionUtils.difference(changedKeys, "lastUpdateTime").isEmpty()) {
|
||||
return;
|
||||
}
|
||||
SyncRegistrarsSheetTask.enqueueBackendTask();
|
||||
SyncRegistrarsSheetAction.enqueueBackendTask();
|
||||
ImmutableList<String> toEmailAddress = CONFIG.getRegistrarChangesNotificationEmailAddresses();
|
||||
if (!toEmailAddress.isEmpty()) {
|
||||
SendEmailUtils.sendEmail(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue