Class EPPFeeCheckResult

java.lang.Object
com.verisign.epp.codec.fee.v1_0.EPPFeeCheckResult
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPFeeCheckResult extends Object implements EPPCodecComponent
EPPFeeCheckResult represents a fee result to a check.
See Also:
  • Field Details

  • Constructor Details

    • EPPFeeCheckResult

      public EPPFeeCheckResult()
      Default constructor for EPPFeeCheckResult.
    • EPPFeeCheckResult

      public EPPFeeCheckResult(String aObjID, boolean aAvailable)
      Constructor for EPPFeeCheckResult that only takes the identifier (domain name) and the available flag.
      Parameters:
      aObjID - Object identifier. An example is the domain name for extension of a domain check response.
      aAvailable - Fee available flag. If true, at least one fee command data element must be set and if false a reason should be set.
    • EPPFeeCheckResult

      public EPPFeeCheckResult(String aObjID, EPPFeeCommandData aCommand)
      Constructor for EPPFeeCheckResult that takes the identifier (domain name) and a single command for an available fee.
      Parameters:
      aObjID - Object identifier. An example is the domain name for extension of a domain check response.
      aCommand - Command fee data
    • EPPFeeCheckResult

      public EPPFeeCheckResult(String aObjID, List<EPPFeeCommandData> aCommands)
      Constructor for EPPFeeCheckResult that takes the object identifier (domain name) and a list of commands for an available fee.
      Parameters:
      aObjID - Object identifier. An example is the domain name for extension of a domain check response.
      aCommands - Command fee data
    • EPPFeeCheckResult

      public EPPFeeCheckResult(String aObjID, String aReason)
      Constructor for EPPFeeCheckResult that takes the object identifier (domain name) and the reason that the fee data is unavailable.
      Parameters:
      aObjID - Object identifier. An example is the domain name for extension of a domain check response.
      aReason - Reason that the fee data is unavailable.
    • EPPFeeCheckResult

      public EPPFeeCheckResult(String aObjID, String aReason, String aLanguage)
      Constructor for EPPFeeCheckResult that takes the object identifier (domain name), the reason that the fee data is unavailable, and the language of the reason.
      Parameters:
      aObjID - Object identifier. An example is the domain name for extension of a domain check response.
      aReason - Reason that the fee data is unavailable.
      aLanguage - Language of the aReason value.
    • EPPFeeCheckResult

      public EPPFeeCheckResult(String aObjID, String aClassification, String aReason, String aLanguage)
      Constructor for EPPFeeCheckResult that takes all attributes.
      Parameters:
      aObjID - Object identifier. An example is the domain name for extension of a domain check response.
      aClassification - Fee classification for object. Set to null for no classification.
      aReason - Reason that the fee data is unavailable.
      aLanguage - Language of the aReason value.
  • Method Details

    • getObjID

      public String getObjID()
      Gets the object identifier value.
      Returns:
      Object identifier value if defined; null otherwise.
    • setObjID

      public void setObjID(String aObjID)
      Sets the name value.
      Parameters:
      aObjID - Object identifier value
    • hasClassification

      public boolean hasClassification()
      Is the classification defined?
      Returns:
      true if the classification is defined; false otherwise.
    • getClassification

      public String getClassification()
      Gets the classification.
      Returns:
      The classification value if defined; null otherwise.
    • setClassification

      public void setClassification(String aClassification)
      Sets the classification.
      Parameters:
      aClassification - the classification to set
    • isAvailable

      public boolean isAvailable()
      Is the fee information available? See getReason() to get the optional reason when available is false.
      Returns:
      true if the fee information is available; false otherwise.
    • setAvailable

      public void setAvailable(boolean aAvailable)
      Sets the fee information available value. See setReason(String) to set the optional reason when available is false.
      Parameters:
      aAvailable - true if the fee is available; false otherwise.
    • hasCommands

      public boolean hasCommands()
      Are the commands defined?
      Returns:
      true if the commands are defined; false otherwise.
    • getCommands

      public List<EPPFeeCommandData> getCommands()
      Gets the list of commands if defined.
      Returns:
      List of commands if defined; empty list otherwise.
    • addCommand

      public void addCommand(EPPFeeCommandData aCommand)
      Adds a command to the list of commands.
      Parameters:
      aCommand - The command to add.
    • setCommands

      public void setCommands(List<EPPFeeCommandData> aCommands)
      Sets the list of commands.
      Parameters:
      aCommands - The commands to set.
    • hasReason

      public boolean hasReason()
      Is the reason defined if the available attribute is false?
      Returns:
      true if the reason is defined; false otherwise.
    • getReason

      public String getReason()
      Gets the reason value.
      Returns:
      Reason if defined; null otherwise.
    • setReason

      public void setReason(String aReason)
      Sets the reason value.
      Parameters:
      aReason - reason value
    • getLanguage

      public String getLanguage()
      Gets reason language
      Returns:
      Reason language
    • setLanguage

      public void setLanguage(String aLanguage)
      Sets language attribute.
      Parameters:
      aLanguage - Sets reason language attribute.
    • 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 EPPFeeCheckResult
    • 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 instance.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of concrete EPPFeeCheckResult
      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 EPPFeeCheckResult with this instance.
      Overrides:
      equals in class Object
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if equal; false otherwise.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.