Package com.verisign.epp.codec.fee.v1_0
Class EPPFeeTransformResult
java.lang.Object
com.verisign.epp.codec.fee.v1_0.EPPFeeTransformResult
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
- Direct Known Subclasses:
EPPFeeCreData,EPPFeeDelData,EPPFeeRenData,EPPFeeTrnData,EPPFeeUpdData
Abstract base class for the transform results (create, renew, update, delete,
transfer) for enabling the server to return the currency, fees, credits,
balance, and credit limit where appropriate.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor forEPPFeeTransformResult.EPPFeeTransformResult(String aCurrency, EPPFeeCredit aCredit) Constructor forEPPFeeTransformResultthat takes the required currency parameter along with a single credit.EPPFeeTransformResult(String aCurrency, EPPFeeValue aFee) Constructor forEPPFeeTransformResultthat takes the required currency parameter along with a single fee.EPPFeeTransformResult(String aCurrency, BigDecimal aBalance, BigDecimal aCreditLimit, List<EPPFeeCredit> aCredits) Constructor forEPPFeeTransformResultthat takes all attributes that includes credits.EPPFeeTransformResult(String aCurrency, List<EPPFeeValue> aFees) Constructor forEPPFeeTransformResultthat takes the required currency parameter along with a list of fees.EPPFeeTransformResult(String aCurrency, List<EPPFeeValue> aFees, BigDecimal aBalance, BigDecimal aCreditLimit) Constructor forEPPFeeTransformResultthat takes all attributes that includes fees. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCredit(EPPFeeCredit aCredit) Adds a credit to the list of credits.voidaddFee(EPPFeeValue aFee) Adds a fee to the list of fees.clone()Clone anEPPFeeTransformResultinstance.voidDecode a DOM element tree to initialize the instance attributes.Encode instance into a DOM element tree.booleanCompare an instance ofEPPFeeTransformResultwith this instance.Gets the available balance of the client.Gets the maximum credit available to the client.Gets the list of credits if defined.Gets the currency value.getFees()Gets the list of fees if defined.protected abstract StringAbstract method that the sub-class must define to return the local name for the root element.Gets the period value.booleanIs the balance defined?booleanIs the credit limit defined?booleanAre the credits defined? The credits are used on a delete response.booleanIs the currency defined?booleanhasFees()Are the fees defined?booleanIs the period defined?voidsetBalance(BigDecimal aBalance) Sets the available balance of the client.voidsetCreditLimit(BigDecimal aCreditLimit) Sets the maximum credit available to the client.voidsetCredits(List<EPPFeeCredit> aCredits) Sets the list of credits.voidsetCurrency(String aCurrency) Sets the currency value.voidsetFees(List<EPPFeeValue> aFees) Sets the list of fees.voidsetPeriod(EPPFeePeriod aPeriod) Sets the period value.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.protected abstract voidValidate the set of attributes onencode.Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.verisign.epp.codec.gen.EPPCodecComponent
getNamespace
-
Constructor Details
-
EPPFeeTransformResult
public EPPFeeTransformResult()Default constructor forEPPFeeTransformResult. -
EPPFeeTransformResult
Constructor forEPPFeeTransformResultthat takes the required currency parameter along with a single fee.- Parameters:
aCurrency- Currency of the feeaFee- A single fee value
-
EPPFeeTransformResult
Constructor forEPPFeeTransformResultthat takes the required currency parameter along with a list of fees.- Parameters:
aCurrency- Currency of the feeaFees- The fees of the transform command
-
EPPFeeTransformResult
Constructor forEPPFeeTransformResultthat takes the required currency parameter along with a single credit.- Parameters:
aCurrency- Currency of the feeaCredit- A single credit value
-
EPPFeeTransformResult
public EPPFeeTransformResult(String aCurrency, List<EPPFeeValue> aFees, BigDecimal aBalance, BigDecimal aCreditLimit) Constructor forEPPFeeTransformResultthat takes all attributes that includes fees.- Parameters:
aCurrency- The currency of the feesaFees- The fees of the transform commandaBalance- The remaining client balanceaCreditLimit- The maximum credit available to the client
-
EPPFeeTransformResult
public EPPFeeTransformResult(String aCurrency, BigDecimal aBalance, BigDecimal aCreditLimit, List<EPPFeeCredit> aCredits) Constructor forEPPFeeTransformResultthat takes all attributes that includes credits.- Parameters:
aCurrency- The currency of the feesaBalance- The remaining client balanceaCreditLimit- The maximum credit available to the clientaCredits- The credits of the command
-
-
Method Details
-
getLocalName
Abstract method that the sub-class must define to return the local name for the root element.- Returns:
- Local name of the root element of the result.
-
validateAttributes
Validate the set of attributes onencode. Each subclass must provide their own implementation ofvalidateAttributesto validate that the required attributes are set and invalid attribute are not set prior to theencode.- Throws:
EPPEncodeException- When an attribute is incorrect set or not set.
-
hasCurrency
public boolean hasCurrency()Is the currency defined?- Returns:
trueif the currency is defined;falseotherwise.
-
getCurrency
Gets the currency value.- Returns:
- Currency if defined;
nullotherwise.
-
setCurrency
Sets the currency value.- Parameters:
aCurrency- Currency value
-
hasPeriod
public boolean hasPeriod()Is the period defined?- Returns:
trueif the period is defined;falseotherwise.
-
getPeriod
Gets the period value.- Returns:
- Period if defined;
nullotherwise.
-
setPeriod
Sets the period value.- Parameters:
aPeriod- Period value
-
hasFees
public boolean hasFees()Are the fees defined?- Returns:
trueif the fees are defined;falseotherwise.
-
getFees
Gets the list of fees if defined.- Returns:
- List of fees if defined; empty list otherwise.
-
addFee
Adds a fee to the list of fees.- Parameters:
aFee- The fee to add.
-
setFees
Sets the list of fees.- Parameters:
aFees- The fees to set.
-
hasCredits
public boolean hasCredits()Are the credits defined? The credits are used on a delete response.- Returns:
trueif the credits are defined;falseotherwise.
-
getCredits
Gets the list of credits if defined. The credits are used on a delete response.- Returns:
- List of credits if defined; empty list otherwise.
-
addCredit
Adds a credit to the list of credits. The credits are used on a delete response.- Parameters:
aCredit- The credit to add.
-
setCredits
Sets the list of credits. The credits are used on a delete response.- Parameters:
aCredits- The credits to set. Set tonullfor no credits.
-
hasBalance
public boolean hasBalance()Is the balance defined?- Returns:
trueif the balance is defined;falseotherwise.
-
getBalance
Gets the available balance of the client. The balance can be negative to indicate that the server has provided the client with credit.- Returns:
- the balance if defined;
nullotherwise.
-
setBalance
Sets the available balance of the client. The balance can be negative to indicate that the server has provided the client with credit.- Parameters:
aBalance- The available balance.
-
hasCreditLimit
public boolean hasCreditLimit()Is the credit limit defined?- Returns:
trueif the credit limit is defined;falseotherwise.
-
getCreditLimit
Gets the maximum credit available to the client. This reflects how negative thebalanceattribute can go to.- Returns:
- The maximum credit available to the client if defiend;
nullotherwise.
-
setCreditLimit
Sets the maximum credit available to the client. This reflects how negative thebalanceattribute can go to.- Parameters:
aCreditLimit- The maximum credit available to the client.
-
encode
Encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attribute is appended as a child node.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException- Error encodingEPPFeeTransformResult
-
decode
Decode a DOM element tree to initialize the instance attributes. TheaElementargument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement-Elementto decode- Throws:
EPPDecodeException- Error decodingElement
-
clone
Clone anEPPFeeTransformResultinstance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of concrete
EPPFeeTransformResult - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
equals
Compare an instance ofEPPFeeTransformResultwith this instance.
-