mirror of
https://github.com/google/nomulus
synced 2026-07-24 09:02:44 +00:00
Scope down TransferData to only ContactResource and DomainResource
HostResource and DomainApplication are not transferable, (or at least, not directly in the case of hosts) and have no need for the TransferData field. In a flat-flow world, we can push it down to where it's actually used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139201423
This commit is contained in:
@@ -242,21 +242,6 @@ public class VerifyEntityIntegrityAction implements Runnable {
|
||||
Key<?> key = Key.create(domainBase);
|
||||
verifyExistence(key, domainBase.getReferencedContacts());
|
||||
verifyExistence(key, domainBase.getNameservers());
|
||||
verifyExistence(key, domainBase.getTransferData().getServerApproveAutorenewEvent());
|
||||
verifyExistence(key, domainBase.getTransferData().getServerApproveAutorenewPollMessage());
|
||||
verifyExistence(key, domainBase.getTransferData().getServerApproveBillingEvent());
|
||||
verifyExistence(key, FluentIterable
|
||||
.from(domainBase.getTransferData().getServerApproveEntities())
|
||||
.transform(
|
||||
new Function<Key<? extends TransferServerApproveEntity>,
|
||||
Key<TransferServerApproveEntity>>() {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Key<TransferServerApproveEntity> apply(
|
||||
Key<? extends TransferServerApproveEntity> key) {
|
||||
return (Key<TransferServerApproveEntity>) key;
|
||||
}})
|
||||
.toSet());
|
||||
if (domainBase instanceof DomainApplication) {
|
||||
getContext().incrementCounter("domain applications");
|
||||
DomainApplication application = (DomainApplication) domainBase;
|
||||
@@ -266,6 +251,21 @@ public class VerifyEntityIntegrityAction implements Runnable {
|
||||
} else if (domainBase instanceof DomainResource) {
|
||||
getContext().incrementCounter("domain resources");
|
||||
DomainResource domain = (DomainResource) domainBase;
|
||||
verifyExistence(key, domain.getTransferData().getServerApproveAutorenewEvent());
|
||||
verifyExistence(key, domain.getTransferData().getServerApproveAutorenewPollMessage());
|
||||
verifyExistence(key, domain.getTransferData().getServerApproveBillingEvent());
|
||||
verifyExistence(key, FluentIterable
|
||||
.from(domain.getTransferData().getServerApproveEntities())
|
||||
.transform(
|
||||
new Function<Key<? extends TransferServerApproveEntity>,
|
||||
Key<TransferServerApproveEntity>>() {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Key<TransferServerApproveEntity> apply(
|
||||
Key<? extends TransferServerApproveEntity> key) {
|
||||
return (Key<TransferServerApproveEntity>) key;
|
||||
}})
|
||||
.toSet());
|
||||
verifyExistence(key, domain.getApplication());
|
||||
verifyExistence(key, domain.getAutorenewBillingEvent());
|
||||
for (GracePeriod gracePeriod : domain.getGracePeriods()) {
|
||||
|
||||
Reference in New Issue
Block a user