// Copyright 2016 The Domain Registry Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.domain.registry.flows.domain; import static com.google.domain.registry.flows.domain.DomainFlowUtils.checkAllowedAccessToTld; import static com.google.domain.registry.flows.domain.DomainFlowUtils.updateAutorenewRecurrenceEndTime; import static com.google.domain.registry.model.domain.DomainResource.extendRegistrationWithCap; import static com.google.domain.registry.model.ofy.ObjectifyService.ofy; import static com.google.domain.registry.util.DateTimeUtils.END_OF_TIME; import com.google.common.base.Predicate; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.domain.registry.flows.EppException; import com.google.domain.registry.flows.ResourceTransferApproveFlow; import com.google.domain.registry.model.billing.BillingEvent; import com.google.domain.registry.model.billing.BillingEvent.Flag; import com.google.domain.registry.model.billing.BillingEvent.Reason; import com.google.domain.registry.model.domain.DomainCommand.Transfer; import com.google.domain.registry.model.domain.DomainResource; import com.google.domain.registry.model.domain.DomainResource.Builder; import com.google.domain.registry.model.domain.GracePeriod; import com.google.domain.registry.model.domain.rgp.GracePeriodStatus; import com.google.domain.registry.model.poll.PollMessage; import com.google.domain.registry.model.registry.Registry; import com.google.domain.registry.model.reporting.HistoryEntry; import com.google.domain.registry.model.transfer.TransferData; import com.googlecode.objectify.Ref; import org.joda.time.DateTime; /** * An EPP flow that approves a pending transfer on a {@link DomainResource}. *
* The logic in this flow, which handles client approvals, very closely parallels the logic in
* {@link DomainResource#cloneProjectedAtTime} which handles implicit server approvals.
*
* @error {@link com.google.domain.registry.flows.domain.DomainFlowUtils.NotAuthorizedForTldException}
* @error {@link com.google.domain.registry.flows.ResourceFlowUtils.BadAuthInfoForResourceException}
* @error {@link com.google.domain.registry.flows.ResourceFlowUtils.ResourceNotOwnedException}
* @error {@link com.google.domain.registry.flows.ResourceMutateFlow.ResourceToMutateDoesNotExistException}
* @error {@link com.google.domain.registry.flows.ResourceMutatePendingTransferFlow.NotPendingTransferException}
*/
public class DomainTransferApproveFlow extends
ResourceTransferApproveFlow