mirror of
https://github.com/google/nomulus.git
synced 2025-05-22 04:09:46 +02:00
Unify two exceptions that mean the same thing
These were historically separate due to the old flow structure, but now they should be one exception. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133984858
This commit is contained in:
parent
21a98b899c
commit
096877f03e
55 changed files with 163 additions and 211 deletions
|
@ -15,7 +15,7 @@
|
|||
package google.registry.flows.contact;
|
||||
|
||||
import static google.registry.flows.ResourceFlowUtils.failfastForAsyncDelete;
|
||||
import static google.registry.flows.ResourceFlowUtils.loadResourceToMutate;
|
||||
import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyNoDisallowedStatuses;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfoForResource;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyResourceOwnership;
|
||||
|
@ -53,10 +53,10 @@ import org.joda.time.Duration;
|
|||
* references to the host before the deletion is allowed to proceed. A poll message will be written
|
||||
* with the success or failure message when the process is complete.
|
||||
*
|
||||
* @error {@link google.registry.flows.ResourceFlowUtils.ResourceDoesNotExistException}
|
||||
* @error {@link google.registry.flows.ResourceFlowUtils.ResourceNotOwnedException}
|
||||
* @error {@link google.registry.flows.exceptions.ResourceStatusProhibitsOperationException}
|
||||
* @error {@link google.registry.flows.exceptions.ResourceToDeleteIsReferencedException}
|
||||
* @error {@link google.registry.flows.exceptions.ResourceToMutateDoesNotExistException}
|
||||
*/
|
||||
public final class ContactDeleteFlow extends LoggedInFlow implements TransactionalFlow {
|
||||
|
||||
|
@ -89,7 +89,7 @@ public final class ContactDeleteFlow extends LoggedInFlow implements Transaction
|
|||
@Override
|
||||
public final EppOutput run() throws EppException {
|
||||
failfastForAsyncDelete(targetId, now, ContactResource.class, GET_REFERENCED_CONTACTS);
|
||||
ContactResource existingContact = loadResourceToMutate(ContactResource.class, targetId, now);
|
||||
ContactResource existingContact = loadAndVerifyExistence(ContactResource.class, targetId, now);
|
||||
verifyNoDisallowedStatuses(existingContact, DISALLOWED_STATUSES);
|
||||
verifyOptionalAuthInfoForResource(authInfo, existingContact);
|
||||
if (!isSuperuser) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue