mirror of
https://github.com/google/nomulus
synced 2026-01-10 16:00:52 +00:00
Update lastEppUpdateTime and lastEppUpdateClientId when necessary
EppResource's lastEppUpdateTime and lastEppUpdateClientId need to be updated whenever the domain is updated, renewed, deleted or transfered. This commit applied the change to the following domain EPP commands: - Update (already implemented) - Renew - Delete - Restore - Transfer request - Transfer approve - Transfer reject - Transfer cancel ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=223344758
This commit is contained in:
@@ -161,7 +161,8 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
|
||||
.setParent(historyEntry)
|
||||
.build();
|
||||
DomainResource newDomain =
|
||||
performRestore(existingDomain, newExpirationTime, autorenewEvent, autorenewPollMessage);
|
||||
performRestore(
|
||||
existingDomain, newExpirationTime, autorenewEvent, autorenewPollMessage, now, clientId);
|
||||
updateForeignKeyIndexDeletionTime(newDomain);
|
||||
entitiesToSave.add(newDomain, historyEntry, autorenewEvent, autorenewPollMessage);
|
||||
ofy().save().entities(entitiesToSave.build());
|
||||
@@ -227,8 +228,11 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
|
||||
DomainResource existingDomain,
|
||||
DateTime newExpirationTime,
|
||||
BillingEvent.Recurring autorenewEvent,
|
||||
PollMessage.Autorenew autorenewPollMessage) {
|
||||
return existingDomain.asBuilder()
|
||||
PollMessage.Autorenew autorenewPollMessage,
|
||||
DateTime now,
|
||||
String clientId) {
|
||||
return existingDomain
|
||||
.asBuilder()
|
||||
.setRegistrationExpirationTime(newExpirationTime)
|
||||
.setDeletionTime(END_OF_TIME)
|
||||
.setStatusValues(null)
|
||||
@@ -236,6 +240,8 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
|
||||
.setDeletePollMessage(null)
|
||||
.setAutorenewBillingEvent(Key.create(autorenewEvent))
|
||||
.setAutorenewPollMessage(Key.create(autorenewPollMessage))
|
||||
.setLastEppUpdateTime(now)
|
||||
.setLastEppUpdateClientId(clientId)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user