Replace command.applyTo() with inlined builder operations

These are much easier to understand.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137446273
This commit is contained in:
cgoldfeder 2016-10-27 15:03:48 -07:00 committed by Ben McIlwain
parent b84d7f1fb5
commit 1dbc5f6bb0
28 changed files with 489 additions and 426 deletions

View file

@ -59,7 +59,6 @@ import google.registry.flows.EppException.UnimplementedOptionException;
import google.registry.flows.domain.TldSpecificLogicProxy.EppCommandOperations;
import google.registry.flows.exceptions.ResourceAlreadyExistsException;
import google.registry.flows.exceptions.ResourceHasClientUpdateProhibitedException;
import google.registry.flows.exceptions.StatusNotClientSettableException;
import google.registry.model.EppResource;
import google.registry.model.billing.BillingEvent;
import google.registry.model.billing.BillingEvent.Flag;
@ -829,18 +828,6 @@ public class DomainFlowUtils {
return ImmutableSet.copyOf(union(difference(oldDsData, toRemove), toAdd));
}
/** Check that all of the status values added or removed in an update are client-settable. */
static void verifyStatusChangesAreClientSettable(Update command)
throws StatusNotClientSettableException {
for (StatusValue statusValue : union(
command.getInnerAdd().getStatusValues(),
command.getInnerRemove().getStatusValues())) {
if (!statusValue.isClientSettable()) {
throw new StatusNotClientSettableException(statusValue.getXmlName());
}
}
}
/** If a domain or application has "clientUpdateProhibited" set, updates must clear it or fail. */
static void verifyClientUpdateNotProhibited(Update command, DomainBase existingResource)
throws ResourceHasClientUpdateProhibitedException {