mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Add XML support for new Flags EPP extension
For the .app discounting logic, we need a new extension which will let registrars set, clear and query custom flags on a domain. Hopefully this will be reusable for other custom TLDs later. This CL adds the XSD, the associated classes for marshalling and unmarshalling, and some marshalling tests, and links the classes into the system-wide extension lists. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=128178999
This commit is contained in:
parent
9c28534b64
commit
64bcad3f21
24 changed files with 560 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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<FlagsCheckCommandExtensionItem> domains;
|
||||
}
|
|
@ -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<String> flags;
|
||||
}
|
|
@ -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<String> flags;
|
||||
}
|
|
@ -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<String> flags;
|
||||
}
|
|
@ -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<String> flags;
|
||||
}
|
27
java/google/registry/model/domain/flags/FlagsList.java
Normal file
27
java/google/registry/model/domain/flags/FlagsList.java
Normal file
|
@ -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<String> flags;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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)
|
||||
}
|
|
@ -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)
|
||||
}
|
26
java/google/registry/model/domain/flags/package-info.java
Normal file
26
java/google/registry/model/domain/flags/package-info.java
Normal file
|
@ -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;
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -51,6 +51,15 @@
|
|||
</nameXmlTransform>
|
||||
</schemaBindings>
|
||||
</bindings>
|
||||
<bindings schemaLocation="flags.xsd" node="/xsd:schema">
|
||||
<schemaBindings>
|
||||
<package name="google.registry.xjc.flags"/>
|
||||
<nameXmlTransform>
|
||||
<elementName prefix="XjcDomain"/>
|
||||
<typeName prefix="XjcDomain"/>
|
||||
</nameXmlTransform>
|
||||
</schemaBindings>
|
||||
</bindings>
|
||||
<bindings schemaLocation="host.xsd" node="/xsd:schema">
|
||||
<schemaBindings>
|
||||
<package name="google.registry.xjc.host"/>
|
||||
|
|
73
java/google/registry/xml/xsd/flags.xsd
Normal file
73
java/google/registry/xml/xsd/flags.xsd
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:flags="urn:google:params:xml:ns:flags-0.1"
|
||||
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
|
||||
targetNamespace="urn:google:params:xml:ns:flags-0.1"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" />
|
||||
|
||||
<annotation>
|
||||
<documentation>
|
||||
Extensible Provisioning Protocol v1.0 domain name extension schema for custom flags.
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<!--
|
||||
List of flags
|
||||
-->
|
||||
<complexType name="flagListType">
|
||||
<sequence>
|
||||
<element name="flag" type="eppcom:minTokenType"
|
||||
minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<!--
|
||||
<check>: client command contains list of objects and their associated flags;
|
||||
server response unchanged
|
||||
-->
|
||||
<element name="check" type="flags:checkType" />
|
||||
|
||||
<complexType name="checkType">
|
||||
<sequence>
|
||||
<element name="domain" type="flags:domainCheckType"
|
||||
maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="domainCheckType">
|
||||
<sequence>
|
||||
<element name="name" type="eppcom:labelType" />
|
||||
<element name="flag" type="eppcom:minTokenType"
|
||||
minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<!--
|
||||
<info>: client command unchanged, server response contains list of flags
|
||||
-->
|
||||
<element name="infData" type="flags:flagListType" />
|
||||
|
||||
<!--
|
||||
<create>: client command and server response contain lists of flags
|
||||
-->
|
||||
<element name="create" type="flags:flagListType" />
|
||||
<element name="creData" type="flags:flagListType" />
|
||||
|
||||
<!--
|
||||
<update> and <transfer>: client command contains list of flags to add or
|
||||
remove; server response unchanged
|
||||
<poll>: client command unchanged; server response may list flag state changes
|
||||
-->
|
||||
<element name="transfer" type="flags:flagChangesType" />
|
||||
<element name="update" type="flags:flagChangesType" />
|
||||
<element name="panData" type="flags:flagChangesType" />
|
||||
|
||||
<complexType name="flagChangesType">
|
||||
<sequence>
|
||||
<element name="add" type="flags:flagListType" minOccurs="0"/>
|
||||
<element name="rem" type="flags:flagListType" minOccurs="0"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</schema>
|
|
@ -15,6 +15,7 @@
|
|||
<extURI>urn:ietf:params:xml:ns:fee-0.6</extURI>
|
||||
<extURI>urn:ietf:params:xml:ns:fee-0.11</extURI>
|
||||
<extURI>urn:ietf:params:xml:ns:fee-0.12</extURI>
|
||||
<extURI>urn:google:params:xml:ns:flags-0.1</extURI>
|
||||
</svcExtension>
|
||||
</svcMenu>
|
||||
<dcp>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<extURI>urn:ietf:params:xml:ns:fee-0.6</extURI>
|
||||
<extURI>urn:ietf:params:xml:ns:fee-0.11</extURI>
|
||||
<extURI>urn:ietf:params:xml:ns:fee-0.12</extURI>
|
||||
<extURI>urn:google:params:xml:ns:flags-0.1</extURI>
|
||||
</svcExtension>
|
||||
</svcMenu>
|
||||
<dcp>
|
||||
|
|
|
@ -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");
|
||||
|
|
26
javatests/google/registry/model/domain/testdata/domain_check_flags.xml
vendored
Normal file
26
javatests/google/registry/model/domain/testdata/domain_check_flags.xml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<check>
|
||||
<domain:check
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.com</domain:name>
|
||||
<domain:name>example.net</domain:name>
|
||||
<domain:name>example.org</domain:name>
|
||||
</domain:check>
|
||||
</check>
|
||||
<extension>
|
||||
<flags:check xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:domain>
|
||||
<flags:name>example.com</flags:name>
|
||||
<flags:flag>one</flags:flag>
|
||||
</flags:domain>
|
||||
<flags:domain>
|
||||
<flags:name>example.net</flags:name>
|
||||
<flags:flag>two</flags:flag>
|
||||
<flags:flag>three</flags:flag>
|
||||
</flags:domain>
|
||||
</flags:check>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
29
javatests/google/registry/model/domain/testdata/domain_create_flags.xml
vendored
Normal file
29
javatests/google/registry/model/domain/testdata/domain_create_flags.xml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<create>
|
||||
<domain:create
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.com</domain:name>
|
||||
<domain:period unit="y">2</domain:period>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.net</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<extension>
|
||||
<flags:create xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:flag>one</flags:flag>
|
||||
<flags:flag>two</flags:flag>
|
||||
</flags:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
26
javatests/google/registry/model/domain/testdata/domain_transfer_request_flags.xml
vendored
Normal file
26
javatests/google/registry/model/domain/testdata/domain_transfer_request_flags.xml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<transfer op="request">
|
||||
<domain:transfer
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.com</domain:name>
|
||||
<domain:period unit="y">1</domain:period>
|
||||
<domain:authInfo>
|
||||
<domain:pw roid="JD1234-REP">2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:transfer>
|
||||
</transfer>
|
||||
<extension>
|
||||
<flags:transfer xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:add>
|
||||
<flags:flag>addFlag</flags:flag>
|
||||
</flags:add>
|
||||
<flags:rem>
|
||||
<flags:flag>remFlag1</flags:flag>
|
||||
<flags:flag>remFlag2</flags:flag>
|
||||
</flags:rem>
|
||||
</flags:transfer>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
42
javatests/google/registry/model/domain/testdata/domain_update_flags.xml
vendored
Normal file
42
javatests/google/registry/model/domain/testdata/domain_update_flags.xml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<update>
|
||||
<domain:update
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.com</domain:name>
|
||||
<domain:add>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns2.example.com</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:contact type="tech">mak21</domain:contact>
|
||||
<domain:status s="clientHold"/>
|
||||
</domain:add>
|
||||
<domain:rem>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.com</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:status s="clientUpdateProhibited"/>
|
||||
</domain:rem>
|
||||
<domain:chg>
|
||||
<domain:registrant>sh8013</domain:registrant>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2BARfoo</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:chg>
|
||||
</domain:update>
|
||||
</update>
|
||||
<extension>
|
||||
<flags:update xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:add>
|
||||
<flags:flag>addFlag</flags:flag>
|
||||
</flags:add>
|
||||
<flags:rem>
|
||||
<flags:flag>remFlag1</flags:flag>
|
||||
<flags:flag>remFlag2</flags:flag>
|
||||
</flags:rem>
|
||||
</flags:update>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
Loading…
Add table
Add a link
Reference in a new issue