mirror of
https://github.com/google/nomulus.git
synced 2025-06-26 22:34:55 +02:00
Flatten the domain and application create flows
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136601151
This commit is contained in:
parent
43821f650e
commit
475203532e
31 changed files with 1151 additions and 1410 deletions
|
@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkState;
|
|||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.model.EppResourceUtils.queryDomainsUsingResource;
|
||||
import static google.registry.model.domain.DomainResource.extendRegistrationWithCap;
|
||||
import static google.registry.model.index.ForeignKeyIndex.loadAndGetKey;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
@ -300,7 +301,7 @@ public class ResourceFlowUtils {
|
|||
|
||||
public static <R extends EppResource> void verifyResourceDoesNotExist(
|
||||
Class<R> clazz, String targetId, DateTime now) throws EppException {
|
||||
if (loadByForeignKey(clazz, targetId, now) != null) {
|
||||
if (loadAndGetKey(clazz, targetId, now) != null) {
|
||||
throw new ResourceAlreadyExistsException(targetId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue