mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
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:
parent
be523f7ce2
commit
6fb9858198
57 changed files with 6 additions and 1391 deletions
|
@ -63,8 +63,7 @@ public class EppXmlTransformer {
|
|||
"dsig.xsd",
|
||||
"smd.xsd",
|
||||
"launch.xsd",
|
||||
"allocate.xsd",
|
||||
"flags.xsd");
|
||||
"allocate.xsd");
|
||||
|
||||
private static final XmlTransformer INPUT_TRANSFORMER =
|
||||
new XmlTransformer(SCHEMAS, EppInput.class);
|
||||
|
|
|
@ -63,7 +63,6 @@ import google.registry.model.domain.Period;
|
|||
import google.registry.model.domain.allocate.AllocateCreateExtension;
|
||||
import google.registry.model.domain.fee.FeeCreateCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtension;
|
||||
import google.registry.model.domain.flags.FlagsCreateCommandExtension;
|
||||
import google.registry.model.domain.launch.ApplicationStatus;
|
||||
import google.registry.model.domain.launch.LaunchInfoResponseExtension;
|
||||
import google.registry.model.domain.metadata.MetadataExtension;
|
||||
|
@ -119,7 +118,6 @@ public class DomainAllocateFlow implements TransactionalFlow {
|
|||
extensionManager.register(
|
||||
FeeCreateCommandExtension.class,
|
||||
SecDnsCreateExtension.class,
|
||||
FlagsCreateCommandExtension.class,
|
||||
MetadataExtension.class,
|
||||
AllocateCreateExtension.class);
|
||||
extensionManager.validate();
|
||||
|
|
|
@ -70,7 +70,6 @@ import google.registry.model.domain.DomainResource;
|
|||
import google.registry.model.domain.Period;
|
||||
import google.registry.model.domain.fee.FeeCreateCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.flags.FlagsCreateCommandExtension;
|
||||
import google.registry.model.domain.launch.ApplicationStatus;
|
||||
import google.registry.model.domain.launch.LaunchCreateExtension;
|
||||
import google.registry.model.domain.launch.LaunchCreateResponseExtension;
|
||||
|
@ -180,7 +179,6 @@ public final class DomainApplicationCreateFlow implements TransactionalFlow {
|
|||
extensionManager.register(
|
||||
FeeCreateCommandExtension.class,
|
||||
SecDnsCreateExtension.class,
|
||||
FlagsCreateCommandExtension.class,
|
||||
MetadataExtension.class,
|
||||
LaunchCreateExtension.class);
|
||||
customLogic.beforeValidation();
|
||||
|
|
|
@ -61,7 +61,6 @@ import google.registry.model.domain.DomainCommand.Update;
|
|||
import google.registry.model.domain.DomainCommand.Update.AddRemove;
|
||||
import google.registry.model.domain.DomainCommand.Update.Change;
|
||||
import google.registry.model.domain.fee.FeeUpdateCommandExtension;
|
||||
import google.registry.model.domain.flags.FlagsUpdateCommandExtension;
|
||||
import google.registry.model.domain.launch.ApplicationStatus;
|
||||
import google.registry.model.domain.launch.LaunchUpdateExtension;
|
||||
import google.registry.model.domain.metadata.MetadataExtension;
|
||||
|
@ -144,8 +143,7 @@ public class DomainApplicationUpdateFlow implements TransactionalFlow {
|
|||
FeeUpdateCommandExtension.class,
|
||||
LaunchUpdateExtension.class,
|
||||
MetadataExtension.class,
|
||||
SecDnsUpdateExtension.class,
|
||||
FlagsUpdateCommandExtension.class);
|
||||
SecDnsUpdateExtension.class);
|
||||
extensionManager.validate();
|
||||
validateClientIsLoggedIn(clientId);
|
||||
DateTime now = ofy().getTransactionTime();
|
||||
|
|
|
@ -74,7 +74,6 @@ import google.registry.model.domain.GracePeriod;
|
|||
import google.registry.model.domain.Period;
|
||||
import google.registry.model.domain.fee.FeeCreateCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtension;
|
||||
import google.registry.model.domain.flags.FlagsCreateCommandExtension;
|
||||
import google.registry.model.domain.launch.LaunchCreateExtension;
|
||||
import google.registry.model.domain.metadata.MetadataExtension;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
|
@ -174,7 +173,6 @@ public class DomainCreateFlow implements TransactionalFlow {
|
|||
extensionManager.register(
|
||||
FeeCreateCommandExtension.class,
|
||||
SecDnsCreateExtension.class,
|
||||
FlagsCreateCommandExtension.class,
|
||||
MetadataExtension.class,
|
||||
LaunchCreateExtension.class);
|
||||
customLogic.beforeValidation();
|
||||
|
|
|
@ -54,7 +54,6 @@ import google.registry.model.domain.DomainResource;
|
|||
import google.registry.model.domain.Period;
|
||||
import google.registry.model.domain.fee.FeeTransferCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtension;
|
||||
import google.registry.model.domain.flags.FlagsTransferCommandExtension;
|
||||
import google.registry.model.domain.metadata.MetadataExtension;
|
||||
import google.registry.model.eppcommon.AuthInfo;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
|
@ -129,7 +128,6 @@ public final class DomainTransferRequestFlow implements TransactionalFlow {
|
|||
public final EppResponse run() throws EppException {
|
||||
extensionManager.register(
|
||||
FeeTransferCommandExtension.class,
|
||||
FlagsTransferCommandExtension.class,
|
||||
MetadataExtension.class);
|
||||
extensionManager.validate();
|
||||
validateClientIsLoggedIn(gainingClientId);
|
||||
|
|
|
@ -66,7 +66,6 @@ import google.registry.model.domain.DomainResource;
|
|||
import google.registry.model.domain.GracePeriod;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeUpdateCommandExtension;
|
||||
import google.registry.model.domain.flags.FlagsUpdateCommandExtension;
|
||||
import google.registry.model.domain.metadata.MetadataExtension;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.domain.secdns.SecDnsUpdateExtension;
|
||||
|
@ -151,7 +150,6 @@ public final class DomainUpdateFlow implements TransactionalFlow {
|
|||
public EppResponse run() throws EppException {
|
||||
extensionManager.register(
|
||||
FeeUpdateCommandExtension.class,
|
||||
FlagsUpdateCommandExtension.class,
|
||||
MetadataExtension.class,
|
||||
SecDnsUpdateExtension.class);
|
||||
customLogic.beforeValidation();
|
||||
|
|
|
@ -1,24 +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.flows.domain.flags;
|
||||
|
||||
import google.registry.flows.EppException.StatusProhibitsOperationException;
|
||||
|
||||
/** Extension flag is not currently valid for this domain. */
|
||||
public class ExtensionFlagDomainPolicyErrorException extends StatusProhibitsOperationException {
|
||||
public ExtensionFlagDomainPolicyErrorException(String flag) {
|
||||
super(String.format("Extension flag %s is not valid for this domain", flag));
|
||||
}
|
||||
}
|
|
@ -1,28 +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.flows.domain.flags;
|
||||
|
||||
import google.registry.flows.EppException.RequiredParameterMissingException;
|
||||
|
||||
/** Required extension flag missing. */
|
||||
public class ExtensionFlagMissingException extends RequiredParameterMissingException {
|
||||
public ExtensionFlagMissingException(String flag) {
|
||||
super(String.format("Flag %s must be specified", flag));
|
||||
}
|
||||
|
||||
public ExtensionFlagMissingException(String flag1, String flag2) {
|
||||
super(String.format("Either %s or %s must be specified", flag1, flag2));
|
||||
}
|
||||
}
|
|
@ -1,24 +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.flows.domain.flags;
|
||||
|
||||
import google.registry.flows.EppException.ParameterValuePolicyErrorException;
|
||||
|
||||
/** Extension flag is not currently valid for this registrar. */
|
||||
public class ExtensionFlagRegistrarPolicyErrorException extends ParameterValuePolicyErrorException {
|
||||
public ExtensionFlagRegistrarPolicyErrorException(String flag) {
|
||||
super(String.format("Extension flag %s is not valid for this registrar", flag));
|
||||
}
|
||||
}
|
|
@ -1,24 +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.flows.domain.flags;
|
||||
|
||||
import google.registry.flows.EppException.StatusProhibitsOperationException;
|
||||
|
||||
/** Extension flag cannot currently be set for this domain. */
|
||||
public class ExtensionFlagSetDomainPolicyErrorException extends StatusProhibitsOperationException {
|
||||
public ExtensionFlagSetDomainPolicyErrorException(String flag) {
|
||||
super(String.format("Extension flag %s cannot be set for this domain", flag));
|
||||
}
|
||||
}
|
|
@ -1,24 +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.flows.domain.flags;
|
||||
|
||||
import google.registry.flows.EppException.ParameterValueRangeErrorException;
|
||||
|
||||
/** Extension flag is not valid. */
|
||||
public class InvalidExtensionFlagException extends ParameterValueRangeErrorException {
|
||||
public InvalidExtensionFlagException(String flag) {
|
||||
super(String.format("Extension flag %s is not defined", flag));
|
||||
}
|
||||
}
|
|
@ -1,24 +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.flows.domain.flags;
|
||||
|
||||
import google.registry.flows.EppException.ParameterValuePolicyErrorException;
|
||||
|
||||
/** Specified extension flags are mutually exclusive. */
|
||||
public class MutuallyExclusiveExtensionFlagsException extends ParameterValuePolicyErrorException {
|
||||
public MutuallyExclusiveExtensionFlagsException(String flag1, String flag2) {
|
||||
super(String.format("Extension flags %s and %s are mutually exclusive", flag1, flag2));
|
||||
}
|
||||
}
|
|
@ -1,24 +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.flows.domain.flags;
|
||||
|
||||
import google.registry.flows.EppException.ParameterValuePolicyErrorException;
|
||||
|
||||
/** Only client flags can be updated. */
|
||||
public class NonClientFlagException extends ParameterValuePolicyErrorException {
|
||||
public NonClientFlagException() {
|
||||
super("Non-client flags cannot be added or removed");
|
||||
}
|
||||
}
|
|
@ -1,24 +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.flows.domain.flags;
|
||||
|
||||
import google.registry.flows.EppException.ParameterValuePolicyErrorException;
|
||||
|
||||
/** The same flag was specified in both add and remove lists. */
|
||||
public class SameFlagAddedAndRemovedException extends ParameterValuePolicyErrorException {
|
||||
public SameFlagAddedAndRemovedException() {
|
||||
super("An extension flag cannot be both added and removed in the same command");
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -51,15 +51,6 @@
|
|||
</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"/>
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
<?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>
|
|
@ -25,16 +25,4 @@ public class TestCustomLogicFactory extends CustomLogicFactory {
|
|||
EppInput eppInput, SessionMetadata sessionMetadata) {
|
||||
return new TestDomainPricingCustomLogic(eppInput, sessionMetadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainCreateFlowCustomLogic forDomainCreateFlow(
|
||||
EppInput eppInput, SessionMetadata sessionMetadata) {
|
||||
return new TestDomainCreateFlowCustomLogic(eppInput, sessionMetadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainApplicationCreateFlowCustomLogic forDomainApplicationCreateFlow(
|
||||
EppInput eppInput, SessionMetadata sessionMetadata) {
|
||||
return new TestDomainApplicationCreateFlowCustomLogic(eppInput, sessionMetadata);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,63 +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.flows.custom;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import google.registry.flows.SessionMetadata;
|
||||
import google.registry.flows.domain.DomainApplicationCreateFlow;
|
||||
import google.registry.model.domain.flags.FlagsCreateCommandExtension;
|
||||
import google.registry.model.eppinput.EppInput;
|
||||
import google.registry.model.eppoutput.CreateData.DomainCreateData;
|
||||
|
||||
/** A class to customize {@link DomainApplicationCreateFlow} for testing. */
|
||||
public class TestDomainApplicationCreateFlowCustomLogic
|
||||
extends DomainApplicationCreateFlowCustomLogic {
|
||||
|
||||
protected TestDomainApplicationCreateFlowCustomLogic(
|
||||
EppInput eppInput, SessionMetadata sessionMetadata) {
|
||||
super(eppInput, sessionMetadata);
|
||||
}
|
||||
|
||||
private String getTld() {
|
||||
return InternetDomainName.from(getEppInput().getTargetIds().get(0)).parent().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeforeResponseReturnData beforeResponse(BeforeResponseParameters parameters) {
|
||||
if (getTld().equals("flags")) {
|
||||
String flagsPrefix =
|
||||
Joiner.on('-')
|
||||
.join(getEppInput().getSingleExtension(FlagsCreateCommandExtension.class).getFlags());
|
||||
|
||||
DomainCreateData resData = (DomainCreateData) parameters.resData();
|
||||
resData =
|
||||
DomainCreateData.create(
|
||||
Joiner.on('-').join(flagsPrefix, resData.name()),
|
||||
resData.creationDate(),
|
||||
resData.expirationDate());
|
||||
|
||||
return BeforeResponseReturnData.newBuilder()
|
||||
.setResData(resData)
|
||||
.setResponseExtensions(parameters.responseExtensions())
|
||||
.build();
|
||||
} else {
|
||||
return BeforeResponseReturnData.newBuilder()
|
||||
.setResData(parameters.resData())
|
||||
.setResponseExtensions(parameters.responseExtensions())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,61 +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.flows.custom;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import google.registry.flows.SessionMetadata;
|
||||
import google.registry.flows.domain.DomainCreateFlow;
|
||||
import google.registry.model.domain.flags.FlagsCreateCommandExtension;
|
||||
import google.registry.model.eppinput.EppInput;
|
||||
import google.registry.model.eppoutput.CreateData.DomainCreateData;
|
||||
|
||||
/** A class to customize {@link DomainCreateFlow} for testing. */
|
||||
public class TestDomainCreateFlowCustomLogic extends DomainCreateFlowCustomLogic {
|
||||
|
||||
protected TestDomainCreateFlowCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) {
|
||||
super(eppInput, sessionMetadata);
|
||||
}
|
||||
|
||||
private String getTld() {
|
||||
return InternetDomainName.from(getEppInput().getTargetIds().get(0)).parent().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeforeResponseReturnData beforeResponse(BeforeResponseParameters parameters) {
|
||||
if (getTld().equals("flags")) {
|
||||
String flagsPrefix =
|
||||
Joiner.on('-')
|
||||
.join(getEppInput().getSingleExtension(FlagsCreateCommandExtension.class).getFlags());
|
||||
|
||||
DomainCreateData resData = (DomainCreateData) parameters.resData();
|
||||
resData =
|
||||
DomainCreateData.create(
|
||||
Joiner.on('-').join(flagsPrefix, resData.name()),
|
||||
resData.creationDate(),
|
||||
resData.expirationDate());
|
||||
|
||||
return BeforeResponseReturnData.newBuilder()
|
||||
.setResData(resData)
|
||||
.setResponseExtensions(parameters.responseExtensions())
|
||||
.build();
|
||||
} else {
|
||||
return BeforeResponseReturnData.newBuilder()
|
||||
.setResData(parameters.resData())
|
||||
.setResponseExtensions(parameters.responseExtensions())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,24 +14,16 @@
|
|||
|
||||
package google.registry.flows.custom;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.SessionMetadata;
|
||||
import google.registry.flows.domain.DomainPricingLogic;
|
||||
import google.registry.flows.domain.FeesAndCredits;
|
||||
import google.registry.model.domain.fee.BaseFee;
|
||||
import google.registry.model.domain.fee.BaseFee.FeeType;
|
||||
import google.registry.model.domain.fee.Credit;
|
||||
import google.registry.model.domain.fee.Fee;
|
||||
import google.registry.model.eppinput.EppInput;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
import org.joda.money.Money;
|
||||
|
||||
|
@ -44,27 +36,6 @@ public class TestDomainPricingCustomLogic extends DomainPricingCustomLogic {
|
|||
super(eppInput, sessionMetadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeesAndCredits customizeCreatePrice(CreatePriceParameters priceParameters)
|
||||
throws EppException {
|
||||
InternetDomainName domainName = priceParameters.domainName();
|
||||
if (domainName.parent().toString().equals("flags")) {
|
||||
FeesAndCredits feesAndCredits = priceParameters.feesAndCredits();
|
||||
FeesAndCredits.Builder feesBuilder =
|
||||
new FeesAndCredits.Builder().setCurrency(feesAndCredits.getCurrency());
|
||||
ImmutableList.Builder<BaseFee> baseFeeBuilder = new ImmutableList.Builder<>();
|
||||
baseFeeBuilder.addAll(feesAndCredits.getCredits());
|
||||
for (BaseFee fee : feesAndCredits.getFees()) {
|
||||
baseFeeBuilder.add(
|
||||
fee.getType() == FeeType.CREATE ? domainNameToFeeOrCredit(domainName) : fee);
|
||||
feesBuilder.setFeeExtensionRequired(true);
|
||||
}
|
||||
return feesBuilder.setFeesAndCredits(baseFeeBuilder.build()).build();
|
||||
} else {
|
||||
return priceParameters.feesAndCredits();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeesAndCredits customizeApplicationUpdatePrice(
|
||||
ApplicationUpdatePriceParameters priceParameters) throws EppException {
|
||||
|
@ -110,25 +81,4 @@ public class TestDomainPricingCustomLogic extends DomainPricingCustomLogic {
|
|||
.addFeeOrCredit(customFee)
|
||||
.build();
|
||||
}
|
||||
|
||||
private static BaseFee domainNameToFeeOrCredit(InternetDomainName domainName) {
|
||||
// The second-level domain should be of the form "description-price", where description is the
|
||||
// description string of the fee or credit, and price is the price (credit if negative, fee
|
||||
// otherwise). To make sure this is a valid domain name, don't use any spaces, and limit prices
|
||||
// to integers. Don't use a two-character description for credits, since it is illegal to have
|
||||
// both the third and fourth characters of a domain name label be hyphens.
|
||||
List<String> components =
|
||||
Splitter.on('-')
|
||||
.limit(2)
|
||||
.splitToList(Iterables.getFirst(Splitter.on('.').split(domainName.toString()), ""));
|
||||
checkArgument(components.size() == 2, "Domain name must be of the form description-price.tld");
|
||||
int price = Integer.parseInt(components.get(1));
|
||||
if (price < 0) {
|
||||
return Credit.create(
|
||||
new BigDecimal(price), FeeType.valueOf(Ascii.toUpperCase(components.get(0))));
|
||||
} else {
|
||||
return Fee.create(
|
||||
new BigDecimal(price), FeeType.valueOf(Ascii.toUpperCase(components.get(0))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,8 +110,6 @@ import google.registry.model.domain.launch.LaunchNotice;
|
|||
import google.registry.model.domain.launch.LaunchPhase;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.eppoutput.CreateData.DomainCreateData;
|
||||
import google.registry.model.eppoutput.EppOutput;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.registry.Registry.TldState;
|
||||
|
@ -157,9 +155,6 @@ public class DomainApplicationCreateFlowTest
|
|||
setEppInput("domain_create_sunrise_encoded_signed_mark.xml");
|
||||
createTld("tld", TldState.SUNRISE);
|
||||
persistResource(Registry.get("tld").asBuilder().setReservedLists(createReservedList()).build());
|
||||
createTld("flags", TldState.LANDRUSH);
|
||||
persistResource(
|
||||
Registry.get("flags").asBuilder().setReservedLists(createReservedList()).build());
|
||||
inject.setStaticField(TmchCertificateAuthority.class, "clock", clock);
|
||||
clock.setTo(DateTime.parse("2014-09-09T09:09:09Z"));
|
||||
}
|
||||
|
@ -1691,22 +1686,4 @@ public class DomainApplicationCreateFlowTest
|
|||
// ❤☀☆☂☻♞☯.tld
|
||||
doFailingDomainNameTest("xn--k3hel9n7bxlu1e.tld", InvalidIdnDomainLabelException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_flags_feeMismatch() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
setEppInput("domain_create_landrush_flags.xml", ImmutableMap.of("FEE", "12"));
|
||||
thrown.expect(FeesMismatchException.class);
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_flags() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
setEppInput("domain_create_landrush_flags.xml", ImmutableMap.of("FEE", "42"));
|
||||
EppOutput eppOutput = runFlow();
|
||||
String domainNameWithFlagsPrefix =
|
||||
((DomainCreateData) eppOutput.getResponse().getResponseData().get(0)).name();
|
||||
assertThat(domainNameWithFlagsPrefix).isEqualTo("flag1-flag2-create-42.flags");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,6 @@ public class DomainApplicationUpdateFlowTest
|
|||
@Before
|
||||
public void setUp() {
|
||||
createTld("tld", TldState.SUNRUSH);
|
||||
createTld("flags", TldState.SUNRISE);
|
||||
}
|
||||
|
||||
private void persistReferencedEntities() {
|
||||
|
|
|
@ -21,7 +21,6 @@ import static google.registry.model.ofy.ObjectifyService.ofy;
|
|||
import static google.registry.pricing.PricingEngineProxy.isDomainPremium;
|
||||
import static google.registry.testing.DatastoreHelper.assertBillingEvents;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.deleteTld;
|
||||
import static google.registry.testing.DatastoreHelper.getHistoryEntries;
|
||||
import static google.registry.testing.DatastoreHelper.newContactResource;
|
||||
|
@ -113,8 +112,6 @@ import google.registry.model.domain.launch.LaunchNotice;
|
|||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.eppoutput.CreateData.DomainCreateData;
|
||||
import google.registry.model.eppoutput.EppOutput;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.registry.Registry.TldState;
|
||||
|
@ -143,7 +140,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
|
||||
@Before
|
||||
public void initCreateTest() throws Exception {
|
||||
createTlds("tld", "flags");
|
||||
createTld("tld");
|
||||
persistResource(Registry.get("tld").asBuilder()
|
||||
.setReservedLists(persistReservedList(
|
||||
"tld-reserved",
|
||||
|
@ -1742,22 +1739,4 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
.build());
|
||||
doSuccessfulTest("tld", "domain_create_response.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_flags_feeMismatch() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
setEppInput("domain_create_flags.xml", ImmutableMap.of("FEE", "12"));
|
||||
thrown.expect(FeesMismatchException.class);
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_flags() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
setEppInput("domain_create_flags.xml", ImmutableMap.of("FEE", "42"));
|
||||
EppOutput eppOutput = runFlow();
|
||||
String domainNameWithFlagsPrefix =
|
||||
((DomainCreateData) eppOutput.getResponse().getResponseData().get(0)).name();
|
||||
assertThat(domainNameWithFlagsPrefix).isEqualTo("flag1-flag2-create-42.flags");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
|||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.assertBillingEvents;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.getOnlyHistoryEntryOfType;
|
||||
import static google.registry.testing.DatastoreHelper.getOnlyPollMessage;
|
||||
import static google.registry.testing.DatastoreHelper.getPollMessages;
|
||||
|
@ -103,7 +102,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
|
|||
|
||||
@Before
|
||||
public void initDomainTest() throws Exception {
|
||||
createTlds("tld", "flags");
|
||||
createTld("tld");
|
||||
// For flags extension tests.
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ import static com.google.common.truth.Truth.assertThat;
|
|||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.assertBillingEvents;
|
||||
import static google.registry.testing.DatastoreHelper.createTld;
|
||||
import static google.registry.testing.DatastoreHelper.createTlds;
|
||||
import static google.registry.testing.DatastoreHelper.getOnlyHistoryEntryOfType;
|
||||
import static google.registry.testing.DatastoreHelper.getPollMessages;
|
||||
import static google.registry.testing.DatastoreHelper.newDomainResource;
|
||||
|
@ -84,7 +83,7 @@ public class DomainRestoreRequestFlowTest extends
|
|||
|
||||
@Before
|
||||
public void initDomainTest() {
|
||||
createTlds("tld", "flags");
|
||||
createTld("tld");
|
||||
}
|
||||
|
||||
void persistPendingDeleteDomain() throws Exception {
|
||||
|
@ -548,14 +547,4 @@ public class DomainRestoreRequestFlowTest extends
|
|||
thrown.expect(FeesRequiredForPremiumNameException.class);
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFlags_flagsWithWrongFee() throws Exception {
|
||||
setEppInput(
|
||||
"domain_update_restore_request_flags.xml",
|
||||
ImmutableMap.of("DOMAIN", "renew-42.flags", "FEE", "12"));
|
||||
persistPendingDeleteDomain();
|
||||
thrown.expect(FeesMismatchException.class);
|
||||
runFlow();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
<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>create-42.flags</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>
|
||||
<fee:create xmlns:fee="urn:ietf:params:xml:ns:fee-0.6">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee>%FEE%</fee:fee>
|
||||
</fee:create>
|
||||
<flags:create xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:flag>flag1</flags:flag>
|
||||
<flags:flag>flag2</flags:flag>
|
||||
</flags:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,36 +0,0 @@
|
|||
<?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>create-42.flags</domain:name>
|
||||
<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>
|
||||
<launch:create
|
||||
xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase>landrush</launch:phase>
|
||||
</launch:create>
|
||||
<fee:create xmlns:fee="urn:ietf:params:xml:ns:fee-0.6">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee>%FEE%</fee:fee>
|
||||
</fee:create>
|
||||
<flags:create xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:flag>flag1</flags:flag>
|
||||
<flags:flag>flag2</flags:flag>
|
||||
</flags:create>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,38 +0,0 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<domain:infData
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>domain.flags</domain:name>
|
||||
<domain:roid>%ROID%</domain:roid>
|
||||
<domain:status s="ok"/>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.tld</domain:hostObj>
|
||||
<domain:hostObj>ns1.example.net</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:host>ns1.example.tld</domain:host>
|
||||
<domain:host>ns2.example.tld</domain:host>
|
||||
<domain:clID>NewRegistrar</domain:clID>
|
||||
<domain:crID>TheRegistrar</domain:crID>
|
||||
<domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate>
|
||||
<domain:upID>NewRegistrar</domain:upID>
|
||||
<domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate>
|
||||
<domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate>
|
||||
<domain:trDate>2000-04-08T09:00:00.0Z</domain:trDate>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:infData>
|
||||
</resData>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
|
@ -1,44 +0,0 @@
|
|||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<domain:infData
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>domain-flag1-flag2.flags</domain:name>
|
||||
<domain:roid>%ROID%</domain:roid>
|
||||
<domain:status s="ok"/>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.tld</domain:hostObj>
|
||||
<domain:hostObj>ns1.example.net</domain:hostObj>
|
||||
</domain:ns>
|
||||
<domain:host>ns1.example.tld</domain:host>
|
||||
<domain:host>ns2.example.tld</domain:host>
|
||||
<domain:clID>NewRegistrar</domain:clID>
|
||||
<domain:crID>TheRegistrar</domain:crID>
|
||||
<domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate>
|
||||
<domain:upID>NewRegistrar</domain:upID>
|
||||
<domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate>
|
||||
<domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate>
|
||||
<domain:trDate>2000-04-08T09:00:00.0Z</domain:trDate>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:infData>
|
||||
</resData>
|
||||
<extension>
|
||||
<flags:infData xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:flag>flag1</flags:flag>
|
||||
<flags:flag>flag2</flags:flag>
|
||||
</flags:infData>
|
||||
</extension>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
|
@ -1,37 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<domain:infData xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>domain.flags</domain:name>
|
||||
<domain:roid>%ROID%</domain:roid>
|
||||
<domain:status s="pendingCreate"/>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:clID>NewRegistrar</domain:clID>
|
||||
<domain:crID>TheRegistrar</domain:crID>
|
||||
<domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate>
|
||||
<domain:upID>NewRegistrar</domain:upID>
|
||||
<domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:infData>
|
||||
</resData>
|
||||
<extension>
|
||||
<launch:infData xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase name="landrush">sunrise</launch:phase>
|
||||
<launch:applicationID>123-TLD</launch:applicationID>
|
||||
<launch:status s="pendingValidation"/>
|
||||
</launch:infData>
|
||||
</extension>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
|
@ -1,41 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<response>
|
||||
<result code="1000">
|
||||
<msg>Command completed successfully</msg>
|
||||
</result>
|
||||
<resData>
|
||||
<domain:infData xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>domain-flag1-flag2.flags</domain:name>
|
||||
<domain:roid>%ROID%</domain:roid>
|
||||
<domain:status s="pendingCreate"/>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">sh8013</domain:contact>
|
||||
<domain:clID>NewRegistrar</domain:clID>
|
||||
<domain:crID>TheRegistrar</domain:crID>
|
||||
<domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate>
|
||||
<domain:upID>NewRegistrar</domain:upID>
|
||||
<domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:infData>
|
||||
</resData>
|
||||
<extension>
|
||||
<launch:infData xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase name="landrush">sunrise</launch:phase>
|
||||
<launch:applicationID>123-TLD</launch:applicationID>
|
||||
<launch:status s="pendingValidation"/>
|
||||
</launch:infData>
|
||||
<flags:infData xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:flag>flag1</flags:flag>
|
||||
<flags:flag>flag2</flags:flag>
|
||||
</flags:infData>
|
||||
</extension>
|
||||
<trID>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
<svTRID>server-trid</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
|
@ -1,27 +0,0 @@
|
|||
<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.flags</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>flag1</flags:flag>
|
||||
<flags:flag>flag2</flags:flag>
|
||||
</flags:add>
|
||||
<flags:rem>
|
||||
<flags:flag>flag3</flags:flag>
|
||||
<flags:flag>flag4</flags:flag>
|
||||
</flags:rem>
|
||||
</flags:transfer>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,23 +0,0 @@
|
|||
<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>%DOMAIN%.flags</domain:name>
|
||||
</domain:update>
|
||||
</update>
|
||||
<extension>
|
||||
<flags:update xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:add>
|
||||
<flags:flag>flag1</flags:flag>
|
||||
<flags:flag>flag2</flags:flag>
|
||||
</flags:add>
|
||||
<flags:rem>
|
||||
<flags:flag>flag3</flags:flag>
|
||||
<flags:flag>flag4</flags:flag>
|
||||
</flags:rem>
|
||||
</flags:update>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,27 +0,0 @@
|
|||
<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>%DOMAIN%.flags</domain:name>
|
||||
</domain:update>
|
||||
</update>
|
||||
<extension>
|
||||
<flags:update xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:add>
|
||||
<flags:flag>flag1</flags:flag>
|
||||
<flags:flag>flag2</flags:flag>
|
||||
</flags:add>
|
||||
<flags:rem>
|
||||
<flags:flag>flag3</flags:flag>
|
||||
<flags:flag>flag4</flags:flag>
|
||||
</flags:rem>
|
||||
</flags:update>
|
||||
<fee:update xmlns:fee="urn:ietf:params:xml:ns:fee-0.6">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee>%FEE%</fee:fee>
|
||||
</fee:update>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,39 +0,0 @@
|
|||
<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>update-42.flags</domain:name>
|
||||
<domain:add>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns2.example.tld</domain:hostObj>
|
||||
</domain:ns>
|
||||
</domain:add>
|
||||
<domain:rem>
|
||||
<domain:ns>
|
||||
<domain:hostObj>ns1.example.tld</domain:hostObj>
|
||||
</domain:ns>
|
||||
</domain:rem>
|
||||
</domain:update>
|
||||
</update>
|
||||
<extension>
|
||||
<launch:update xmlns:launch="urn:ietf:params:xml:ns:launch-1.0">
|
||||
<launch:phase name="landrush">sunrise</launch:phase>
|
||||
<launch:applicationID>1-ROID</launch:applicationID>
|
||||
</launch:update>
|
||||
<fee:update xmlns:fee="urn:ietf:params:xml:ns:fee-0.6">
|
||||
<fee:currency>USD</fee:currency>
|
||||
<fee:fee>%FEE%</fee:fee>
|
||||
</fee:update>
|
||||
<flags:update xmlns:flags="urn:google:params:xml:ns:flags-0.1">
|
||||
<flags:add>
|
||||
<flags:flag>flag1</flags:flag>
|
||||
</flags:add>
|
||||
<flags:rem>
|
||||
<flags:flag>flag2</flags:flag>
|
||||
</flags:rem>
|
||||
</flags:update>
|
||||
</extension>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -15,7 +15,6 @@
|
|||
<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,7 +15,6 @@
|
|||
<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>
|
||||
|
|
|
@ -67,11 +67,6 @@ 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 testCreate_emptyCommand() throws Exception {
|
||||
// This EPP command wouldn't be allowed for policy reasons, but should marshal/unmarshal fine.
|
||||
|
@ -128,11 +123,6 @@ 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 testUpdate_emptyCommand() throws Exception {
|
||||
// This EPP command wouldn't be allowed for policy reasons, but should marshal/unmarshal fine.
|
||||
|
@ -203,11 +193,6 @@ 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");
|
||||
|
@ -238,11 +223,6 @@ 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");
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
<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>
|
|
@ -1,29 +0,0 @@
|
|||
<?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>
|
|
@ -1,26 +0,0 @@
|
|||
<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>
|
|
@ -1,42 +0,0 @@
|
|||
<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