Package com.verisign.epp.codec.fee.v1_0
Class EPPFeeTransform
- java.lang.Object
-
- com.verisign.epp.codec.fee.v1_0.EPPFeeTransform
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
EPPFeeCreate,EPPFeeRenew,EPPFeeTransfer,EPPFeeUpdate
public abstract class EPPFeeTransform extends java.lang.Object implements EPPCodecComponent
Abstract base class for the transform commands (create, renew, update, transfer) for enabling the client to pass the expected fee for a billable transform command.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EPPFeeTransform()Default constructor forEPPFeeTransform.EPPFeeTransform(EPPFeeValue aFee)Constructor forEPPFeeTransformthat takes a single fee.EPPFeeTransform(EPPFeeValue aFee, java.lang.String aCurrency)Constructor forEPPFeeTransformthat takes a single fee and the optional currency.EPPFeeTransform(java.util.List<EPPFeeValue> aFees, java.lang.String aCurrency)Constructor forEPPFeeTransformthat takes all attributes.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddFee(EPPFeeValue aFee)Adds a fee to the list of fees.java.lang.Objectclone()clone anEPPCodecComponent.voiddecode(org.w3c.dom.Element aElement)Decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode instance into a DOM element tree.booleanequals(java.lang.Object aObject)Compare an instance ofEPPFeeTransformwith this instance.java.lang.StringgetCurrency()Gets the currency value.java.util.List<EPPFeeValue>getFees()Gets the list of fees if defined.protected abstract java.lang.StringgetLocalName()Abstract method that the sub-class must define to return the local name for the root element.booleanhasCurrency()Is the currency defined?booleanhasFees()Are the fees defined?voidsetCurrency(java.lang.String aCurrency)Sets the currency value.voidsetFees(java.util.List<EPPFeeValue> aFees)Sets the list of fees.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.verisign.epp.codec.gen.EPPCodecComponent
getNamespace
-
-
-
-
Constructor Detail
-
EPPFeeTransform
public EPPFeeTransform()
Default constructor forEPPFeeTransform.
-
EPPFeeTransform
public EPPFeeTransform(EPPFeeValue aFee)
Constructor forEPPFeeTransformthat takes a single fee.- Parameters:
aFee- A single fee of the transform command
-
EPPFeeTransform
public EPPFeeTransform(EPPFeeValue aFee, java.lang.String aCurrency)
Constructor forEPPFeeTransformthat takes a single fee and the optional currency.- Parameters:
aFee- A single fee of the transform commandaCurrency- Currency of the fee
-
EPPFeeTransform
public EPPFeeTransform(java.util.List<EPPFeeValue> aFees, java.lang.String aCurrency)
Constructor forEPPFeeTransformthat takes all attributes.- Parameters:
aFees- The fees of the transform commandaCurrency- Currency of the fees
-
-
Method Detail
-
getLocalName
protected abstract java.lang.String 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 transform command.
-
hasCurrency
public boolean hasCurrency()
Is the currency defined?- Returns:
trueif the currency is defined;falseotherwise.
-
getCurrency
public java.lang.String getCurrency()
Gets the currency value.- Returns:
- Currency if defined;
nullotherwise.
-
setCurrency
public void setCurrency(java.lang.String aCurrency)
Sets the currency value.- Parameters:
aCurrency- Currency value
-
hasFees
public boolean hasFees()
Are the fees defined?- Returns:
trueif the fees are defined;falseotherwise.
-
getFees
public java.util.List<EPPFeeValue> getFees()
Gets the list of fees if defined.- Returns:
- List of fees if defined; empty list otherwise.
-
addFee
public void addFee(EPPFeeValue aFee)
Adds a fee to the list of fees.- Parameters:
aFee- The fee to add.
-
setFees
public void setFees(java.util.List<EPPFeeValue> aFees)
Sets the list of fees.- Parameters:
aFees- The fees to set.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode 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 encodingEPPFeeTransform
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode 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
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionclone anEPPCodecComponent.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of concrete
EPPFeeTransform - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPFeeTransformwith this instance.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject- Object to compare with.- Returns:
trueif equal;falseotherwise.
-
-