diff --git a/java/google/registry/flows/EppXmlTransformer.java b/java/google/registry/flows/EppXmlTransformer.java index 8209cf32a..fda260a68 100644 --- a/java/google/registry/flows/EppXmlTransformer.java +++ b/java/google/registry/flows/EppXmlTransformer.java @@ -63,7 +63,8 @@ public class EppXmlTransformer { "dsig.xsd", "smd.xsd", "launch.xsd", - "allocate.xsd"); + "allocate.xsd", + "flags.xsd"); private static final XmlTransformer INPUT_TRANSFORMER = new XmlTransformer(SCHEMAS, EppInput.class); diff --git a/java/google/registry/model/BUILD b/java/google/registry/model/BUILD index 0228ab733..714adc27a 100644 --- a/java/google/registry/model/BUILD +++ b/java/google/registry/model/BUILD @@ -16,6 +16,7 @@ FIELD_EXPOSERS = [ "domain/fee06/FieldExposer.java", "domain/fee11/FieldExposer.java", "domain/fee12/FieldExposer.java", + "domain/flags/FieldExposer.java", "domain/launch/FieldExposer.java", "domain/rgp/FieldExposer.java", "domain/secdns/FieldExposer.java", diff --git a/java/google/registry/model/domain/flags/FlagsCheckCommandExtension.java b/java/google/registry/model/domain/flags/FlagsCheckCommandExtension.java new file mode 100644 index 000000000..115be34d1 --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsCheckCommandExtension.java @@ -0,0 +1,33 @@ +// Copyright 2016 The Domain Registry 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 domains; +} diff --git a/java/google/registry/model/domain/flags/FlagsCheckCommandExtensionItem.java b/java/google/registry/model/domain/flags/FlagsCheckCommandExtensionItem.java new file mode 100644 index 000000000..8e26444d2 --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsCheckCommandExtensionItem.java @@ -0,0 +1,32 @@ +// Copyright 2016 The Domain Registry 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 flags; +} diff --git a/java/google/registry/model/domain/flags/FlagsCreateCommandExtension.java b/java/google/registry/model/domain/flags/FlagsCreateCommandExtension.java new file mode 100644 index 000000000..fadf94107 --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsCreateCommandExtension.java @@ -0,0 +1,33 @@ +// Copyright 2016 The Domain Registry 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 flags; +} diff --git a/java/google/registry/model/domain/flags/FlagsCreateResponseExtension.java b/java/google/registry/model/domain/flags/FlagsCreateResponseExtension.java new file mode 100644 index 000000000..5882979cc --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsCreateResponseExtension.java @@ -0,0 +1,32 @@ +// Copyright 2016 The Domain Registry 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 flags; +} diff --git a/java/google/registry/model/domain/flags/FlagsInfoResponseExtension.java b/java/google/registry/model/domain/flags/FlagsInfoResponseExtension.java new file mode 100644 index 000000000..82b5b5b42 --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsInfoResponseExtension.java @@ -0,0 +1,33 @@ +// Copyright 2016 The Domain Registry 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 flags; +} diff --git a/java/google/registry/model/domain/flags/FlagsList.java b/java/google/registry/model/domain/flags/FlagsList.java new file mode 100644 index 000000000..cdb3020e5 --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsList.java @@ -0,0 +1,27 @@ +// Copyright 2016 The Domain Registry 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 flags; +} diff --git a/java/google/registry/model/domain/flags/FlagsPollResponseExtension.java b/java/google/registry/model/domain/flags/FlagsPollResponseExtension.java new file mode 100644 index 000000000..dc43d7386 --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsPollResponseExtension.java @@ -0,0 +1,32 @@ +// Copyright 2016 The Domain Registry 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; +} diff --git a/java/google/registry/model/domain/flags/FlagsTransferCommandExtension.java b/java/google/registry/model/domain/flags/FlagsTransferCommandExtension.java new file mode 100644 index 000000000..c55ed796a --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsTransferCommandExtension.java @@ -0,0 +1,33 @@ +// Copyright 2016 The Domain Registry 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) +} diff --git a/java/google/registry/model/domain/flags/FlagsUpdateCommandExtension.java b/java/google/registry/model/domain/flags/FlagsUpdateCommandExtension.java new file mode 100644 index 000000000..a513d0f52 --- /dev/null +++ b/java/google/registry/model/domain/flags/FlagsUpdateCommandExtension.java @@ -0,0 +1,33 @@ +// Copyright 2016 The Domain Registry 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) +} diff --git a/java/google/registry/model/domain/flags/package-info.java b/java/google/registry/model/domain/flags/package-info.java new file mode 100644 index 000000000..328b8eaca --- /dev/null +++ b/java/google/registry/model/domain/flags/package-info.java @@ -0,0 +1,26 @@ +// Copyright 2016 The Domain Registry 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; diff --git a/java/google/registry/model/eppcommon/ProtocolDefinition.java b/java/google/registry/model/eppcommon/ProtocolDefinition.java index 77d3ebe2f..49c1861a5 100644 --- a/java/google/registry/model/eppcommon/ProtocolDefinition.java +++ b/java/google/registry/model/eppcommon/ProtocolDefinition.java @@ -28,6 +28,7 @@ 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; @@ -57,6 +58,7 @@ 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); diff --git a/java/google/registry/model/eppinput/EppInput.java b/java/google/registry/model/eppinput/EppInput.java index 3552c9bfd..16a660aab 100644 --- a/java/google/registry/model/eppinput/EppInput.java +++ b/java/google/registry/model/eppinput/EppInput.java @@ -41,6 +41,10 @@ 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; @@ -323,6 +327,10 @@ 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), diff --git a/java/google/registry/model/eppoutput/EppResponse.java b/java/google/registry/model/eppoutput/EppResponse.java index ec95facf8..b15e3aabc 100644 --- a/java/google/registry/model/eppoutput/EppResponse.java +++ b/java/google/registry/model/eppoutput/EppResponse.java @@ -41,6 +41,9 @@ 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; @@ -152,6 +155,9 @@ 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), diff --git a/java/google/registry/xjc/bindings.xjb b/java/google/registry/xjc/bindings.xjb index c46406180..9e75950b0 100644 --- a/java/google/registry/xjc/bindings.xjb +++ b/java/google/registry/xjc/bindings.xjb @@ -51,6 +51,15 @@ + + + + + + + + + diff --git a/java/google/registry/xml/xsd/flags.xsd b/java/google/registry/xml/xsd/flags.xsd new file mode 100644 index 000000000..6cc67312d --- /dev/null +++ b/java/google/registry/xml/xsd/flags.xsd @@ -0,0 +1,73 @@ + + + + + + + + Extensible Provisioning Protocol v1.0 domain name extension schema for custom flags. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/javatests/google/registry/flows/session/testdata/greeting_crr.xml b/javatests/google/registry/flows/session/testdata/greeting_crr.xml index 874cfc0d3..4c469f415 100644 --- a/javatests/google/registry/flows/session/testdata/greeting_crr.xml +++ b/javatests/google/registry/flows/session/testdata/greeting_crr.xml @@ -15,6 +15,7 @@ urn:ietf:params:xml:ns:fee-0.6 urn:ietf:params:xml:ns:fee-0.11 urn:ietf:params:xml:ns:fee-0.12 + urn:google:params:xml:ns:flags-0.1 diff --git a/javatests/google/registry/flows/testdata/greeting_crr.xml b/javatests/google/registry/flows/testdata/greeting_crr.xml index 874cfc0d3..4c469f415 100644 --- a/javatests/google/registry/flows/testdata/greeting_crr.xml +++ b/javatests/google/registry/flows/testdata/greeting_crr.xml @@ -15,6 +15,7 @@ urn:ietf:params:xml:ns:fee-0.6 urn:ietf:params:xml:ns:fee-0.11 urn:ietf:params:xml:ns:fee-0.12 + urn:google:params:xml:ns:flags-0.1 diff --git a/javatests/google/registry/model/domain/DomainCommandTest.java b/javatests/google/registry/model/domain/DomainCommandTest.java index 3c49367cf..c3fcf3695 100644 --- a/javatests/google/registry/model/domain/DomainCommandTest.java +++ b/javatests/google/registry/model/domain/DomainCommandTest.java @@ -59,6 +59,11 @@ public class DomainCommandTest extends ResourceCommandTestCase { doXmlRoundtripTest("domain_create_fee.xml"); } + @Test + public void testCreate_flags() throws Exception { + doXmlRoundtripTest("domain_create_flags.xml"); + } + @Test public void testDelete() throws Exception { doXmlRoundtripTest("domain_delete.xml"); @@ -74,6 +79,11 @@ public class DomainCommandTest extends ResourceCommandTestCase { doXmlRoundtripTest("domain_update_fee.xml"); } + @Test + public void testUpdate_flags() throws Exception { + doXmlRoundtripTest("domain_update_flags.xml"); + } + @Test public void testInfo() throws Exception { doXmlRoundtripTest("domain_info.xml"); @@ -119,6 +129,11 @@ public class DomainCommandTest extends ResourceCommandTestCase { doXmlRoundtripTest("domain_check_fee.xml"); } + @Test + public void testCheck_flags() throws Exception { + doXmlRoundtripTest("domain_check_flags.xml"); + } + @Test public void testTransferApprove() throws Exception { doXmlRoundtripTest("domain_transfer_approve.xml"); @@ -149,6 +164,11 @@ public class DomainCommandTest extends ResourceCommandTestCase { doXmlRoundtripTest("domain_transfer_request_fee.xml"); } + @Test + public void testTransferRequest_flags() throws Exception { + doXmlRoundtripTest("domain_transfer_request_flags.xml"); + } + @Test public void testRenew() throws Exception { doXmlRoundtripTest("domain_renew.xml"); diff --git a/javatests/google/registry/model/domain/testdata/domain_check_flags.xml b/javatests/google/registry/model/domain/testdata/domain_check_flags.xml new file mode 100644 index 000000000..9a507f5e4 --- /dev/null +++ b/javatests/google/registry/model/domain/testdata/domain_check_flags.xml @@ -0,0 +1,26 @@ + + + + + example.com + example.net + example.org + + + + + + example.com + one + + + example.net + two + three + + + + ABC-12345 + + diff --git a/javatests/google/registry/model/domain/testdata/domain_create_flags.xml b/javatests/google/registry/model/domain/testdata/domain_create_flags.xml new file mode 100644 index 000000000..a4459d103 --- /dev/null +++ b/javatests/google/registry/model/domain/testdata/domain_create_flags.xml @@ -0,0 +1,29 @@ + + + + + + example.com + 2 + + ns1.example.net + ns2.example.net + + jd1234 + sh8013 + sh8013 + + 2fooBAR + + + + + + one + two + + + ABC-12345 + + diff --git a/javatests/google/registry/model/domain/testdata/domain_transfer_request_flags.xml b/javatests/google/registry/model/domain/testdata/domain_transfer_request_flags.xml new file mode 100644 index 000000000..464bce1aa --- /dev/null +++ b/javatests/google/registry/model/domain/testdata/domain_transfer_request_flags.xml @@ -0,0 +1,26 @@ + + + + + example.com + 1 + + 2fooBAR + + + + + + + addFlag + + + remFlag1 + remFlag2 + + + + ABC-12345 + + diff --git a/javatests/google/registry/model/domain/testdata/domain_update_flags.xml b/javatests/google/registry/model/domain/testdata/domain_update_flags.xml new file mode 100644 index 000000000..ca6c23f8c --- /dev/null +++ b/javatests/google/registry/model/domain/testdata/domain_update_flags.xml @@ -0,0 +1,42 @@ + + + + + example.com + + + ns2.example.com + + mak21 + + + + + ns1.example.com + + sh8013 + + + + sh8013 + + 2BARfoo + + + + + + + + addFlag + + + remFlag1 + remFlag2 + + + + ABC-12345 + +