Class EPPHostCheckResult

java.lang.Object
com.verisign.epp.codec.host.EPPHostCheckResult
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPHostCheckResult extends Object implements EPPCodecComponent
EPPHostCheckResult represents the result of an individual host name check. The attributes of EPPHostCheckResult include the domain name and a boolean value indicating if the domain name is available. host reason must be set before invoking encode if the available flag is set to false.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    XML local name for EPPHostCheckResult.
    static final String
    XML Element Name of EPPHostCheckResult root element.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for EPPHostCheckResult.
    EPPHostCheckResult(String aName, boolean isAvailable)
    Constructor for EPPHostCheckResult that includes the domain name and the is known flag.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPHostCheckResult.
    void
    decode(Element aElement)
    Decode the EPPHostCheckResult attributes from the aElement DOM Element tree.
    encode(Document aDocument)
    Encode a DOM Element tree from the attributes of the EPPHostCheckResult instance.
    boolean
    equals(Object aObject)
    Compare an instance of EPPHostCheckResult with this instance.
    Gets host reason.
    Sets domain reason to check.
    Gets the domain name associated with the result.
    Returns the XML namespace associated with the EPPCodecComponent.
    boolean
    Gets if the domain associated with EPPHostCheckResult is availability (can it be provisioned or not) at the moment the <check> command was completed.
    void
    Sets host reason.
    void
    setIsAvailable(boolean aIsAvailable)
    Sets if the host associated with EPPHostCheckResult is availability (can it be provisioned or not) at the moment the <check> command was completed.
    void
    Sets language attribute.
    void
    setName(String aName)
    Sets the domain name associated with the result.
    Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • EPPHostCheckResult

      public EPPHostCheckResult()
      Default constructor for EPPHostCheckResult. the defaults include the following:

      • name is set to null
      • known is set to false

      The name must be set before invoking encode.
    • EPPHostCheckResult

      public EPPHostCheckResult(String aName, boolean isAvailable)
      Constructor for EPPHostCheckResult that includes the domain name and the is known flag.
      Parameters:
      aName - Domain name associated with result
      isAvailable - Is the domain name available?
  • Method Details

    • getName

      public String getName()
      Gets the domain name associated with the result.
      Returns:
      Domain name associated with the result if defined; null otherwise.
    • setName

      public void setName(String aName)
      Sets the domain name associated with the result.
      Parameters:
      aName - Domain Name associated with the result.
    • isAvailable

      public boolean isAvailable()
      Gets if the domain associated with EPPHostCheckResult is availability (can it be provisioned or not) at the moment the <check> command was completed.
      Returns:
      Is the host available? If false, call getHostReason() for unavailability reason.
    • setIsAvailable

      public void setIsAvailable(boolean aIsAvailable)
      Sets if the host associated with EPPHostCheckResult is availability (can it be provisioned or not) at the moment the <check> command was completed.
      Parameters:
      aIsAvailable - Is the host available?
    • setHostReason

      public void setHostReason(String aReason)
      Sets host reason.
      Parameters:
      aReason - Host Reason.
    • getHostReason

      public String getHostReason()
      Gets host reason.
      Returns:
      String of host reason.
    • setLanguage

      public void setLanguage(String aLang)
      Sets language attribute.
      Parameters:
      aLang - Sets value of language attribute.
    • getLanguage

      public String getLanguage()
      Sets domain reason to check.
      Returns:
      String of language attribute.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPHostCheckResult instance.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Element Root DOM Element representing the EPPHostCheckResult instance.
      Throws:
      EPPEncodeException - Unable to encode EPPHostCheckResult instance.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPHostCheckResult attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root DOM Element to decode EPPHostCheckResult from.
      Throws:
      EPPDecodeException - Unable to decode aElement.
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPHostCheckResult with this instance.
      Overrides:
      equals in class Object
      Parameters:
      aObject - Object to compare with.
      Returns:
      DOCUMENT ME!
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPHostCheckResult.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPHostCheckResult
      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.
    • getNamespace

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