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

@ -1,23 +0,0 @@
// Copyright 2017 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.launch;
import google.registry.model.eppinput.EppInput.CommandExtension;
/** Marker interface for EPP extensions which override the EPP notion of id with their own. */
public interface ApplicationIdTargetExtension extends CommandExtension {
/** Get the application id to use as the resource id for commands using this extension. */
String getApplicationId();
}

View file

@ -1,58 +0,0 @@
// Copyright 2017 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.launch;
import static com.google.common.base.CaseFormat.LOWER_CAMEL;
import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
import google.registry.model.translators.EnumToAttributeAdapter;
import google.registry.model.translators.EnumToAttributeAdapter.EppEnum;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* Represents the EPP application status.
*
* <p>These values are never read from a command and only used in responses, so, we don't need to
* model anything we don't output. We don't model the CUSTOM status because we don't use it. This
* allows us to also avoid modeling the "name" attribute which is only used with CUSTOM. We don't
* model the "lang" attribute because we only support English and that's the default.
*
* <p>Given all of this, we can use {@link EnumToAttributeAdapter} to make this code very simple.
*
* @see <a href="http://tools.ietf.org/html/draft-tan-epp-launchphase-11#section-2.3">
* Launch Phase Mapping for EPP - Status Values</a>
*/
@XmlJavaTypeAdapter(EnumToAttributeAdapter.class)
public enum ApplicationStatus implements EppEnum {
ALLOCATED,
INVALID,
PENDING_ALLOCATION,
PENDING_VALIDATION,
REJECTED,
VALIDATED;
@Override
public String getXmlName() {
return UPPER_UNDERSCORE.to(LOWER_CAMEL, name());
}
/**
* Returns true if this status is a final status - that is, it should not transition to any other
* application status after this one.
*/
public boolean isFinalStatus() {
return ALLOCATED.equals(this) || REJECTED.equals(this);
}
}

View file

@ -60,6 +60,9 @@ public class LaunchCreateExtension extends LaunchExtension implements CommandExt
/**
* A Launch Application refers to a registration made during a launch phase when the server
* accepts multiple applications for the same domain name.
*
* <p>This is no longer used, but is retained so incoming commands with this value error out
* with a descriptive message rather than failing XML marshalling.
*/
@XmlEnumValue("application")
APPLICATION,

View file

@ -1,31 +0,0 @@
// Copyright 2017 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.launch;
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* An XML data object that represents a launch extension that may be present on the response to EPP
* domain application create commands.
*/
@XmlRootElement(name = "creData")
@XmlType(propOrder = {"phase", "applicationId"})
public class LaunchCreateResponseExtension extends LaunchExtension implements ResponseExtension {
/** Builder for {@link LaunchCreateResponseExtension}. */
public static class Builder
extends LaunchExtension.Builder<LaunchCreateResponseExtension, Builder> {}
}

View file

@ -21,5 +21,4 @@ import javax.xml.bind.annotation.XmlRootElement;
* commands.
*/
@XmlRootElement(name = "delete")
public class LaunchDeleteExtension
extends LaunchExtension implements ApplicationIdTargetExtension {}
public class LaunchDeleteExtension extends LaunchExtension {}

View file

@ -16,7 +16,6 @@ package google.registry.model.domain.launch;
import google.registry.model.Buildable.GenericBuilder;
import google.registry.model.ImmutableObject;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;
/**
@ -29,29 +28,17 @@ public abstract class LaunchExtension extends ImmutableObject {
/** The launch phase that this domain application was created in. */
LaunchPhase phase;
/** Application ID of the domain application. */
@XmlElement(name = "applicationID")
String applicationId;
public LaunchPhase getPhase() {
return phase;
}
public String getApplicationId() {
return applicationId;
}
/** A builder for constructing {@link LaunchExtension}. */
public static class Builder<T extends LaunchExtension, B extends Builder<?, ?>>
extends GenericBuilder<T, B> {
public B setPhase(LaunchPhase phase) {
getInstance().phase = phase;
return thisCastToDerived();
}
public B setApplicationId(String applicationId) {
getInstance().applicationId = applicationId;
return thisCastToDerived();
}
}
}

View file

@ -22,8 +22,7 @@ import javax.xml.bind.annotation.XmlRootElement;
* commands.
*/
@XmlRootElement(name = "info")
public class LaunchInfoExtension
extends LaunchExtension implements ApplicationIdTargetExtension {
public class LaunchInfoExtension extends LaunchExtension {
/** Whether or not to include mark information in the response. */
@XmlAttribute

View file

@ -1,56 +0,0 @@
// Copyright 2017 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.launch;
import com.google.common.collect.ImmutableList;
import com.googlecode.objectify.annotation.Embed;
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
import google.registry.model.mark.Mark;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* An XML data object that represents a launch extension that may be present on the response to EPP
* domain application info commands.
*/
@Embed
@XmlRootElement(name = "infData")
@XmlType(propOrder = { "phase", "applicationId", "applicationStatus", "marks"})
public class LaunchInfoResponseExtension extends LaunchExtension implements ResponseExtension {
/** The current status of this application. */
@XmlElement(name = "status")
ApplicationStatus applicationStatus;
/** The marks associated with this application. */
@XmlElement(name = "mark", namespace = "urn:ietf:params:xml:ns:mark-1.0")
List<Mark> marks;
/** Builder for {@link LaunchInfoResponseExtension}. */
public static class Builder
extends LaunchExtension.Builder<LaunchInfoResponseExtension, Builder> {
public Builder setApplicationStatus(ApplicationStatus applicationStatus) {
getInstance().applicationStatus = applicationStatus;
return this;
}
public Builder setMarks(ImmutableList<Mark> marks) {
getInstance().marks = marks;
return this;
}
}
}

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) {

View file

@ -21,5 +21,4 @@ import javax.xml.bind.annotation.XmlRootElement;
* commands.
*/
@XmlRootElement(name = "update")
public class LaunchUpdateExtension
extends LaunchExtension implements ApplicationIdTargetExtension {}
public class LaunchUpdateExtension extends LaunchExtension {}