mirror of
https://github.com/google/nomulus.git
synced 2025-07-22 10:46:10 +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,57 @@
|
|||
// 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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeCheckCommandExtensionItem;
|
||||
import google.registry.model.domain.fee.FeeCheckResponseExtensionItem;
|
||||
import google.registry.model.domain.fee.FeeQueryCommandExtensionItemImpl;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/** An individual price check item in version 0.6 of the fee extension on Check commands. */
|
||||
@XmlType(propOrder = {"name", "currency", "command", "period"})
|
||||
public class FeeCheckCommandExtensionItemV06
|
||||
extends FeeQueryCommandExtensionItemImpl implements FeeCheckCommandExtensionItem {
|
||||
|
||||
/** The fully qualified domain name being checked. */
|
||||
String name;
|
||||
|
||||
CurrencyUnit currency;
|
||||
|
||||
@Override
|
||||
public boolean isDomainNameSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDomainName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCurrencySupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrencyUnit getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeeCheckResponseExtensionItem.Builder createResponseBuilder() {
|
||||
return new FeeCheckResponseExtensionItemV06.Builder();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
// 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.fee06;
|
||||
|
||||
import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.domain.fee.FeeCheckCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeCheckResponseExtensionItem;
|
||||
import java.util.Set;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/** Version 0.6 of the fee extension that may be present on domain check commands. */
|
||||
@XmlRootElement(name = "check")
|
||||
public class FeeCheckCommandExtensionV06 extends ImmutableObject
|
||||
implements FeeCheckCommandExtension<
|
||||
FeeCheckCommandExtensionItemV06,
|
||||
FeeCheckResponseExtensionV06> {
|
||||
|
||||
@XmlElement(name = "domain")
|
||||
Set<FeeCheckCommandExtensionItemV06> items;
|
||||
|
||||
@Override
|
||||
public boolean isCurrencySupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrencyUnit getCurrency() {
|
||||
throw new UnsupportedOperationException("Currency not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableSet<FeeCheckCommandExtensionItemV06> getItems() {
|
||||
return nullToEmptyImmutableCopy(items);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeeCheckResponseExtensionV06 createResponse(
|
||||
ImmutableList<? extends FeeCheckResponseExtensionItem> items) {
|
||||
ImmutableList.Builder<FeeCheckResponseExtensionItemV06> builder = new ImmutableList.Builder<>();
|
||||
for (FeeCheckResponseExtensionItem item : items) {
|
||||
if (item instanceof FeeCheckResponseExtensionItemV06) {
|
||||
builder.add((FeeCheckResponseExtensionItemV06) item);
|
||||
}
|
||||
}
|
||||
return FeeCheckResponseExtensionV06.create(builder.build());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
// 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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeCheckResponseExtensionItem;
|
||||
import google.registry.model.domain.fee.FeeQueryResponseExtensionItemImpl;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/** The version 0.6 response for a domain check on a single resource. */
|
||||
@XmlType(propOrder = {"name", "currency", "command", "period", "fee", "feeClass"})
|
||||
public class FeeCheckResponseExtensionItemV06
|
||||
extends FeeQueryResponseExtensionItemImpl implements FeeCheckResponseExtensionItem {
|
||||
/** The name of the domain that was checked, with an attribute indicating if it is premium. */
|
||||
String name;
|
||||
|
||||
CurrencyUnit currency;
|
||||
|
||||
/** Builder for {@link FeeCheckResponseExtensionItemV06}. */
|
||||
public static class Builder
|
||||
extends FeeQueryResponseExtensionItemImpl.Builder<FeeCheckResponseExtensionItemV06, Builder>
|
||||
implements FeeCheckResponseExtensionItem.Builder {
|
||||
|
||||
@Override
|
||||
public Builder setDomainNameIfSupported(String name) {
|
||||
getInstance().name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setCurrencyIfSupported(CurrencyUnit currency) {
|
||||
getInstance().currency = currency;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setAvailIfSupported(boolean avail) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setReasonIfSupported(String 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.fee06;
|
||||
|
||||
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.6 of the fee extension that may be present on the
|
||||
* response to EPP domain check commands.
|
||||
*/
|
||||
@XmlRootElement(name = "chkData")
|
||||
public class FeeCheckResponseExtensionV06
|
||||
extends ImmutableObject implements FeeCheckResponseExtension<FeeCheckResponseExtensionItemV06> {
|
||||
|
||||
/** Check responses. */
|
||||
@XmlElement(name = "cd")
|
||||
ImmutableList<FeeCheckResponseExtensionItemV06> items;
|
||||
|
||||
@Override
|
||||
public void setCurrencyIfSupported(CurrencyUnit currency) {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@Override
|
||||
public ImmutableList<FeeCheckResponseExtensionItemV06> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
static FeeCheckResponseExtensionV06
|
||||
create(ImmutableList<FeeCheckResponseExtensionItemV06> items) {
|
||||
FeeCheckResponseExtensionV06 instance = new FeeCheckResponseExtensionV06();
|
||||
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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtensionImplNoCredits;
|
||||
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"})
|
||||
public class FeeCreateCommandExtensionV06
|
||||
extends FeeTransformCommandExtensionImplNoCredits implements FeeTransformCommandExtension {
|
||||
|
||||
@Override
|
||||
public FeeTransformResponseExtension.Builder createResponseBuilder() {
|
||||
return new FeeCreateResponseExtensionV06.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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImplNoCredits;
|
||||
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"})
|
||||
public class FeeCreateResponseExtensionV06 extends FeeTransformResponseExtensionImplNoCredits {
|
||||
/** A builder for {@link FeeCreateResponseExtensionV06}. */
|
||||
public static class Builder extends
|
||||
FeeTransformResponseExtensionImplNoCredits.Builder<FeeCreateResponseExtensionV06, 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.fee06;
|
||||
|
||||
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 FeeDeleteResponseExtensionV06 extends FeeTransformResponseExtensionImpl {
|
||||
|
||||
/** Builder for {@link FeeDeleteResponseExtensionV06}. */
|
||||
public static class Builder
|
||||
extends FeeTransformResponseExtensionImpl.Builder<FeeDeleteResponseExtensionV06, Builder> {}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// 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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeQueryCommandExtensionItemImpl;
|
||||
import google.registry.model.eppinput.EppInput.CommandExtension;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/** A fee extension that may be present on domain info commands. */
|
||||
@XmlRootElement(name = "info")
|
||||
@XmlType(propOrder = {"currency", "command", "period"})
|
||||
public class FeeInfoCommandExtensionV06
|
||||
extends FeeQueryCommandExtensionItemImpl implements CommandExtension {
|
||||
|
||||
/** A three-character ISO4217 currency code. */
|
||||
CurrencyUnit currency;
|
||||
|
||||
@Override
|
||||
public boolean isCurrencySupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrencyUnit getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
// 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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeQueryResponseExtensionItem;
|
||||
import google.registry.model.domain.fee.FeeQueryResponseExtensionItemImpl;
|
||||
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
|
||||
/**
|
||||
* An XML data object that represents a fee extension that may be present on the response to EPP
|
||||
* domain info commands.
|
||||
*/
|
||||
@XmlRootElement(name = "infData")
|
||||
@XmlType(propOrder = {"currency", "command", "period", "fee", "feeClass"})
|
||||
public class FeeInfoResponseExtensionV06
|
||||
extends FeeQueryResponseExtensionItemImpl implements ResponseExtension {
|
||||
|
||||
CurrencyUnit currency;
|
||||
|
||||
/** Builder for {@link FeeInfoResponseExtensionV06}. */
|
||||
public static class Builder
|
||||
extends FeeQueryResponseExtensionItemImpl.Builder<FeeInfoResponseExtensionV06, Builder> {
|
||||
|
||||
@Override
|
||||
public Builder setAvailIfSupported(boolean avail) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setReasonIfSupported(String reason) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeeQueryResponseExtensionItem.Builder
|
||||
setCurrencyIfSupported(CurrencyUnit currency) {
|
||||
getInstance().currency = currency;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtensionImplNoCredits;
|
||||
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"})
|
||||
public class FeeRenewCommandExtensionV06
|
||||
extends FeeTransformCommandExtensionImplNoCredits implements FeeTransformCommandExtension {
|
||||
|
||||
@Override
|
||||
public FeeTransformResponseExtension.Builder createResponseBuilder() {
|
||||
return new FeeRenewResponseExtensionV06.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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImplNoCredits;
|
||||
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"})
|
||||
public class FeeRenewResponseExtensionV06 extends FeeTransformResponseExtensionImplNoCredits {
|
||||
/** A builder for {@link FeeRenewResponseExtensionV06}. */
|
||||
public static class Builder extends
|
||||
FeeTransformResponseExtensionImplNoCredits.Builder<FeeRenewResponseExtensionV06, 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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtensionImplNoCredits;
|
||||
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"})
|
||||
public class FeeTransferCommandExtensionV06
|
||||
extends FeeTransformCommandExtensionImplNoCredits implements FeeTransformCommandExtension {
|
||||
|
||||
@Override
|
||||
public FeeTransformResponseExtension.Builder createResponseBuilder() {
|
||||
return new FeeTransferResponseExtensionV06.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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImplNoCredits;
|
||||
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"})
|
||||
public class FeeTransferResponseExtensionV06 extends FeeTransformResponseExtensionImplNoCredits {
|
||||
/** A builder for {@link FeeTransferResponseExtensionV06}. */
|
||||
public static class Builder
|
||||
extends FeeTransformResponseExtensionImplNoCredits
|
||||
.Builder<FeeTransferResponseExtensionV06, 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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtensionImplNoCredits;
|
||||
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"})
|
||||
public class FeeUpdateCommandExtensionV06
|
||||
extends FeeTransformCommandExtensionImplNoCredits implements FeeTransformCommandExtension {
|
||||
|
||||
@Override
|
||||
public FeeTransformResponseExtension.Builder createResponseBuilder() {
|
||||
return new FeeUpdateResponseExtensionV06.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.fee06;
|
||||
|
||||
import google.registry.model.domain.fee.FeeTransformResponseExtensionImplNoCredits;
|
||||
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"})
|
||||
public class FeeUpdateResponseExtensionV06 extends FeeTransformResponseExtensionImplNoCredits {
|
||||
/** A builder for {@link FeeUpdateResponseExtensionV06}. */
|
||||
public static class Builder
|
||||
extends FeeTransformResponseExtensionImplNoCredits
|
||||
.Builder<FeeUpdateResponseExtensionV06, Builder> {}
|
||||
}
|
30
java/google/registry/model/domain/fee06/package-info.java
Normal file
30
java/google/registry/model/domain/fee06/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.6",
|
||||
xmlns = @XmlNs(prefix = "fee", namespaceURI = "urn:ietf:params:xml:ns:fee-0.6"),
|
||||
elementFormDefault = XmlNsForm.QUALIFIED)
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlJavaTypeAdapter(CurrencyUnitAdapter.class)
|
||||
package google.registry.model.domain.fee06;
|
||||
|
||||
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