mirror of
https://github.com/google/nomulus.git
synced 2025-05-21 19:59:34 +02:00
Add otherClientId to HistoryEntry
This CL adds an otherClientId field to be populated on domain transfers with client ID of the other end of the transaction (losing registrar for requests and cancels, gaining registrar for approves and rejects). This will be used for reporting in compliance with specification 3 of the ICANN registry agreement. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143775945
This commit is contained in:
parent
25a8bbe890
commit
44972b916a
11 changed files with 49 additions and 3 deletions
|
@ -102,13 +102,14 @@ public final class DomainTransferApproveFlow implements TransactionalFlow {
|
|||
verifyResourceOwnership(clientId, existingDomain);
|
||||
String tld = existingDomain.getTld();
|
||||
checkAllowedAccessToTld(clientId, tld);
|
||||
TransferData transferData = existingDomain.getTransferData();
|
||||
String gainingClientId = transferData.getGainingClientId();
|
||||
HistoryEntry historyEntry = historyBuilder
|
||||
.setType(HistoryEntry.Type.DOMAIN_TRANSFER_APPROVE)
|
||||
.setModificationTime(now)
|
||||
.setOtherClientId(gainingClientId)
|
||||
.setParent(Key.create(existingDomain))
|
||||
.build();
|
||||
TransferData transferData = existingDomain.getTransferData();
|
||||
String gainingClientId = transferData.getGainingClientId();
|
||||
int extraYears = transferData.getExtendedRegistrationYears();
|
||||
// Bill for the transfer.
|
||||
BillingEvent.OneTime billingEvent = new BillingEvent.OneTime.Builder()
|
||||
|
|
|
@ -87,6 +87,7 @@ public final class DomainTransferCancelFlow implements TransactionalFlow {
|
|||
checkAllowedAccessToTld(clientId, existingDomain.getTld());
|
||||
HistoryEntry historyEntry = historyBuilder
|
||||
.setType(HistoryEntry.Type.DOMAIN_TRANSFER_CANCEL)
|
||||
.setOtherClientId(existingDomain.getTransferData().getLosingClientId())
|
||||
.setModificationTime(now)
|
||||
.setParent(Key.create(existingDomain))
|
||||
.build();
|
||||
|
|
|
@ -82,6 +82,7 @@ public final class DomainTransferRejectFlow implements TransactionalFlow {
|
|||
HistoryEntry historyEntry = historyBuilder
|
||||
.setType(HistoryEntry.Type.DOMAIN_TRANSFER_REJECT)
|
||||
.setModificationTime(now)
|
||||
.setOtherClientId(existingDomain.getTransferData().getGainingClientId())
|
||||
.setParent(Key.create(existingDomain))
|
||||
.build();
|
||||
verifyOptionalAuthInfo(authInfo, existingDomain);
|
||||
|
|
|
@ -211,6 +211,7 @@ public final class DomainTransferRequestFlow implements TransactionalFlow {
|
|||
private HistoryEntry buildHistory(Period period, DomainResource existingResource, DateTime now) {
|
||||
return historyBuilder
|
||||
.setType(HistoryEntry.Type.DOMAIN_TRANSFER_REQUEST)
|
||||
.setOtherClientId(existingResource.getCurrentSponsorClientId())
|
||||
.setPeriod(period)
|
||||
.setModificationTime(now)
|
||||
.setParent(Key.create(existingResource))
|
||||
|
|
|
@ -103,6 +103,15 @@ public class HistoryEntry extends ImmutableObject implements Buildable {
|
|||
@Index
|
||||
String clientId;
|
||||
|
||||
/**
|
||||
* For transfers, the id of the other registrar.
|
||||
*
|
||||
* <p>For requests and cancels, the other registrar is the losing party (because the registrar
|
||||
* sending the EPP transfer command is the gaining party). For approves and rejects, the other
|
||||
* registrar is the gaining party.
|
||||
*/
|
||||
String otherClientId;
|
||||
|
||||
/** Transaction id that made this change. */
|
||||
Trid trid;
|
||||
|
||||
|
@ -139,6 +148,10 @@ public class HistoryEntry extends ImmutableObject implements Buildable {
|
|||
return clientId;
|
||||
}
|
||||
|
||||
public String getOtherClientId() {
|
||||
return otherClientId;
|
||||
}
|
||||
|
||||
public Trid getTrid() {
|
||||
return trid;
|
||||
}
|
||||
|
@ -203,6 +216,11 @@ public class HistoryEntry extends ImmutableObject implements Buildable {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder setOtherClientId(String otherClientId) {
|
||||
getInstance().otherClientId = otherClientId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTrid(Trid trid) {
|
||||
getInstance().trid = trid;
|
||||
return this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue