mirror of
https://github.com/google/nomulus
synced 2026-01-11 00:10:36 +00:00
Delete end-date sunrise, landrush, and sunrush phases
This also deletes the associated commands and domain application specific entities. We haven't used any of these TLD phases since early 2015 and have no intent to do so in the future, so it makes sense to delete them now so we don't have to carry them through the Registry 3.0 migration. Note that, while there are data model changes, there should be no required data migrations. The fields and entities being removed will simply remain as orphans. I confirmed that the removed types (such as the SUNRUSH_ADD GracePeriodType) are no longer used in production data, and left types that are still used, e.g. BillingEvent.Flag.LANDRUSH or HistoryEntry.Type.ALLOCATE. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228752843
This commit is contained in:
@@ -18,11 +18,9 @@ import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.EppResource;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DomainApplication;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.index.ForeignKeyIndex;
|
||||
@@ -33,21 +31,18 @@ class CommandUtilities {
|
||||
|
||||
/** A useful parameter enum for commands that operate on {@link EppResource} objects. */
|
||||
public enum ResourceType {
|
||||
CONTACT,
|
||||
HOST,
|
||||
DOMAIN,
|
||||
APPLICATION;
|
||||
CONTACT(ContactResource.class),
|
||||
HOST(HostResource.class),
|
||||
DOMAIN(DomainResource.class);
|
||||
|
||||
private Class<? extends EppResource> clazz;
|
||||
|
||||
ResourceType(Class<? extends EppResource> clazz) {
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
public Key<? extends EppResource> getKey(String uniqueId, DateTime now) {
|
||||
return this == APPLICATION
|
||||
? Key.create(DomainApplication.class, uniqueId)
|
||||
: ForeignKeyIndex.loadAndGetKey(
|
||||
ImmutableMap.of(
|
||||
CONTACT, ContactResource.class,
|
||||
HOST, HostResource.class,
|
||||
DOMAIN, DomainResource.class).get(this),
|
||||
uniqueId,
|
||||
now);
|
||||
return ForeignKeyIndex.loadAndGetKey(clazz, uniqueId, now);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user