mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Load referenced contact/hosts from EPP more efficiently
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=122459862
This commit is contained in:
parent
86f3287761
commit
618050dc32
11 changed files with 113 additions and 64 deletions
|
@ -64,7 +64,7 @@ import google.registry.model.domain.DesignatedContact;
|
|||
import google.registry.model.domain.DesignatedContact.Type;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.domain.DomainCommand.CreateOrUpdate;
|
||||
import google.registry.model.domain.DomainCommand.InvalidReferenceException;
|
||||
import google.registry.model.domain.DomainCommand.InvalidReferencesException;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.Period;
|
||||
import google.registry.model.domain.fee.BaseFeeCommand;
|
||||
|
@ -405,8 +405,8 @@ public class DomainFlowUtils {
|
|||
throws EppException {
|
||||
try {
|
||||
return command.cloneAndLinkReferences(now);
|
||||
} catch (InvalidReferenceException e) {
|
||||
throw new LinkedResourceDoesNotExistException(e.getType(), e.getForeignKey());
|
||||
} catch (InvalidReferencesException e) {
|
||||
throw new LinkedResourcesDoNotExistException(e.getType(), e.getForeignKeys());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -681,9 +681,9 @@ public class DomainFlowUtils {
|
|||
}
|
||||
|
||||
/** Resource linked to this domain does not exist. */
|
||||
static class LinkedResourceDoesNotExistException extends ObjectDoesNotExistException {
|
||||
public LinkedResourceDoesNotExistException(Class<?> type, String resourceId) {
|
||||
super(type, resourceId);
|
||||
static class LinkedResourcesDoNotExistException extends ObjectDoesNotExistException {
|
||||
public LinkedResourcesDoNotExistException(Class<?> type, ImmutableSet<String> resourceIds) {
|
||||
super(type, resourceIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue