Class EPPFeeTransform

java.lang.Object
com.verisign.epp.codec.fee.v1_0.EPPFeeTransform
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable
Direct Known Subclasses:
EPPFeeCreate, EPPFeeRenew, EPPFeeTransfer, EPPFeeUpdate

public abstract class EPPFeeTransform extends 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:
  • Constructor Details

    • EPPFeeTransform

      public EPPFeeTransform()
      Default constructor for EPPFeeTransform.
    • EPPFeeTransform

      public EPPFeeTransform(EPPFeeValue aFee)
      Constructor for EPPFeeTransform that takes a single fee.
      Parameters:
      aFee - A single fee of the transform command
    • EPPFeeTransform

      public EPPFeeTransform(EPPFeeValue aFee, String aCurrency)
      Constructor for EPPFeeTransform that takes a single fee and the optional currency.
      Parameters:
      aFee - A single fee of the transform command
      aCurrency - Currency of the fee
    • EPPFeeTransform

      public EPPFeeTransform(List<EPPFeeValue> aFees, String aCurrency)
      Constructor for EPPFeeTransform that takes all attributes.
      Parameters:
      aFees - The fees of the transform command
      aCurrency - Currency of the fees
  • Method Details

    • getLocalName

      protected abstract 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 String getCurrency()
      Gets the currency value.
      Returns:
      Currency if defined; null otherwise.
    • setCurrency

      public void setCurrency(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 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(List<EPPFeeValue> aFees)
      Sets the list of fees.
      Parameters:
      aFees - The fees to set.
    • encode

      public Element encode(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 interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document, which acts is an Element factory
      Returns:
      Element Root element associated with the object
      Throws:
      EPPEncodeException - Error encoding EPPFeeTransform
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode a DOM element tree to initialize the instance attributes. The aElement argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Element to decode
      Throws:
      EPPDecodeException - Error decoding Element
    • clone

      public Object clone() throws CloneNotSupportedException
      clone an EPPCodecComponent.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of concrete EPPFeeTransform
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPFeeTransform with this instance.
      Overrides:
      equals in class Object
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if equal; false otherwise.