From 2a3a17d653039aa1c9c23cd88c4cb4bae51cce9d Mon Sep 17 00:00:00 2001 From: Justin Graham Date: Mon, 9 Jan 2017 08:46:57 -0800 Subject: [PATCH] Add signed mark parameter to Create flow afterValidation extension point This is the follow up PR for #49. It adds an additional parameter to DomainCreateFlowCustomLogic.AfterValidationParameters: a nullable signed mark id. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143966945 --- .../flows/custom/DomainCreateFlowCustomLogic.java | 10 ++++++++++ .../google/registry/flows/domain/DomainCreateFlow.java | 2 ++ 2 files changed, 12 insertions(+) diff --git a/java/google/registry/flows/custom/DomainCreateFlowCustomLogic.java b/java/google/registry/flows/custom/DomainCreateFlowCustomLogic.java index e0a841379..d547c84cf 100644 --- a/java/google/registry/flows/custom/DomainCreateFlowCustomLogic.java +++ b/java/google/registry/flows/custom/DomainCreateFlowCustomLogic.java @@ -15,6 +15,7 @@ package google.registry.flows.custom; import com.google.auto.value.AutoValue; +import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.common.net.InternetDomainName; import google.registry.flows.EppException; @@ -92,6 +93,13 @@ public class DomainCreateFlowCustomLogic extends BaseFlowCustomLogic { */ public abstract int years(); + /** + * The ID of the validated signed mark. + * + *

If a signed mark was not supplied, this value will be absent. + */ + public abstract Optional signedMarkId(); + public static Builder newBuilder() { return new AutoValue_DomainCreateFlowCustomLogic_AfterValidationParameters.Builder(); } @@ -104,6 +112,8 @@ public class DomainCreateFlowCustomLogic extends BaseFlowCustomLogic { public abstract Builder setYears(int years); + public abstract Builder setSignedMarkId(Optional signedMarkId); + public abstract AfterValidationParameters build(); } } diff --git a/java/google/registry/flows/domain/DomainCreateFlow.java b/java/google/registry/flows/domain/DomainCreateFlow.java index 0d9723751..76680ce17 100644 --- a/java/google/registry/flows/domain/DomainCreateFlow.java +++ b/java/google/registry/flows/domain/DomainCreateFlow.java @@ -42,6 +42,7 @@ import static google.registry.model.registry.label.ReservedList.matchesAnchorTen import static google.registry.util.DateTimeUtils.END_OF_TIME; import static google.registry.util.DateTimeUtils.leapSafeAddYears; +import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; @@ -230,6 +231,7 @@ public class DomainCreateFlow implements TransactionalFlow { DomainCreateFlowCustomLogic.AfterValidationParameters.newBuilder() .setDomainName(domainName) .setYears(years) + .setSignedMarkId(Optional.fromNullable(signedMarkId)) .build()); FeeCreateCommandExtension feeCreate = eppInput.getSingleExtension(FeeCreateCommandExtension.class);