mirror of
https://github.com/google/nomulus.git
synced 2025-08-04 08:52:12 +02:00
Remove the old RegistryConfig paradigm entirely
We are now ready to begin configuration using YAML, mediated by ConfigModule. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143818507
This commit is contained in:
parent
c5c74961bb
commit
d3397e991e
17 changed files with 18 additions and 323 deletions
|
@ -24,6 +24,7 @@ import static com.google.common.base.Strings.emptyToNull;
|
|||
import static com.google.common.base.Strings.nullToEmpty;
|
||||
import static com.google.common.collect.Sets.immutableEnumSet;
|
||||
import static com.google.common.io.BaseEncoding.base64;
|
||||
import static google.registry.config.RegistryConfig.getRegistrarDefaultReferralUrl;
|
||||
import static google.registry.config.RegistryConfig.getRegistrarDefaultWhoisServer;
|
||||
import static google.registry.model.common.EntityGroupRoot.getCrossTldKey;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
@ -53,7 +54,6 @@ import com.googlecode.objectify.annotation.IgnoreSave;
|
|||
import com.googlecode.objectify.annotation.Index;
|
||||
import com.googlecode.objectify.annotation.Parent;
|
||||
import com.googlecode.objectify.condition.IfNull;
|
||||
import google.registry.config.RegistryEnvironment;
|
||||
import google.registry.model.Buildable;
|
||||
import google.registry.model.CreateAutoTimestamp;
|
||||
import google.registry.model.ImmutableObject;
|
||||
|
@ -162,8 +162,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
|||
BRAINTREE;
|
||||
}
|
||||
|
||||
private static final RegistryEnvironment ENVIRONMENT = RegistryEnvironment.get();
|
||||
|
||||
/** Regex for E.164 phone number format specified by {@code contact.xsd}. */
|
||||
private static final Pattern E164_PATTERN = Pattern.compile("\\+[0-9]{1,3}\\.[0-9]{1,14}");
|
||||
|
||||
|
@ -463,10 +461,7 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
|||
}
|
||||
|
||||
public String getReferralUrl() {
|
||||
if (referralUrl == null) {
|
||||
return ENVIRONMENT.config().getRegistrarDefaultReferralUrl().toString();
|
||||
}
|
||||
return referralUrl;
|
||||
return firstNonNull(referralUrl, getRegistrarDefaultReferralUrl().toString());
|
||||
}
|
||||
|
||||
public String getIcannReferralEmail() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue