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 forEPPFeeTransform
that takes a single fee.EPPFeeTransform(EPPFeeValue aFee, java.lang.String aCurrency)
Constructor forEPPFeeTransform
that takes a single fee and the optional currency.EPPFeeTransform(java.util.List<EPPFeeValue> aFees, java.lang.String aCurrency)
Constructor forEPPFeeTransform
that takes all attributes.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addFee(EPPFeeValue aFee)
Adds a fee to the list of fees.java.lang.Object
clone()
clone anEPPCodecComponent
.void
decode(org.w3c.dom.Element aElement)
Decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode instance into a DOM element tree.boolean
equals(java.lang.Object aObject)
Compare an instance ofEPPFeeTransform
with this instance.java.lang.String
getCurrency()
Gets the currency value.java.util.List<EPPFeeValue>
getFees()
Gets the list of fees if defined.protected abstract java.lang.String
getLocalName()
Abstract method that the sub-class must define to return the local name for the root element.boolean
hasCurrency()
Is the currency defined?boolean
hasFees()
Are the fees defined?void
setCurrency(java.lang.String aCurrency)
Sets the currency value.void
setFees(java.util.List<EPPFeeValue> aFees)
Sets the list of fees.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation 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 forEPPFeeTransform
that takes a single fee.- Parameters:
aFee
- A single fee of the transform command
-
EPPFeeTransform
public EPPFeeTransform(EPPFeeValue aFee, java.lang.String aCurrency)
Constructor forEPPFeeTransform
that 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 forEPPFeeTransform
that 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:
true
if the currency is defined;false
otherwise.
-
getCurrency
public java.lang.String getCurrency()
Gets the currency value.- Returns:
- Currency if defined;
null
otherwise.
-
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:
true
if the fees are defined;false
otherwise.
-
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 EPPEncodeException
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:
encode
in 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 EPPDecodeException
Decode a DOM element tree to initialize the instance attributes. TheaElement
argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
-Element
to decode- Throws:
EPPDecodeException
- Error decodingElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone anEPPCodecComponent
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in 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 XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPFeeTransform
with this instance.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
- Object to compare with.- Returns:
true
if equal;false
otherwise.
-
-