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:
mcilwain 2019-01-10 12:09:14 -08:00 committed by Ben McIlwain
parent c74ffd7559
commit 580302898d
282 changed files with 344 additions and 17634 deletions

View file

@ -14,15 +14,10 @@
package google.registry.model.domain.launch;
import static com.google.common.base.CaseFormat.LOWER_CAMEL;
import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
import static google.registry.util.TypeUtils.getTypesafeEnumMapping;
import static java.util.Objects.hash;
import com.google.common.collect.ImmutableMap;
import com.googlecode.objectify.annotation.Embed;
import google.registry.model.ImmutableObject;
import java.util.Map.Entry;
import java.util.Objects;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
@ -48,9 +43,9 @@ import javax.xml.bind.annotation.XmlValue;
* we will return an error if it's the wrong phase (or if the marks are invalid) even though we
* didn't require them.
*
* <p>This is OK (?) because the Anchor Tenants field is set internally and manually.. The person
* who sets it is the one that needs to make sure the domain isn't a trademark and that the fields
* are correct.
* <p>This is OK (?) because the Anchor Tenants field is set internally and manually. The person who
* sets it is the one that needs to make sure the domain isn't a trademark and that the fields are
* correct.
*/
@Embed
public class LaunchPhase extends ImmutableObject {
@ -58,61 +53,33 @@ public class LaunchPhase extends ImmutableObject {
/**
* The phase during which trademark holders can submit registrations or applications with
* trademark information that can be validated by the server.
*
* This phase works for both start-date and end-data sunrise.
*
* TODO(b/74006379): maybe make this work for sunrush phase?
*/
public static final LaunchPhase SUNRISE = create("sunrise", null);
/**
* A post-Sunrise phase when non-trademark holders are allowed to register domain names with steps
* taken to address a large volume of initial registrations.
*/
public static final LaunchPhase LANDRUSH = create("landrush", null);
/** A combined sunrise/landrush phase. */
public static final LaunchPhase SUNRUSH = create("sunrise", "landrush");
public static final LaunchPhase SUNRISE = create("sunrise");
/**
* The Trademark Claims phase, as defined in the TMCH Functional Specification, in which a Claims
* Notice must be displayed to a prospective registrant of a domain name that matches trademarks.
*/
public static final LaunchPhase CLAIMS = create("claims", null);
public static final LaunchPhase CLAIMS = create("claims");
/** A post-launch phase that is also referred to as "steady state". */
public static final LaunchPhase OPEN = create("open", null);
/** A custom server launch phase that is defined using the "name" attribute. */
public static final LaunchPhase CUSTOM = create("custom", null);
private static final ImmutableMap<String, LaunchPhase> LAUNCH_PHASES = initEnumMapping();
/**
* Returns a map of the static final fields to their values, case-converted.
*/
private static ImmutableMap<String, LaunchPhase> initEnumMapping() {
ImmutableMap.Builder<String, LaunchPhase> builder = new ImmutableMap.Builder<>();
for (Entry<String, LaunchPhase> entry : getTypesafeEnumMapping(LaunchPhase.class).entrySet()) {
builder.put(UPPER_UNDERSCORE.to(LOWER_CAMEL, entry.getKey()), entry.getValue());
}
return builder.build();
}
public static final LaunchPhase OPEN = create("open");
/** Private create function for the typesafe enum pattern. */
public static LaunchPhase create(String phase, String subphase) {
public static LaunchPhase create(String phase) {
LaunchPhase instance = new LaunchPhase();
instance.phase = phase;
instance.subphase = subphase;
return instance;
}
@XmlValue
String phase;
@XmlValue String phase;
/**
* Holds the name of a custom phase if the main phase is "custom", or a sub-phase for all other
* values.
*
* <p>This is currently unused, but is retained so that incoming XMLs that include a subphase can
* have it be reflected back.
*/
@XmlAttribute(name = "name")
String subphase;
@ -121,14 +88,6 @@ public class LaunchPhase extends ImmutableObject {
return phase;
}
public String getSubphase() {
return subphase;
}
public static LaunchPhase fromValue(String value) {
return LAUNCH_PHASES.get(value);
}
/** A special equals implementation that only considers the string value. */
@Override
public boolean equals(Object other) {