mirror of
https://github.com/google/nomulus.git
synced 2025-07-22 18:55:58 +02:00
Support multiple versions of the EPP Fee Extension
We want to support multiple versions of the fee extension, to allow new features while maintaining backward compatibility. This CL extends the framework and adds one new version, 0.11 (spec version 7), to the existing version 0.6 (spec version 3). A follow-on CL will add version 0.12 (spec version 8). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=127849044
This commit is contained in:
parent
f75bb65fd3
commit
8443da5c5c
170 changed files with 4376 additions and 586 deletions
|
@ -0,0 +1,148 @@
|
|||
// 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.fee11;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.domain.Period;
|
||||
import google.registry.model.domain.fee.FeeCheckCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeCheckCommandExtensionItem;
|
||||
import google.registry.model.domain.fee.FeeCheckResponseExtensionItem;
|
||||
import google.registry.model.domain.fee.FeeCheckResponseExtensionItem.Builder;
|
||||
import google.registry.model.domain.fee.FeeExtensionCommandDescriptor;
|
||||
import google.registry.model.domain.fee11.FeeCheckCommandExtensionV11.FeeCheckCommandExtensionItemV11;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/**
|
||||
* Version 0.11 of the fee extension that may be present on domain check commands. Unlike other
|
||||
* versions, there is only one check item; things are nested one level less. However, the response
|
||||
* will have multiple items, one for each domain in the check command.
|
||||
*/
|
||||
@XmlRootElement(name = "check")
|
||||
@XmlType(propOrder = {"command", "currency", "period", "feeClass"})
|
||||
public class FeeCheckCommandExtensionV11 extends ImmutableObject
|
||||
implements FeeCheckCommandExtension<
|
||||
FeeCheckCommandExtensionItemV11,
|
||||
FeeCheckResponseExtensionV11> {
|
||||
|
||||
/** The default validity period (if not specified) is 1 year for all operations. */
|
||||
static final Period DEFAULT_PERIOD = Period.create(1, Period.Unit.YEARS);
|
||||
|
||||
/** The command to check. */
|
||||
FeeExtensionCommandDescriptor command;
|
||||
|
||||
/** Three-letter currency code in which results should be returned. */
|
||||
CurrencyUnit currency;
|
||||
|
||||
/** The period to check. */
|
||||
Period period;
|
||||
|
||||
/** The class to check. */
|
||||
@XmlElement(name = "class")
|
||||
String feeClass;
|
||||
|
||||
@Override
|
||||
public boolean isCurrencySupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrencyUnit getCurrency() {
|
||||
throw new UnsupportedOperationException("Currency not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableSet<FeeCheckCommandExtensionItemV11> getItems() {
|
||||
return ImmutableSet.of(new FeeCheckCommandExtensionItemV11());
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeeCheckResponseExtensionV11 createResponse(
|
||||
ImmutableList<? extends FeeCheckResponseExtensionItem> items) {
|
||||
ImmutableList.Builder<FeeCheckResponseExtensionItemV11> builder = new ImmutableList.Builder<>();
|
||||
for (FeeCheckResponseExtensionItem item : items) {
|
||||
checkState(
|
||||
item instanceof FeeCheckResponseExtensionItemV11,
|
||||
"Fee extension response item is not V11");
|
||||
builder.add((FeeCheckResponseExtensionItemV11) item);
|
||||
}
|
||||
return FeeCheckResponseExtensionV11.create(builder.build());
|
||||
}
|
||||
|
||||
/** Implementation of the item interface, returning values of the single "item". */
|
||||
class FeeCheckCommandExtensionItemV11 implements FeeCheckCommandExtensionItem {
|
||||
|
||||
/** The name of the command being checked. */
|
||||
@Override
|
||||
public CommandName getCommandName() {
|
||||
return command.getCommand();
|
||||
}
|
||||
|
||||
/** The command name before being parsed into an enum, for use in error strings. */
|
||||
@Override
|
||||
public String getUnparsedCommandName() {
|
||||
return command.getUnparsedCommandName();
|
||||
}
|
||||
|
||||
/** The phase of the command being checked. */
|
||||
@Override
|
||||
public String getPhase() {
|
||||
return command.getPhase();
|
||||
}
|
||||
|
||||
/** The subphase of the command being checked. */
|
||||
@Override
|
||||
public String getSubphase() {
|
||||
return command.getSubphase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Period getPeriod() {
|
||||
return Optional.fromNullable(period).or(DEFAULT_PERIOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDomainNameSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDomainName() {
|
||||
throw new UnsupportedOperationException("Domain not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCurrencySupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrencyUnit getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder createResponseBuilder() {
|
||||
return new FeeCheckResponseExtensionItemV11.Builder();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
// 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.fee11;
|
||||
|
||||
import google.registry.model.domain.DomainObjectSpec;
|
||||
import google.registry.model.domain.fee.FeeCheckResponseExtensionItem;
|
||||
import google.registry.model.domain.fee.FeeQueryResponseExtensionItemImpl;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/** The version 0.11 response for a domain check on a single resource. */
|
||||
@XmlType(propOrder = {"object", "command", "currency", "period", "fee", "feeClass", "reason"})
|
||||
public class FeeCheckResponseExtensionItemV11
|
||||
extends FeeQueryResponseExtensionItemImpl implements FeeCheckResponseExtensionItem {
|
||||
|
||||
/** Whether the domain is available. */
|
||||
@XmlAttribute
|
||||
boolean avail;
|
||||
|
||||
/** The domain that was checked. */
|
||||
DomainObjectSpec object;
|
||||
|
||||
CurrencyUnit currency;
|
||||
|
||||
/** The reason that the check item cannot be calculated. */
|
||||
String reason;
|
||||
|
||||
/** Builder for {@link FeeCheckResponseExtensionItemV11}. */
|
||||
public static class Builder
|
||||
extends FeeQueryResponseExtensionItemImpl.Builder<FeeCheckResponseExtensionItemV11, Builder>
|
||||
implements FeeCheckResponseExtensionItem.Builder {
|
||||
|
||||
@Override
|
||||
public Builder setDomainNameIfSupported(String name) {
|
||||
getInstance().object = new DomainObjectSpec(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setCurrencyIfSupported(CurrencyUnit currency) {
|
||||
getInstance().currency = currency;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setAvailIfSupported(boolean avail) {
|
||||
getInstance().avail = avail;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setReasonIfSupported(String reason) {
|
||||
getInstance().reason = reason;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// 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.fee11;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.domain.fee.FeeCheckResponseExtension;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/**
|
||||
* An XML data object that represents version 0.11 of the fee extension that may be present on the
|
||||
* response to EPP domain check commands.
|
||||
*/
|
||||
@XmlRootElement(name = "chkData")
|
||||
public class FeeCheckResponseExtensionV11
|
||||
extends ImmutableObject implements FeeCheckResponseExtension<FeeCheckResponseExtensionItemV11> {
|
||||
|
||||
/** Check responses. */
|
||||
@XmlElement(name = "cd")
|
||||
ImmutableList<FeeCheckResponseExtensionItemV11> items;
|
||||
|
||||
|
||||
@Override
|
||||
public void setCurrencyIfSupported(CurrencyUnit currency) {}
|
||||
|
||||
@VisibleForTesting
|
||||
@Override
|
||||
public ImmutableList<FeeCheckResponseExtensionItemV11> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
static FeeCheckResponseExtensionV11
|
||||
create(ImmutableList<FeeCheckResponseExtensionItemV11> items) {
|
||||
FeeCheckResponseExtensionV11 instance = new FeeCheckResponseExtensionV11();
|
||||
instance.items = items;
|
||||
return instance;
|
||||
}
|
||||
}
|
|
@ -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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtensionImpl;
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtension;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/** A fee extension that may be present on domain create commands. */
|
||||
@XmlRootElement(name = "create")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeCreateCommandExtensionV11
|
||||
extends FeeTransformCommandExtensionImpl implements FeeTransformCommandExtension {
|
||||
|
||||
@Override
|
||||
public FeeTransformResponseExtension.Builder createResponseBuilder() {
|
||||
return new FeeCreateResponseExtensionV11.Builder();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// 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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImpl;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* An XML data object that represents a fee extension that may be present on the response to EPP
|
||||
* domain create commands.
|
||||
*/
|
||||
@XmlRootElement(name = "creData")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeCreateResponseExtensionV11 extends FeeTransformResponseExtensionImpl {
|
||||
/** A builder for {@link FeeCreateResponseExtensionV11}. */
|
||||
public static class Builder
|
||||
extends FeeTransformResponseExtensionImpl.Builder<FeeCreateResponseExtensionV11, Builder> {}
|
||||
}
|
|
@ -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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImpl;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* An XML data object that represents a fee extension that may be present on the response to EPP
|
||||
* domain create commands.
|
||||
*/
|
||||
@XmlRootElement(name = "delData")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeDeleteResponseExtensionV11 extends FeeTransformResponseExtensionImpl {
|
||||
|
||||
/** Builder for {@link FeeDeleteResponseExtensionV11}. */
|
||||
public static class Builder
|
||||
extends FeeTransformResponseExtensionImpl.Builder<FeeDeleteResponseExtensionV11, Builder> {}
|
||||
}
|
|
@ -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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtensionImpl;
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtension;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/** A fee extension that may be present on domain renew commands. */
|
||||
@XmlRootElement(name = "renew")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeRenewCommandExtensionV11
|
||||
extends FeeTransformCommandExtensionImpl implements FeeTransformCommandExtension {
|
||||
|
||||
@Override
|
||||
public FeeTransformResponseExtension.Builder createResponseBuilder() {
|
||||
return new FeeRenewResponseExtensionV11.Builder();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// 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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImpl;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* An XML data object that represents a fee extension that may be present on the response to EPP
|
||||
* domain renew commands.
|
||||
*/
|
||||
@XmlRootElement(name = "renData")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeRenewResponseExtensionV11 extends FeeTransformResponseExtensionImpl {
|
||||
/** A builder for {@link FeeRenewResponseExtensionV11}. */
|
||||
public static class Builder
|
||||
extends FeeTransformResponseExtensionImpl.Builder<FeeRenewResponseExtensionV11, Builder> {}
|
||||
}
|
|
@ -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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtensionImpl;
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtension;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/** A fee extension that may be present on domain transfer requests. */
|
||||
@XmlRootElement(name = "transfer")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeTransferCommandExtensionV11
|
||||
extends FeeTransformCommandExtensionImpl implements FeeTransformCommandExtension {
|
||||
|
||||
@Override
|
||||
public FeeTransformResponseExtension.Builder createResponseBuilder() {
|
||||
return new FeeTransferResponseExtensionV11.Builder();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// 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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImpl;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* An XML data object that represents a fee extension that may be present on the response to EPP
|
||||
* domain transfer requests.
|
||||
*/
|
||||
@XmlRootElement(name = "trnData")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeTransferResponseExtensionV11 extends FeeTransformResponseExtensionImpl {
|
||||
/** A builder for {@link FeeTransferResponseExtensionV11}. */
|
||||
public static class Builder
|
||||
extends FeeTransformResponseExtensionImpl.Builder<FeeTransferResponseExtensionV11, Builder> {}
|
||||
}
|
|
@ -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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtensionImpl;
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtension;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/** A fee extension that may be present on domain update commands. */
|
||||
@XmlRootElement(name = "update")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeUpdateCommandExtensionV11
|
||||
extends FeeTransformCommandExtensionImpl implements FeeTransformCommandExtension {
|
||||
|
||||
@Override
|
||||
public FeeTransformResponseExtension.Builder createResponseBuilder() {
|
||||
return new FeeUpdateResponseExtensionV11.Builder();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// 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.fee11;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImpl;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* An XML data object that represents a fee extension that may be present on the response to EPP
|
||||
* domain update commands.
|
||||
*/
|
||||
@XmlRootElement(name = "updData")
|
||||
@XmlType(propOrder = {"currency", "fees", "credits"})
|
||||
public class FeeUpdateResponseExtensionV11 extends FeeTransformResponseExtensionImpl {
|
||||
/** A builder for {@link FeeUpdateResponseExtensionV11}. */
|
||||
public static class Builder
|
||||
extends FeeTransformResponseExtensionImpl.Builder<FeeUpdateResponseExtensionV11, Builder> {}
|
||||
}
|
30
java/google/registry/model/domain/fee11/package-info.java
Normal file
30
java/google/registry/model/domain/fee11/package-info.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
// 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:ietf:params:xml:ns:fee-0.11",
|
||||
xmlns = @XmlNs(prefix = "fee11", namespaceURI = "urn:ietf:params:xml:ns:fee-0.11"),
|
||||
elementFormDefault = XmlNsForm.QUALIFIED)
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlJavaTypeAdapter(CurrencyUnitAdapter.class)
|
||||
package google.registry.model.domain.fee11;
|
||||
|
||||
import google.registry.model.translators.CurrencyUnitAdapter;
|
||||
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;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue