Add simple registration type command extension for domain creates

Note that it doesn't do anything yet beyond basic XML validation
because the default registry system doesn't use registration types,
but this serves as a template for the other domain commands using
registration types and provides a method that TLDs implementing custom
logic can use.  This also explicitly doesn't yet handle the response
extensions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123245388
This commit is contained in:
mcilwain 2016-05-25 13:15:32 -07:00 committed by Ben McIlwain
parent ee148ce630
commit a09f478ac0
11 changed files with 142 additions and 3 deletions

View file

@ -32,6 +32,7 @@ import google.registry.model.domain.DomainResource.Builder;
import google.registry.model.domain.GracePeriod;
import google.registry.model.domain.fee.FeeCreateExtension;
import google.registry.model.domain.launch.LaunchCreateExtension;
import google.registry.model.domain.regtype.RegTypeCreateExtension;
import google.registry.model.domain.rgp.GracePeriodStatus;
import google.registry.model.registry.Registry;
import google.registry.model.registry.Registry.TldState;
@ -98,6 +99,8 @@ public class DomainCreateFlow extends DomainCreateOrAllocateFlow {
private static final Set<TldState> QLP_SMD_ALLOWED_STATES =
Sets.immutableEnumSet(TldState.SUNRISE, TldState.SUNRUSH);
protected RegTypeCreateExtension regTypeExtension;
private boolean isAnchorTenant() {
return isAnchorTenantViaReservation || isAnchorTenantViaExtension;
}
@ -123,7 +126,9 @@ public class DomainCreateFlow extends DomainCreateOrAllocateFlow {
@Override
protected final void initDomainCreateOrAllocateFlow() {
registerExtensions(FeeCreateExtension.class, LaunchCreateExtension.class);
registerExtensions(
FeeCreateExtension.class, LaunchCreateExtension.class, RegTypeCreateExtension.class);
regTypeExtension = eppInput.getSingleExtension(RegTypeCreateExtension.class);
}
@Override