Remove the unused flags extension

It can always be brought back if we find an actual use case for it, but for now, it shouldn't be in the standard distribution given that it has no users.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143044153
This commit is contained in:
mcilwain 2016-12-27 11:18:24 -08:00 committed by Ben McIlwain
parent be523f7ce2
commit 6fb9858198
57 changed files with 6 additions and 1391 deletions

View file

@ -148,8 +148,7 @@ public class DomainApplication extends DomainBase {
"dsig.xsd",
"smd.xsd",
"launch.xsd",
"allocate.xsd",
"flags.xsd");
"allocate.xsd");
private static final XmlTransformer INPUT_TRANSFORMER =
new XmlTransformer(SCHEMAS, EppInput.class);

View file

@ -1,33 +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.flags;
import google.registry.model.eppinput.EppInput.CommandExtension;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* A flags extension that may be present on domain check commands. The extension will specify a
* map from domain to a set of flags to be applied to any checks performed on that domain. So if
* the client wants to know how much a create would cost on a particular domain with flag X set,
* they can send a check command with a flags extension that associates the domain with flag X.
* See {@FlagsCreateCommandExtension} for more information about the flags extension.
*/
@XmlRootElement(name = "check")
public class FlagsCheckCommandExtension implements CommandExtension {
@XmlElement(name = "domain")
List<FlagsCheckCommandExtensionItem> domains;
}

View file

@ -1,32 +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.flags;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* An single domain item in a domain check command flags extension. Each item associates a single
* domain with one or more flags. This object appears as part of a list contained in {@link
* FlagsCheckCommandExtension}.
*/
@XmlType(propOrder = {"name", "flags"})
public class FlagsCheckCommandExtensionItem {
String name;
@XmlElement(name = "flag")
List<String> flags;
}

View file

@ -1,37 +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.flags;
import google.registry.model.eppinput.EppInput.CommandExtension;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* A flags extension that may be present on domain create commands. The extension specifies one or
* more flag strings. The extension does not dictate the use of any specific flags, but leaves it up
* to the particular TLD-specific logic. Some TLDs have special rules regarding discounts and
* eligibility. Such TLDs can define whatever flags they need to use for interacting with the
* registrar, and pass them using the flags extension.
*/
@XmlRootElement(name = "create")
public class FlagsCreateCommandExtension implements CommandExtension {
@XmlElement(name = "flag")
List<String> flags;
public List<String> getFlags() {
return flags;
}
}

View file

@ -1,32 +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.flags;
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* A flags extension that may be present on domain create responses. The extension specifies one or
* more flag strings. See {@link FlagsCreateResponseExtension} for more details about the flags
* extension. The server may return different flags in the create response than were passed in the
* create command, though often they are likely to be the same.
*/
@XmlRootElement(name = "creData")
public class FlagsCreateResponseExtension implements ResponseExtension {
@XmlElement(name = "flag")
List<String> flags;
}

View file

@ -1,39 +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.flags;
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* A flags extension that may be present on domain info responses. See {@link
* FlagsCreateResponseExtension} for more details about the flags extension. Info commands sent by
* the registrar do not specify the flags extension, but TLDs which use flags to support specific
* functionality can pass them back to the registrar in info responses to indicate the current state
* of a domain.
*/
@XmlRootElement(name = "infData")
public class FlagsInfoResponseExtension implements ResponseExtension {
@XmlElement(name = "flag")
List<String> flags;
public static FlagsInfoResponseExtension create(List<String> flags) {
FlagsInfoResponseExtension extension = new FlagsInfoResponseExtension();
extension.flags = flags;
return extension;
}
}

View file

@ -1,31 +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.flags;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
/**
* A list of flags contained in the add or rem elements of {@link FlagsUpdateCommandExtension} and
* {@link FlagsTransferCommandExtension} commands and {@link FlagsPollResponseExtension} responses.
*/
public class FlagsList {
@XmlElement(name = "flag")
List<String> flags;
public List<String> getFlags() {
return flags;
}
}

View file

@ -1,32 +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.flags;
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* A flags extension that may be present on poll responses. See {@link
* FlagsCreateResponseExtension} for more details about the flags extension. Poll messages can be
* used for TLDs which require flags to support special functionality, to notify registrars about
* changes in the status of domains.
*/
@XmlRootElement(name = "panData")
@XmlType(propOrder = {"add", "rem"})
public class FlagsPollResponseExtension implements ResponseExtension {
FlagsList add;
FlagsList rem;
}

View file

@ -1,41 +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.flags;
import google.registry.model.eppinput.EppInput.CommandExtension;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* A flags extension that may be present on domain transfer commands. See {@link
* FlagsCreateResponseExtension} for more details about the flags extension. For TLDs which require
* flags to support special functionality, some flags may need to be modified as part of the
* transfer process. In such a case, the extension looks the same as it would for an equivalent
* {@link FlagsUpdateCommandExtension} command.
*/
@XmlRootElement(name = "transfer")
@XmlType(propOrder = {"add", "rem"})
public class FlagsTransferCommandExtension implements CommandExtension {
FlagsList add; // list of flags to be added (turned on)
FlagsList rem; // list of flags to be removed (turned off)
public FlagsList getAddFlags() {
return add;
}
public FlagsList getRemoveFlags() {
return rem;
}
}

View file

@ -1,41 +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.flags;
import google.registry.model.eppinput.EppInput.CommandExtension;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* A flags extension that may be present on domain update commands. See {@link
* FlagsCreateResponseExtension} for more details about the flags extension. For TLDs which require
* flags to support special functionality, the registrar can send an update command to change the
* state of flags (as allowed by the TLD's logic). Update responses merely acknowledge the update;
* an update response does not contain a flags extension.
*/
@XmlRootElement(name = "update")
@XmlType(propOrder = {"add", "rem"})
public class FlagsUpdateCommandExtension implements CommandExtension {
FlagsList add; // list of flags to be added (turned on)
FlagsList rem; // list of flags to be removed (turned off)
public FlagsList getAddFlags() {
return add;
}
public FlagsList getRemoveFlags() {
return rem;
}
}

View file

@ -1,27 +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.
@XmlSchema(
namespace = "urn:google:params:xml:ns:flags-0.1",
xmlns = @XmlNs(prefix = "flags", namespaceURI = "urn:google:params:xml:ns:flags-0.1"),
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
package google.registry.model.domain.flags;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;

View file

@ -28,7 +28,6 @@ import google.registry.model.domain.fee11.FeeCheckCommandExtensionV11;
import google.registry.model.domain.fee11.FeeCheckResponseExtensionV11;
import google.registry.model.domain.fee12.FeeCheckCommandExtensionV12;
import google.registry.model.domain.fee12.FeeCheckResponseExtensionV12;
import google.registry.model.domain.flags.FlagsCheckCommandExtension;
import google.registry.model.domain.launch.LaunchCreateExtension;
import google.registry.model.domain.metadata.MetadataExtension;
import google.registry.model.domain.rgp.RgpUpdateExtension;
@ -58,7 +57,6 @@ public class ProtocolDefinition {
FEE_0_6(FeeCheckCommandExtensionV06.class, FeeCheckResponseExtensionV06.class, true),
FEE_0_11(FeeCheckCommandExtensionV11.class, FeeCheckResponseExtensionV11.class, true),
FEE_0_12(FeeCheckCommandExtensionV12.class, FeeCheckResponseExtensionV12.class, true),
FLAGS_0_1(FlagsCheckCommandExtension.class, null, true),
ALLOCATE_1_0(AllocateCreateExtension.class, null, false),
METADATA_1_0(MetadataExtension.class, null, false);

View file

@ -40,10 +40,6 @@ import google.registry.model.domain.fee12.FeeCreateCommandExtensionV12;
import google.registry.model.domain.fee12.FeeRenewCommandExtensionV12;
import google.registry.model.domain.fee12.FeeTransferCommandExtensionV12;
import google.registry.model.domain.fee12.FeeUpdateCommandExtensionV12;
import google.registry.model.domain.flags.FlagsCheckCommandExtension;
import google.registry.model.domain.flags.FlagsCreateCommandExtension;
import google.registry.model.domain.flags.FlagsTransferCommandExtension;
import google.registry.model.domain.flags.FlagsUpdateCommandExtension;
import google.registry.model.domain.launch.LaunchCheckExtension;
import google.registry.model.domain.launch.LaunchCreateExtension;
import google.registry.model.domain.launch.LaunchDeleteExtension;
@ -298,10 +294,6 @@ public class EppInput extends ImmutableObject {
@XmlElementRef(type = FeeTransferCommandExtensionV12.class),
@XmlElementRef(type = FeeUpdateCommandExtensionV12.class),
// other extensions
@XmlElementRef(type = FlagsCheckCommandExtension.class),
@XmlElementRef(type = FlagsCreateCommandExtension.class),
@XmlElementRef(type = FlagsTransferCommandExtension.class),
@XmlElementRef(type = FlagsUpdateCommandExtension.class),
@XmlElementRef(type = LaunchCheckExtension.class),
@XmlElementRef(type = LaunchCreateExtension.class),
@XmlElementRef(type = LaunchDeleteExtension.class),

View file

@ -44,9 +44,6 @@ import google.registry.model.domain.fee12.FeeDeleteResponseExtensionV12;
import google.registry.model.domain.fee12.FeeRenewResponseExtensionV12;
import google.registry.model.domain.fee12.FeeTransferResponseExtensionV12;
import google.registry.model.domain.fee12.FeeUpdateResponseExtensionV12;
import google.registry.model.domain.flags.FlagsCreateResponseExtension;
import google.registry.model.domain.flags.FlagsInfoResponseExtension;
import google.registry.model.domain.flags.FlagsPollResponseExtension;
import google.registry.model.domain.launch.LaunchCheckResponseExtension;
import google.registry.model.domain.launch.LaunchCreateResponseExtension;
import google.registry.model.domain.launch.LaunchInfoResponseExtension;
@ -141,9 +138,6 @@ public class EppResponse extends ImmutableObject implements ResponseOrGreeting {
@XmlElementRef(type = FeeRenewResponseExtensionV12.class),
@XmlElementRef(type = FeeTransferResponseExtensionV12.class),
@XmlElementRef(type = FeeUpdateResponseExtensionV12.class),
@XmlElementRef(type = FlagsCreateResponseExtension.class),
@XmlElementRef(type = FlagsInfoResponseExtension.class),
@XmlElementRef(type = FlagsPollResponseExtension.class),
@XmlElementRef(type = LaunchCheckResponseExtension.class),
@XmlElementRef(type = LaunchCreateResponseExtension.class),
@XmlElementRef(type = LaunchInfoResponseExtension.class),