mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02: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:
parent
0234795240
commit
84009eaccb
24 changed files with 309 additions and 240 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue