From 64426d3c7cb7c20e601b3761cc66376e9173b7e7 Mon Sep 17 00:00:00 2001 From: mcilwain Date: Wed, 20 Jul 2016 14:40:24 -0400 Subject: [PATCH] Clarify the relationship between project ids in RegistryConfigs This makes it clear that the non-production environment project ids are all constructed by adding a suffix to the production environment project id, and makes it slightly easier to configure it for a new environment (because there is only one string to change instead of two). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=135406763 --- .../registry/config/ProductionRegistryConfigExample.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/google/registry/config/ProductionRegistryConfigExample.java b/java/google/registry/config/ProductionRegistryConfigExample.java index d7d1de6c5..d184750d6 100644 --- a/java/google/registry/config/ProductionRegistryConfigExample.java +++ b/java/google/registry/config/ProductionRegistryConfigExample.java @@ -53,11 +53,12 @@ public final class ProductionRegistryConfigExample implements RegistryConfig { @Override public String getProjectId() { + String prodProjectId = "domain-registry"; switch (environment) { case PRODUCTION: - return "domain-registry"; + return prodProjectId; default: - return "domain-registry-" + Ascii.toLowerCase(environment.name()); + return prodProjectId + "-" + Ascii.toLowerCase(environment.name()); } }