mirror of
https://github.com/google/nomulus.git
synced 2025-05-18 18:29:36 +02:00
Deprecate more fields in RegistryConfig
This primarily addresses issues with TMCH testing mode and email sending utils. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143710550
This commit is contained in:
parent
c05424b947
commit
25a8bbe890
23 changed files with 203 additions and 265 deletions
|
@ -16,6 +16,7 @@ package google.registry.config;
|
|||
|
||||
import static google.registry.config.ConfigUtils.makeUrl;
|
||||
|
||||
import com.google.appengine.api.utils.SystemProperty;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
@ -214,8 +215,8 @@ public final class ConfigModule {
|
|||
/** @see RegistryConfig#getCommitLogDatastoreRetention() */
|
||||
@Provides
|
||||
@Config("commitLogDatastoreRetention")
|
||||
public static Duration provideCommitLogDatastoreRetention(RegistryConfig config) {
|
||||
return config.getCommitLogDatastoreRetention();
|
||||
public static Duration provideCommitLogDatastoreRetention() {
|
||||
return RegistryConfig.getCommitLogDatastoreRetention();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -423,8 +424,8 @@ public final class ConfigModule {
|
|||
*/
|
||||
@Provides
|
||||
@Config("tmchCaTestingMode")
|
||||
public static boolean provideTmchCaTestingMode(RegistryConfig config) {
|
||||
return config.getTmchCaTestingMode();
|
||||
public static boolean provideTmchCaTestingMode() {
|
||||
return RegistryConfig.getTmchCaTestingMode();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -467,6 +468,29 @@ public final class ConfigModule {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The email address that outgoing emails from the app are sent from.
|
||||
*
|
||||
* @see google.registry.util.SendEmailUtils
|
||||
*/
|
||||
@Provides
|
||||
@Config("googleAppsSendFromEmailAddress")
|
||||
public static String provideGoogleAppsSendFromEmailAddress() {
|
||||
return String.format("noreply@%s.appspotmail.com", SystemProperty.applicationId.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* The display name that is used on outgoing emails sent by Nomulus.
|
||||
*
|
||||
* @see google.registry.util.SendEmailUtils
|
||||
*/
|
||||
@Provides
|
||||
@Config("googleAppsAdminEmailDisplayName")
|
||||
public static String provideGoogleAppsAdminEmailDisplayName() {
|
||||
// Production example: "Example Registry"
|
||||
return "Google Domain Registry";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Google Cloud Storage bucket for staging escrow deposits pending upload.
|
||||
*
|
||||
|
@ -1025,5 +1049,9 @@ public final class ConfigModule {
|
|||
public static class LocalTestConfig {
|
||||
|
||||
public static final String CONTACT_AND_HOST_ROID_SUFFIX = "ROID";
|
||||
|
||||
public static final String GOOGLE_APPS_SEND_FROM_EMAIL_ADDRESS = "noreply@testing.example";
|
||||
|
||||
public static final String GOOGLE_APPS_ADMIN_EMAIL_DISPLAY_NAME = "Testing Nomulus";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue