mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Genericize "Contact Us" page
Parameterize integration, support and announcement email addresses and contact phone number, make static parameters flow through the system in a consistent manner. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136183813
This commit is contained in:
parent
6a4088a8b6
commit
84bbb9a7c0
16 changed files with 177 additions and 65 deletions
|
@ -99,14 +99,46 @@ public final class ConfigModule {
|
|||
@Provides
|
||||
@Config("productName")
|
||||
public static String provideProductName(RegistryEnvironment environment) {
|
||||
switch (environment) {
|
||||
case UNITTEST:
|
||||
case LOCAL:
|
||||
return "Nomulus";
|
||||
default:
|
||||
// Change this to the name of your product.
|
||||
return "Google Registry";
|
||||
}
|
||||
return "Nomulus";
|
||||
}
|
||||
|
||||
/**
|
||||
* The e-mail address for questions about integrating with the registry. Used in the
|
||||
* "contact-us" section of the registrar console.
|
||||
*/
|
||||
@Provides
|
||||
@Config("integrationEmail")
|
||||
public static String provideIntegrationEmail(RegistryEnvironment environment) {
|
||||
return "integration@example.com";
|
||||
}
|
||||
|
||||
/**
|
||||
* The e-mail address for general support. Used in the "contact-us" section of the registrar
|
||||
* console.
|
||||
*/
|
||||
@Provides
|
||||
@Config("supportEmail")
|
||||
public static String provideSupportEmail(RegistryEnvironment environment) {
|
||||
return "support@example.com";
|
||||
}
|
||||
|
||||
/**
|
||||
* The "From" e-mail address for announcements. Used in the "contact-us" section of the
|
||||
* registrar console.
|
||||
*/
|
||||
@Provides
|
||||
@Config("announcementsEmail")
|
||||
public static String provideAnnouncementsEmail(RegistryEnvironment environment) {
|
||||
return "announcements@example.com";
|
||||
}
|
||||
|
||||
/**
|
||||
* The contact phone number. Used in the "contact-us" section of the registrar console.
|
||||
*/
|
||||
@Provides
|
||||
@Config("supportPhoneNumber")
|
||||
public static String provideSupportPhoneNumber(RegistryEnvironment environment) {
|
||||
return "+1 (888) 555 0123";
|
||||
}
|
||||
|
||||
/** @see RegistryConfig#getZoneFilesBucket() */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue