google-nomulus/java/google/registry
nickfelt 184b2b56ac Persist transferredRegistrationExpirationTime (exDate) on TransferData
This CL adds transferredRegistrationExpirationTime as a TransferData field
persisted to Datastore.  It's only relevant for domains, and it represents the
registration expiration time resulting from the approval of the most recent
transfer request.  For pending transfers, we assume the transfer will be
server-approved, and thus in DomainTransferRequestFlow we set this field to the
existing computed value serverApproveNewExpirationTime, which is what we use
for setting up the server-approve autorenew billing event and poll message.
In DomainTransferApproveFlow we overwrite this field with the freshly computed
newExpirationTime, whereas in DomainTransferCancel/RejectFlow (and in the
implicit cancel of DomainDeleteFlow during a pending transfer) we null it out.

There are two key benefits to having this field, which are described in more
detail in b/36405140.

1) b/25084229 - it allows storage of a frozen value to back the "exDate" field
   of DomainTransferResponse, which we can use to fix various errors with how
   exDate display currently works.

2) b/36354434 - it allows DomainResource.cloneProjectedAtTime() to just directly
   set the registrationExpirationTime to this value, without computing it de
   novo, which reduces duplicated logic and ensures that the new expiration time
   matches the autorenew child objects.

This CL only starts writing the field on TransferData as persisted directly on
the DomainResource itself.  We'll then want to backfill the field for at
least pending transfers, whether expired or not (so we can do (2) above), but
I think we might as well backfill it for all pending and approved transfers
so that we also fix (1) even for historical transfers.  And then we can start
actually reading the field for both purposes.  (Note that for (1), this will
only fix synchronous transfer responses served via DomainTransferQueryFlow,
not async transfer responses served via poll messages, since these have already
been persisted with a potentially bad exDate, but I don't think it's worth a
backfill for those).

One last naming note: I chose the verbose transferredRegistrationExpirationTime
rather than the extendedRegistrationExpirationTime of DomainTransferResponse
because (as is the case in autorenew grace, or for a superuser transfer) the
new registration time isn't necessarily extended at all; it may be the same as
the pre-transfer expiration time.  Also, including "registration" helps clarify
w.r.t. pendingTransferExpirationTime which refers confusingly to the expiry of
the transfer itself, rather than the domain registration.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171858083
2017-10-24 16:53:47 -04:00
..
backup Add a log message indicating that the restore is complete 2017-10-24 16:53:47 -04:00
batch Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
bigquery Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
braintree Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
builddefs Rename set to depset in .bzl and BUILD files 2017-08-29 16:53:21 -04:00
config Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
cron Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
dns Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
eclipse Allow EventSample.record to accept numSamples=0 2017-10-24 16:50:30 -04:00
env Add cron/commitLogCheckpoint to cron.xml for the crash environment 2017-10-10 12:09:41 -04:00
export Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
flows Persist transferredRegistrationExpirationTime (exDate) on TransferData 2017-10-24 16:53:47 -04:00
gcs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
groups Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
idn Run buildifier on codebase to format BUILD files 2016-11-28 18:15:21 -05:00
keyring Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
loadtest Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
mapreduce Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
model Persist transferredRegistrationExpirationTime (exDate) on TransferData 2017-10-24 16:53:47 -04:00
module Migrate to new Sheets v4 api 2017-09-20 10:27:17 -04:00
monitoring Allow EventSample.record to accept numSamples=0 2017-10-24 16:50:30 -04:00
pricing Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
rdap Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
rde Persist transferredRegistrationExpirationTime (exDate) on TransferData 2017-10-24 16:53:47 -04:00
reporting Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
request Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
security Remove XsrfTokenManager fallback for validating legacy tokens 2017-03-21 15:36:31 -04:00
storage/drive Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tldconfig/idn Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tmch Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
tools Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
ui Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
util Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
whois Run automatic Java 8 conversion over codebase 2017-10-10 12:09:41 -04:00
xjc Fix the build on MacOS 2017-07-12 11:03:50 -04:00
xml Add support for a domain delete superuser EPP extension 2017-09-12 15:51:50 -04:00
BUILD Add nocron ear and deployer rules for the crash environment 2017-10-04 16:16:45 -04:00
repositories.bzl Remove all jar_urls pointing to maven.ibiblio.org and add missing mirrors 2017-10-10 12:09:42 -04:00