mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02: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:
parent
ab3f352782
commit
0b112f17a7
11 changed files with 43 additions and 46 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue