Registry should not be a BackupGroupRoot

In [] I made Registry a BGR in prep for each Registry being in
its own entity group. But we decided not to do that, and in []
mcilwain@ moved Registry under the cross-tld root. So there's no reason
for Registry to implement BackupGroupRoot anymore.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120402417
This commit is contained in:
cgoldfeder 2016-04-20 19:37:07 -07:00 committed by Justine Tunney
parent 36ab6c15fe
commit 9ca191f3d4
4 changed files with 2 additions and 22 deletions

View file

@ -41,9 +41,9 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Ordering;
import com.google.common.net.InternetDomainName;
import com.google.domain.registry.config.RegistryEnvironment;
import com.google.domain.registry.model.BackupGroupRoot;
import com.google.domain.registry.model.Buildable;
import com.google.domain.registry.model.CreateAutoTimestamp;
import com.google.domain.registry.model.ImmutableObject;
import com.google.domain.registry.model.common.EntityGroupRoot;
import com.google.domain.registry.model.common.TimedTransitionProperty;
import com.google.domain.registry.model.common.TimedTransitionProperty.TimedTransition;
@ -71,7 +71,7 @@ import java.util.Set;
/** Persisted per-TLD configuration data. */
@Cache(expirationSeconds = RECOMMENDED_MEMCACHE_EXPIRATION)
@Entity
public class Registry extends BackupGroupRoot implements Buildable {
public class Registry extends ImmutableObject implements Buildable {
@Parent
Key<EntityGroupRoot> parent = getCrossTldKey();

View file

@ -663,7 +663,6 @@ class com.google.domain.registry.model.registry.Registry {
boolean escrowEnabled;
boolean premiumPriceAckRequired;
com.google.domain.registry.model.CreateAutoTimestamp creationTime;
com.google.domain.registry.model.UpdateAutoTimestamp updateTimestamp;
com.google.domain.registry.model.common.TimedTransitionProperty<com.google.domain.registry.model.registry.Registry$TldState, com.google.domain.registry.model.registry.Registry$TldStateTransition> tldStateTransitions;
com.google.domain.registry.model.common.TimedTransitionProperty<org.joda.money.Money, com.google.domain.registry.model.registry.Registry$BillingCostTransition> renewBillingCostTransitions;
com.google.domain.registry.model.registry.Registry$TldType tldType;

View file

@ -66,8 +66,6 @@ public class CreateTldCommandTest extends CommandTestCase<CreateTldCommand> {
.isEqualTo(Registry.DEFAULT_REDEMPTION_GRACE_PERIOD);
assertThat(registry.getPendingDeleteLength()).isEqualTo(Registry.DEFAULT_PENDING_DELETE_LENGTH);
assertThat(registry.getCreationTime()).isIn(Range.closed(before, after));
assertThat(registry.getUpdateAutoTimestamp().getTimestamp())
.isEqualTo(registry.getCreationTime());
}
@Test

View file

@ -30,7 +30,6 @@ import static org.joda.time.Duration.standardMinutes;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Range;
import com.google.domain.registry.model.registry.Registry;
import com.google.domain.registry.model.registry.Registry.TldState;
import com.google.domain.registry.model.registry.label.PremiumList;
@ -63,22 +62,6 @@ public class UpdateTldCommandTest extends CommandTestCase<UpdateTldCommand> {
createTld("xn--q9jyb4c");
}
@Test
public void testSuccess_updateAutoTimestamp() throws Exception {
Registry registry = Registry.get("xn--q9jyb4c");
DateTime creationTime = registry.getCreationTime();
assertThat(creationTime).isNotNull();
assertThat(registry.getUpdateAutoTimestamp().getTimestamp()).isEqualTo(creationTime);
DateTime before = DateTime.now(UTC);
runCommandForced("xn--q9jyb4c");
DateTime after = DateTime.now(UTC);
registry = Registry.get("xn--q9jyb4c");
assertThat(registry.getCreationTime()).isEqualTo(creationTime);
assertThat(registry.getUpdateAutoTimestamp().getTimestamp()).isIn(Range.closed(before, after));
}
@Test
public void testSuccess_tldStateTransitions() throws Exception {
DateTime sunriseStart = now;