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:
mmuller 2016-10-14 12:16:23 -07:00 committed by Ben McIlwain
parent 6a4088a8b6
commit 84bbb9a7c0
16 changed files with 177 additions and 65 deletions

View file

@ -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() */