mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Get rid of ReferenceUnions entirely
This is the third and final phase in the migration away from ReferenceUnions. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138778148
This commit is contained in:
parent
8d97fa5858
commit
780a5add78
14 changed files with 5 additions and 148 deletions
|
@ -36,33 +36,17 @@
|
||||||
<property name="allContacts.contact" direction="asc"/>
|
<property name="allContacts.contact" direction="asc"/>
|
||||||
<property name="deletionTime" direction="asc"/>
|
<property name="deletionTime" direction="asc"/>
|
||||||
</datastore-index>
|
</datastore-index>
|
||||||
<!-- TODO(b/28713909): Remove this index along with ReferenceUnions. -->
|
|
||||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
|
||||||
<property name="allContacts.contactId.linked" direction="asc"/>
|
|
||||||
<property name="deletionTime" direction="asc"/>
|
|
||||||
</datastore-index>
|
|
||||||
<!-- For determining the active domains linked to a given host. -->
|
<!-- For determining the active domains linked to a given host. -->
|
||||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||||
<property name="nsHosts" direction="asc"/>
|
<property name="nsHosts" direction="asc"/>
|
||||||
<property name="deletionTime" direction="asc"/>
|
<property name="deletionTime" direction="asc"/>
|
||||||
</datastore-index>
|
</datastore-index>
|
||||||
<!-- TODO(b/28713909): Remove this index along with ReferenceUnions. -->
|
|
||||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
|
||||||
<property name="nameservers.linked" direction="asc"/>
|
|
||||||
<property name="deletionTime" direction="asc"/>
|
|
||||||
</datastore-index>
|
|
||||||
<!-- For RDAP searches by linked nameserver. -->
|
<!-- For RDAP searches by linked nameserver. -->
|
||||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||||
<property name="^i" direction="asc"/>
|
<property name="^i" direction="asc"/>
|
||||||
<property name="nsHosts" direction="asc"/>
|
<property name="nsHosts" direction="asc"/>
|
||||||
<property name="deletionTime" direction="asc"/>
|
<property name="deletionTime" direction="asc"/>
|
||||||
</datastore-index>
|
</datastore-index>
|
||||||
<!-- TODO(b/28713909): Remove this index along with ReferenceUnions. -->
|
|
||||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
|
||||||
<property name="^i" direction="asc"/>
|
|
||||||
<property name="nameservers.linked" direction="asc"/>
|
|
||||||
<property name="deletionTime" direction="asc"/>
|
|
||||||
</datastore-index>
|
|
||||||
<!-- For WHOIS IP address lookup -->
|
<!-- For WHOIS IP address lookup -->
|
||||||
<datastore-index kind="HostResource" ancestor="false" source="manual">
|
<datastore-index kind="HostResource" ancestor="false" source="manual">
|
||||||
<property name="inetAddresses" direction="asc"/>
|
<property name="inetAddresses" direction="asc"/>
|
||||||
|
|
|
@ -26,7 +26,6 @@ import com.google.common.collect.FluentIterable;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.googlecode.objectify.Key;
|
import com.googlecode.objectify.Key;
|
||||||
import com.googlecode.objectify.annotation.Ignore;
|
import com.googlecode.objectify.annotation.Ignore;
|
||||||
import google.registry.model.domain.ReferenceUnion;
|
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
@ -145,9 +144,7 @@ public abstract class ImmutableObject implements Cloneable {
|
||||||
new Function<Object, Object>() {
|
new Function<Object, Object>() {
|
||||||
@Override
|
@Override
|
||||||
public Object apply(Object value) {
|
public Object apply(Object value) {
|
||||||
if (value instanceof ReferenceUnion) {
|
if (value instanceof Key) {
|
||||||
return apply(((ReferenceUnion<?>) value).getLinked());
|
|
||||||
} else if (value instanceof Key) {
|
|
||||||
return apply(ofy().load().key((Key<?>) value).now());
|
return apply(ofy().load().key((Key<?>) value).now());
|
||||||
} else if (value instanceof Map) {
|
} else if (value instanceof Map) {
|
||||||
return transformValues((Map<?, ?>) value, this);
|
return transformValues((Map<?, ?>) value, this);
|
||||||
|
|
|
@ -22,7 +22,6 @@ import google.registry.model.ImmutableObject;
|
||||||
import google.registry.model.contact.ContactResource;
|
import google.registry.model.contact.ContactResource;
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlEnumValue;
|
import javax.xml.bind.annotation.XmlEnumValue;
|
||||||
import javax.xml.bind.annotation.XmlValue;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XML type for contact identifiers associated with a domain.
|
* XML type for contact identifiers associated with a domain.
|
||||||
|
@ -52,7 +51,6 @@ public class DesignatedContact extends ImmutableObject {
|
||||||
public static DesignatedContact create(Type type, Key<ContactResource> contact) {
|
public static DesignatedContact create(Type type, Key<ContactResource> contact) {
|
||||||
DesignatedContact instance = new DesignatedContact();
|
DesignatedContact instance = new DesignatedContact();
|
||||||
instance.type = type;
|
instance.type = type;
|
||||||
instance.contactId = ReferenceUnion.create(contact);
|
|
||||||
instance.contact = contact;
|
instance.contact = contact;
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
@ -60,11 +58,6 @@ public class DesignatedContact extends ImmutableObject {
|
||||||
@XmlAttribute(required = true)
|
@XmlAttribute(required = true)
|
||||||
Type type;
|
Type type;
|
||||||
|
|
||||||
@Index
|
|
||||||
@XmlValue
|
|
||||||
//TODO(b/28713909): Remove contactId and replace with contact.
|
|
||||||
ReferenceUnion<ContactResource> contactId;
|
|
||||||
|
|
||||||
@Index
|
@Index
|
||||||
Key<ContactResource> contact;
|
Key<ContactResource> contact;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@ import com.googlecode.objectify.Key;
|
||||||
import com.googlecode.objectify.annotation.Entity;
|
import com.googlecode.objectify.annotation.Entity;
|
||||||
import com.googlecode.objectify.annotation.IgnoreSave;
|
import com.googlecode.objectify.annotation.IgnoreSave;
|
||||||
import com.googlecode.objectify.annotation.Index;
|
import com.googlecode.objectify.annotation.Index;
|
||||||
import com.googlecode.objectify.annotation.OnSave;
|
|
||||||
import com.googlecode.objectify.condition.IfNull;
|
import com.googlecode.objectify.condition.IfNull;
|
||||||
import google.registry.model.EppResource;
|
import google.registry.model.EppResource;
|
||||||
import google.registry.model.contact.ContactResource;
|
import google.registry.model.contact.ContactResource;
|
||||||
|
@ -77,10 +76,6 @@ public abstract class DomainBase extends EppResource {
|
||||||
String tld;
|
String tld;
|
||||||
|
|
||||||
/** References to hosts that are the nameservers for the domain. */
|
/** References to hosts that are the nameservers for the domain. */
|
||||||
@XmlTransient
|
|
||||||
//TODO(b/28713909): Delete this once migration away from ReferenceUnions is complete.
|
|
||||||
Set<ReferenceUnion<HostResource>> nameservers;
|
|
||||||
|
|
||||||
@Index
|
@Index
|
||||||
@XmlTransient
|
@XmlTransient
|
||||||
Set<Key<HostResource>> nsHosts;
|
Set<Key<HostResource>> nsHosts;
|
||||||
|
@ -234,18 +229,6 @@ public abstract class DomainBase extends EppResource {
|
||||||
return tld;
|
return tld;
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnSave
|
|
||||||
void dualSaveReferenceUnions() {
|
|
||||||
for (DesignatedContact contact : nullToEmptyImmutableCopy(allContacts)) {
|
|
||||||
contact.contactId = ReferenceUnion.create(contact.contact);
|
|
||||||
}
|
|
||||||
ImmutableSet.Builder<ReferenceUnion<HostResource>> hosts = new ImmutableSet.Builder<>();
|
|
||||||
for (Key<HostResource> hostKey : nullToEmptyImmutableCopy(nsHosts)) {
|
|
||||||
hosts.add(ReferenceUnion.create(hostKey));
|
|
||||||
}
|
|
||||||
nameservers = hosts.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Predicate to determine if a given {@link DesignatedContact} is the registrant. */
|
/** Predicate to determine if a given {@link DesignatedContact} is the registrant. */
|
||||||
private static final Predicate<DesignatedContact> IS_REGISTRANT =
|
private static final Predicate<DesignatedContact> IS_REGISTRANT =
|
||||||
new Predicate<DesignatedContact>() {
|
new Predicate<DesignatedContact>() {
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
// Copyright 2016 The Nomulus Authors. All Rights Reserved.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package google.registry.model.domain;
|
|
||||||
|
|
||||||
import com.googlecode.objectify.Key;
|
|
||||||
import com.googlecode.objectify.annotation.Embed;
|
|
||||||
import com.googlecode.objectify.annotation.Index;
|
|
||||||
import google.registry.model.EppResource;
|
|
||||||
import google.registry.model.ImmutableObject;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Legacy shell of a "union" type to represent referenced objects as either a foreign key or as a
|
|
||||||
* link to another object in the datastore. In its current form it merely wraps a {@link Key}.
|
|
||||||
*
|
|
||||||
* @param <T> the type being referenced
|
|
||||||
*/
|
|
||||||
// TODO(b/28713909): Delete ReferenceUnion entirely.
|
|
||||||
@Embed
|
|
||||||
@Deprecated
|
|
||||||
public class ReferenceUnion<T extends EppResource> extends ImmutableObject {
|
|
||||||
|
|
||||||
@Index
|
|
||||||
Key<T> linked;
|
|
||||||
|
|
||||||
public Key<T> getLinked() {
|
|
||||||
return linked;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T extends EppResource> ReferenceUnion<T> create(Key<T> linked) {
|
|
||||||
ReferenceUnion<T> instance = new ReferenceUnion<>();
|
|
||||||
instance.linked = linked;
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -19,7 +19,6 @@ import static com.google.common.collect.Maps.newHashMap;
|
||||||
import static com.google.common.collect.Sets.newHashSet;
|
import static com.google.common.collect.Sets.newHashSet;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static google.registry.model.ImmutableObject.cloneEmptyToNull;
|
import static google.registry.model.ImmutableObject.cloneEmptyToNull;
|
||||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
|
||||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||||
|
|
||||||
|
@ -31,7 +30,6 @@ import com.googlecode.objectify.Key;
|
||||||
import com.googlecode.objectify.ObjectifyService;
|
import com.googlecode.objectify.ObjectifyService;
|
||||||
import com.googlecode.objectify.annotation.Entity;
|
import com.googlecode.objectify.annotation.Entity;
|
||||||
import com.googlecode.objectify.annotation.Id;
|
import com.googlecode.objectify.annotation.Id;
|
||||||
import google.registry.model.domain.ReferenceUnion;
|
|
||||||
import google.registry.testing.AppEngineRule;
|
import google.registry.testing.AppEngineRule;
|
||||||
import google.registry.util.CidrAddressBlock;
|
import google.registry.util.CidrAddressBlock;
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
|
@ -255,6 +253,7 @@ public class ImmutableObjectTest {
|
||||||
|
|
||||||
/** Subclass of ImmutableObject with keys to other objects. */
|
/** Subclass of ImmutableObject with keys to other objects. */
|
||||||
public static class RootObject extends ImmutableObject {
|
public static class RootObject extends ImmutableObject {
|
||||||
|
|
||||||
Key<ValueObject> hydrateMe;
|
Key<ValueObject> hydrateMe;
|
||||||
|
|
||||||
@DoNotHydrate
|
@DoNotHydrate
|
||||||
|
@ -263,8 +262,6 @@ public class ImmutableObjectTest {
|
||||||
Map<String, Key<ValueObject>> map;
|
Map<String, Key<ValueObject>> map;
|
||||||
|
|
||||||
Set<Key<ValueObject>> set;
|
Set<Key<ValueObject>> set;
|
||||||
|
|
||||||
ReferenceUnion<?> referenceUnion;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Simple subclass of ImmutableObject. */
|
/** Simple subclass of ImmutableObject. */
|
||||||
|
@ -308,11 +305,4 @@ public class ImmutableObjectTest {
|
||||||
root.set = ImmutableSet.of(Key.create(persistResource(ValueObject.create(1, "foo"))));
|
root.set = ImmutableSet.of(Key.create(persistResource(ValueObject.create(1, "foo"))));
|
||||||
assertThat(root.toHydratedString()).contains("foo");
|
assertThat(root.toHydratedString()).contains("foo");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testToHydratedString_expandsReferenceUnions() {
|
|
||||||
RootObject root = new RootObject();
|
|
||||||
root.referenceUnion = ReferenceUnion.create(Key.create(persistActiveContact("foo")));
|
|
||||||
assertThat(root.toHydratedString()).contains("foo");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,10 +130,8 @@ public class DomainApplicationTest extends EntityTestCase {
|
||||||
domainApplication.asBuilder().setPeriod(Period.create(5, Period.Unit.YEARS)).build());
|
domainApplication.asBuilder().setPeriod(Period.create(5, Period.Unit.YEARS)).build());
|
||||||
verifyIndexing(
|
verifyIndexing(
|
||||||
domainApplication,
|
domainApplication,
|
||||||
"allContacts.contactId.linked",
|
|
||||||
"allContacts.contact",
|
"allContacts.contact",
|
||||||
"fullyQualifiedDomainName",
|
"fullyQualifiedDomainName",
|
||||||
"nameservers.linked",
|
|
||||||
"nsHosts",
|
"nsHosts",
|
||||||
"deletionTime",
|
"deletionTime",
|
||||||
"currentSponsorClientId",
|
"currentSponsorClientId",
|
||||||
|
|
|
@ -23,8 +23,6 @@ import static google.registry.testing.DatastoreHelper.cloneAndSetAutoTimestamps;
|
||||||
import static google.registry.testing.DatastoreHelper.createTld;
|
import static google.registry.testing.DatastoreHelper.createTld;
|
||||||
import static google.registry.testing.DatastoreHelper.newDomainResource;
|
import static google.registry.testing.DatastoreHelper.newDomainResource;
|
||||||
import static google.registry.testing.DatastoreHelper.newHostResource;
|
import static google.registry.testing.DatastoreHelper.newHostResource;
|
||||||
import static google.registry.testing.DatastoreHelper.persistActiveContact;
|
|
||||||
import static google.registry.testing.DatastoreHelper.persistActiveHost;
|
|
||||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||||
import static google.registry.testing.DomainResourceSubject.assertAboutDomains;
|
import static google.registry.testing.DomainResourceSubject.assertAboutDomains;
|
||||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||||
|
@ -174,10 +172,8 @@ public class DomainResourceTest extends EntityTestCase {
|
||||||
public void testIndexing() throws Exception {
|
public void testIndexing() throws Exception {
|
||||||
verifyIndexing(
|
verifyIndexing(
|
||||||
domain,
|
domain,
|
||||||
"allContacts.contactId.linked",
|
|
||||||
"allContacts.contact",
|
"allContacts.contact",
|
||||||
"fullyQualifiedDomainName",
|
"fullyQualifiedDomainName",
|
||||||
"nameservers.linked",
|
|
||||||
"nsHosts",
|
"nsHosts",
|
||||||
"currentSponsorClientId",
|
"currentSponsorClientId",
|
||||||
"deletionTime",
|
"deletionTime",
|
||||||
|
@ -455,28 +451,4 @@ public class DomainResourceTest extends EntityTestCase {
|
||||||
public void testToHydratedString_notCircular() {
|
public void testToHydratedString_notCircular() {
|
||||||
domain.toHydratedString(); // If there are circular references, this will overflow the stack.
|
domain.toHydratedString(); // If there are circular references, this will overflow the stack.
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(b/28713909): Remove these tests once ReferenceUnion migration is complete.
|
|
||||||
@Test
|
|
||||||
public void testDualSavingOfDesignatedContact() {
|
|
||||||
ContactResource contact = persistActiveContact("time1006");
|
|
||||||
DesignatedContact designatedContact = new DesignatedContact();
|
|
||||||
designatedContact.contact = Key.create(contact);
|
|
||||||
designatedContact.type = Type.ADMIN;
|
|
||||||
DomainResource domainWithContact =
|
|
||||||
domain.asBuilder().setContacts(ImmutableSet.of(designatedContact)).build();
|
|
||||||
assertThat(getOnlyElement(domainWithContact.getContacts()).contactId).isNull();
|
|
||||||
DomainResource reloadedDomain = persistResource(domainWithContact);
|
|
||||||
assertThat(getOnlyElement(reloadedDomain.getContacts()).contactId)
|
|
||||||
.isEqualTo(ReferenceUnion.create(Key.create(contact)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testDualSavingOfNameservers() {
|
|
||||||
HostResource host = persistActiveHost("zzz.xxx.yyy");
|
|
||||||
DomainResource domain = newDomainResource("python-django-unchained.com", host);
|
|
||||||
assertThat(domain.nameservers).isNull();
|
|
||||||
DomainResource djangoReloaded = persistResource(domain);
|
|
||||||
assertThat(djangoReloaded.nameservers).containsExactly(ReferenceUnion.create(Key.create(host)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,6 @@ enum google.registry.model.contact.PostalInfo$Type {
|
||||||
class google.registry.model.domain.DesignatedContact {
|
class google.registry.model.domain.DesignatedContact {
|
||||||
com.googlecode.objectify.Key<google.registry.model.contact.ContactResource> contact;
|
com.googlecode.objectify.Key<google.registry.model.contact.ContactResource> contact;
|
||||||
google.registry.model.domain.DesignatedContact$Type type;
|
google.registry.model.domain.DesignatedContact$Type type;
|
||||||
google.registry.model.domain.ReferenceUnion<google.registry.model.contact.ContactResource> contactId;
|
|
||||||
}
|
}
|
||||||
enum google.registry.model.domain.DesignatedContact$Type {
|
enum google.registry.model.domain.DesignatedContact$Type {
|
||||||
ADMIN;
|
ADMIN;
|
||||||
|
@ -218,7 +217,6 @@ class google.registry.model.domain.DomainApplication {
|
||||||
java.util.List<google.registry.model.smd.EncodedSignedMark> encodedSignedMarks;
|
java.util.List<google.registry.model.smd.EncodedSignedMark> encodedSignedMarks;
|
||||||
java.util.Set<com.googlecode.objectify.Key<google.registry.model.host.HostResource>> nsHosts;
|
java.util.Set<com.googlecode.objectify.Key<google.registry.model.host.HostResource>> nsHosts;
|
||||||
java.util.Set<google.registry.model.domain.DesignatedContact> allContacts;
|
java.util.Set<google.registry.model.domain.DesignatedContact> allContacts;
|
||||||
java.util.Set<google.registry.model.domain.ReferenceUnion<google.registry.model.host.HostResource>> nameservers;
|
|
||||||
java.util.Set<google.registry.model.domain.secdns.DelegationSignerData> dsData;
|
java.util.Set<google.registry.model.domain.secdns.DelegationSignerData> dsData;
|
||||||
java.util.Set<google.registry.model.eppcommon.StatusValue> status;
|
java.util.Set<google.registry.model.eppcommon.StatusValue> status;
|
||||||
org.joda.money.Money auctionPrice;
|
org.joda.money.Money auctionPrice;
|
||||||
|
@ -245,7 +243,6 @@ class google.registry.model.domain.DomainBase {
|
||||||
java.lang.String tld;
|
java.lang.String tld;
|
||||||
java.util.Set<com.googlecode.objectify.Key<google.registry.model.host.HostResource>> nsHosts;
|
java.util.Set<com.googlecode.objectify.Key<google.registry.model.host.HostResource>> nsHosts;
|
||||||
java.util.Set<google.registry.model.domain.DesignatedContact> allContacts;
|
java.util.Set<google.registry.model.domain.DesignatedContact> allContacts;
|
||||||
java.util.Set<google.registry.model.domain.ReferenceUnion<google.registry.model.host.HostResource>> nameservers;
|
|
||||||
java.util.Set<google.registry.model.domain.secdns.DelegationSignerData> dsData;
|
java.util.Set<google.registry.model.domain.secdns.DelegationSignerData> dsData;
|
||||||
java.util.Set<google.registry.model.eppcommon.StatusValue> status;
|
java.util.Set<google.registry.model.eppcommon.StatusValue> status;
|
||||||
org.joda.time.DateTime deletionTime;
|
org.joda.time.DateTime deletionTime;
|
||||||
|
@ -274,7 +271,6 @@ class google.registry.model.domain.DomainResource {
|
||||||
java.util.Set<com.googlecode.objectify.Key<google.registry.model.host.HostResource>> nsHosts;
|
java.util.Set<com.googlecode.objectify.Key<google.registry.model.host.HostResource>> nsHosts;
|
||||||
java.util.Set<google.registry.model.domain.DesignatedContact> allContacts;
|
java.util.Set<google.registry.model.domain.DesignatedContact> allContacts;
|
||||||
java.util.Set<google.registry.model.domain.GracePeriod> gracePeriods;
|
java.util.Set<google.registry.model.domain.GracePeriod> gracePeriods;
|
||||||
java.util.Set<google.registry.model.domain.ReferenceUnion<google.registry.model.host.HostResource>> nameservers;
|
|
||||||
java.util.Set<google.registry.model.domain.secdns.DelegationSignerData> dsData;
|
java.util.Set<google.registry.model.domain.secdns.DelegationSignerData> dsData;
|
||||||
java.util.Set<google.registry.model.eppcommon.StatusValue> status;
|
java.util.Set<google.registry.model.eppcommon.StatusValue> status;
|
||||||
java.util.Set<java.lang.String> subordinateHosts;
|
java.util.Set<java.lang.String> subordinateHosts;
|
||||||
|
@ -307,9 +303,6 @@ enum google.registry.model.domain.Period$Unit {
|
||||||
MONTHS;
|
MONTHS;
|
||||||
YEARS;
|
YEARS;
|
||||||
}
|
}
|
||||||
class google.registry.model.domain.ReferenceUnion {
|
|
||||||
com.googlecode.objectify.Key<T> linked;
|
|
||||||
}
|
|
||||||
enum google.registry.model.domain.launch.ApplicationStatus {
|
enum google.registry.model.domain.launch.ApplicationStatus {
|
||||||
ALLOCATED;
|
ALLOCATED;
|
||||||
INVALID;
|
INVALID;
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class GetApplicationCommandTest extends CommandTestCase<GetApplicationCom
|
||||||
persistActiveDomainApplication("example.tld");
|
persistActiveDomainApplication("example.tld");
|
||||||
runCommand("2-TLD");
|
runCommand("2-TLD");
|
||||||
assertInStdout("fullyQualifiedDomainName=example.tld");
|
assertInStdout("fullyQualifiedDomainName=example.tld");
|
||||||
assertInStdout("contactId=ReferenceUnion");
|
assertInStdout("contact=Key<?>(ContactResource(\"3-ROID\"))");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -50,7 +50,6 @@ public class GetApplicationCommandTest extends CommandTestCase<GetApplicationCom
|
||||||
runCommand("2-TLD", "--expand");
|
runCommand("2-TLD", "--expand");
|
||||||
assertInStdout("fullyQualifiedDomainName=example.tld");
|
assertInStdout("fullyQualifiedDomainName=example.tld");
|
||||||
assertInStdout("contactId=contact1234");
|
assertInStdout("contactId=contact1234");
|
||||||
assertNotInStdout("ReferenceUnion");
|
|
||||||
assertNotInStdout("LiveRef");
|
assertNotInStdout("LiveRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,6 @@ public class GetContactCommandTest extends CommandTestCase<GetContactCommand> {
|
||||||
runCommand("sh8013", "--expand");
|
runCommand("sh8013", "--expand");
|
||||||
assertInStdout("contactId=sh8013");
|
assertInStdout("contactId=sh8013");
|
||||||
assertInStdout("Websafe key: agR0ZXN0chsLEg9Db250YWN0UmVzb3VyY2UiBjItUk9JRAw");
|
assertInStdout("Websafe key: agR0ZXN0chsLEg9Db250YWN0UmVzb3VyY2UiBjItUk9JRAw");
|
||||||
assertNotInStdout("ReferenceUnion");
|
|
||||||
assertNotInStdout("LiveRef");
|
assertNotInStdout("LiveRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class GetDomainCommandTest extends CommandTestCase<GetDomainCommand> {
|
||||||
persistActiveDomain("example.tld");
|
persistActiveDomain("example.tld");
|
||||||
runCommand("example.tld");
|
runCommand("example.tld");
|
||||||
assertInStdout("fullyQualifiedDomainName=example.tld");
|
assertInStdout("fullyQualifiedDomainName=example.tld");
|
||||||
assertInStdout("contactId=ReferenceUnion");
|
assertInStdout("contact=Key<?>(ContactResource(\"3-ROID\"))");
|
||||||
assertInStdout("Websafe key: agR0ZXN0chULEgpEb21haW5CYXNlIgUyLVRMRAw");
|
assertInStdout("Websafe key: agR0ZXN0chULEgpEb21haW5CYXNlIgUyLVRMRAw");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,6 @@ public class GetDomainCommandTest extends CommandTestCase<GetDomainCommand> {
|
||||||
assertInStdout("fullyQualifiedDomainName=example.tld");
|
assertInStdout("fullyQualifiedDomainName=example.tld");
|
||||||
assertInStdout("contactId=contact1234");
|
assertInStdout("contactId=contact1234");
|
||||||
assertInStdout("Websafe key: agR0ZXN0chULEgpEb21haW5CYXNlIgUyLVRMRAw");
|
assertInStdout("Websafe key: agR0ZXN0chULEgpEb21haW5CYXNlIgUyLVRMRAw");
|
||||||
assertNotInStdout("ReferenceUnion");
|
|
||||||
assertNotInStdout("LiveRef");
|
assertNotInStdout("LiveRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,6 @@ public class GetHostCommandTest extends CommandTestCase<GetHostCommand> {
|
||||||
runCommand("ns1.example.tld", "--expand");
|
runCommand("ns1.example.tld", "--expand");
|
||||||
assertInStdout("fullyQualifiedHostName=ns1.example.tld");
|
assertInStdout("fullyQualifiedHostName=ns1.example.tld");
|
||||||
assertInStdout("Websafe key: agR0ZXN0chgLEgxIb3N0UmVzb3VyY2UiBjItUk9JRAw");
|
assertInStdout("Websafe key: agR0ZXN0chgLEgxIb3N0UmVzb3VyY2UiBjItUk9JRAw");
|
||||||
assertNotInStdout("ReferenceUnion");
|
|
||||||
assertNotInStdout("LiveRef");
|
assertNotInStdout("LiveRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class GetResourceByKeyCommandTest extends CommandTestCase<GetResourceByKe
|
||||||
persistActiveDomain("example.tld");
|
persistActiveDomain("example.tld");
|
||||||
runCommand("agR0ZXN0chULEgpEb21haW5CYXNlIgUyLVRMRAw");
|
runCommand("agR0ZXN0chULEgpEb21haW5CYXNlIgUyLVRMRAw");
|
||||||
assertInStdout("fullyQualifiedDomainName=example.tld");
|
assertInStdout("fullyQualifiedDomainName=example.tld");
|
||||||
assertInStdout("contactId=ReferenceUnion");
|
assertInStdout("contact=Key<?>(ContactResource(\"3-ROID\"))");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -52,7 +52,6 @@ public class GetResourceByKeyCommandTest extends CommandTestCase<GetResourceByKe
|
||||||
runCommand("agR0ZXN0chULEgpEb21haW5CYXNlIgUyLVRMRAw", "--expand");
|
runCommand("agR0ZXN0chULEgpEb21haW5CYXNlIgUyLVRMRAw", "--expand");
|
||||||
assertInStdout("fullyQualifiedDomainName=example.tld");
|
assertInStdout("fullyQualifiedDomainName=example.tld");
|
||||||
assertInStdout("contactId=contact1234");
|
assertInStdout("contactId=contact1234");
|
||||||
assertNotInStdout("ReferenceUnion");
|
|
||||||
assertNotInStdout("LiveRef");
|
assertNotInStdout("LiveRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +95,6 @@ public class GetResourceByKeyCommandTest extends CommandTestCase<GetResourceByKe
|
||||||
persistActiveContact("sh8013");
|
persistActiveContact("sh8013");
|
||||||
runCommand("agR0ZXN0chsLEg9Db250YWN0UmVzb3VyY2UiBjItUk9JRAw", "--expand");
|
runCommand("agR0ZXN0chsLEg9Db250YWN0UmVzb3VyY2UiBjItUk9JRAw", "--expand");
|
||||||
assertInStdout("contactId=sh8013");
|
assertInStdout("contactId=sh8013");
|
||||||
assertNotInStdout("ReferenceUnion");
|
|
||||||
assertNotInStdout("LiveRef");
|
assertNotInStdout("LiveRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +140,6 @@ public class GetResourceByKeyCommandTest extends CommandTestCase<GetResourceByKe
|
||||||
persistActiveHost("ns1.example.tld");
|
persistActiveHost("ns1.example.tld");
|
||||||
runCommand("agR0ZXN0chgLEgxIb3N0UmVzb3VyY2UiBjItUk9JRAw", "--expand");
|
runCommand("agR0ZXN0chgLEgxIb3N0UmVzb3VyY2UiBjItUk9JRAw", "--expand");
|
||||||
assertInStdout("fullyQualifiedHostName=ns1.example.tld");
|
assertInStdout("fullyQualifiedHostName=ns1.example.tld");
|
||||||
assertNotInStdout("ReferenceUnion");
|
|
||||||
assertNotInStdout("LiveRef");
|
assertNotInStdout("LiveRef");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue