mirror of
https://github.com/google/nomulus
synced 2026-01-10 16:00:52 +00:00
Move ROID suffix handling from RegistryConfig to ConfigModule
This is the first in a decently long series of commits to delete RegistryConfig entirely and centralize all configuration in ConfigModule using Dagger. Once this is done, then the text-based YAML configuration work can begin in earnest. Note that the configuration settings from TestRegistryConfig will be moving into ConfigModule.LocalTestConfig. This way they can be referred to in a static context from test and test utility helpers, rather than having to be injected everywhere, which we don't typically bother with for tests. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143473089
This commit is contained in:
@@ -18,10 +18,11 @@ import static google.registry.flows.FlowUtils.validateClientIsLoggedIn;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyResourceDoesNotExist;
|
||||
import static google.registry.flows.contact.ContactFlowUtils.validateAsciiPostalInfo;
|
||||
import static google.registry.flows.contact.ContactFlowUtils.validateContactAgainstPolicy;
|
||||
import static google.registry.model.EppResourceUtils.createContactHostRoid;
|
||||
import static google.registry.model.EppResourceUtils.createRepoId;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.config.ConfigModule.Config;
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.ExtensionManager;
|
||||
import google.registry.flows.FlowModule.ClientId;
|
||||
@@ -56,6 +57,7 @@ public final class ContactCreateFlow implements TransactionalFlow {
|
||||
@Inject @TargetId String targetId;
|
||||
@Inject HistoryEntry.Builder historyBuilder;
|
||||
@Inject EppResponse.Builder responseBuilder;
|
||||
@Inject @Config("contactAndHostRoidSuffix") String roidSuffix;
|
||||
@Inject ContactCreateFlow() {}
|
||||
|
||||
@Override
|
||||
@@ -71,7 +73,7 @@ public final class ContactCreateFlow implements TransactionalFlow {
|
||||
.setAuthInfo(command.getAuthInfo())
|
||||
.setCreationClientId(clientId)
|
||||
.setCurrentSponsorClientId(clientId)
|
||||
.setRepoId(createContactHostRoid(ObjectifyService.allocateId()))
|
||||
.setRepoId(createRepoId(ObjectifyService.allocateId(), roidSuffix))
|
||||
.setFaxNumber(command.getFax())
|
||||
.setVoiceNumber(command.getVoice())
|
||||
.setDisclose(command.getDisclose())
|
||||
|
||||
Reference in New Issue
Block a user