mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
When resolving a transfer to SERVER_CANCELLED (on delete) still pass in a time
Currently we pass in null. However, from the spec: <domain:acDate> element that contains the date and time of a required or completed response. For a PENDING request, the value identifies the date and time by which a response is required before an automated response action will be taken by the server. For all other status types, the value identifies the date and time when the request was completed." - https://tools.ietf.org/html/rfc5731#page-16, section 3.1.3 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139363370
This commit is contained in:
parent
a343648b34
commit
438eeb5e38
5 changed files with 12 additions and 9 deletions
|
@ -14,6 +14,7 @@
|
|||
|
||||
package google.registry.flows;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static com.google.common.collect.Iterables.tryFind;
|
||||
import static com.google.common.collect.Sets.intersection;
|
||||
|
@ -67,7 +68,6 @@ import google.registry.model.transfer.TransferResponse.DomainTransferResponse;
|
|||
import google.registry.model.transfer.TransferStatus;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/** Static utility functions for resource flows. */
|
||||
|
@ -221,7 +221,7 @@ public final class ResourceFlowUtils {
|
|||
.setServerApproveAutorenewEvent(null)
|
||||
.setServerApproveAutorenewPollMessage(null)
|
||||
.setTransferStatus(transferStatus)
|
||||
.setPendingTransferExpirationTime(now)
|
||||
.setPendingTransferExpirationTime(checkNotNull(now))
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -232,15 +232,12 @@ public final class ResourceFlowUtils {
|
|||
* {@link TransferStatus}, clears all the server-approve fields on the {@link TransferData}
|
||||
* including the extended registration years field, and sets the expiration time of the last
|
||||
* pending transfer to now.
|
||||
*
|
||||
* @param now the time that the transfer was resolved, or null if the transfer was never actually
|
||||
* resolved but the resource was deleted while it was still pending.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <
|
||||
R extends EppResource & ResourceWithTransferData,
|
||||
B extends EppResource.Builder<R, B> & BuilderWithTransferData<B>> B resolvePendingTransfer(
|
||||
R resource, TransferStatus transferStatus, @Nullable DateTime now) {
|
||||
R resource, TransferStatus transferStatus, DateTime now) {
|
||||
return ((B) resource.asBuilder())
|
||||
.removeStatusValue(StatusValue.PENDING_TRANSFER)
|
||||
.setTransferData(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue