Class EPPDomainCheckResult

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

public class EPPDomainCheckResult extends Object implements EPPCodecComponent
EPPDomainCheckResult represents the result of an individual domain name check. The attributes of EPPDomainCheckResult include the domain name and a boolean value indicating if the domain name is available. domain 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 EPPDomainCheckCmd.
    static final String
    XML Element Name of EPPDomainCheckCmd root element.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for EPPDomainCheckResult.
    EPPDomainCheckResult(String aName, boolean aIsAvailable)
    Constructor for EPPDomainCheckResult that includes the domain name and the available flag.
    EPPDomainCheckResult(String aName, boolean aIsAvailable, String aReason)
    Constructor for EPPDomainCheckResult that includes the domain name, availability flag, and the availability reason.
    EPPDomainCheckResult(String aName, boolean aIsAvailable, String aReason, String aLanguage)
    Constructor for EPPDomainCheckResult that includes all attributes.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPDomainCheckResult.
    void
    decode(Element aElement)
    Decode the EPPDomainCheckResult attributes from the aElement DOM Element tree.
    encode(Document aDocument)
    Encode a DOM Element tree from the attributes of the EPPDomainCheckResult instance.
    boolean
    equals(Object aObject)
    Compare an instance of EPPDomainPingResp with this instance.
    Gets domain reason.
    Gets reason language.
    Gets the domain name associated with the result.
    Returns the XML namespace associated with the EPPCodecComponent.
    boolean
    Gets if the domain associated with EPPDomainCheckResult is availability (can it be provisioned or not) at the moment the <check> command was completed.
    void
    Sets domain reason.
    void
    setIsAvailable(boolean aIsAvailable)
    Sets if the domain associated with EPPDomainCheckResult 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

    • EPPDomainCheckResult

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

      • name is set to null
      • available is set to true

      The name must be set before invoking encode.
    • EPPDomainCheckResult

      public EPPDomainCheckResult(String aName, boolean aIsAvailable)
      Constructor for EPPDomainCheckResult that includes the domain name and the available flag.
      Parameters:
      aName - Domain name associated with result
      aIsAvailable - Is the domain available?
    • EPPDomainCheckResult

      public EPPDomainCheckResult(String aName, boolean aIsAvailable, String aReason)
      Constructor for EPPDomainCheckResult that includes the domain name, availability flag, and the availability reason.
      Parameters:
      aName - Domain name associated with result
      aIsAvailable - Is the domain available?
      aReason - Reason that domain is not available
    • EPPDomainCheckResult

      public EPPDomainCheckResult(String aName, boolean aIsAvailable, String aReason, String aLanguage)
      Constructor for EPPDomainCheckResult that includes all attributes.
      Parameters:
      aName - Domain name associated with result
      aIsAvailable - Is the domain available?
      aReason - Reason that domain is not available
      aLanguage - Language of the aReason value.
  • 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 EPPDomainCheckResult is availability (can it be provisioned or not) at the moment the <check> command was completed.
      Returns:
      Is the domain available? If false, call getDomainReason() for inavailability reason.
    • setIsAvailable

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

      public void setDomainReason(String aReason)
      Sets domain reason. This should be set if the available flag is set to false.
      Parameters:
      aReason - Domain Reason.
    • getDomainReason

      public String getDomainReason()
      Gets domain reason. This should be set if the available flag is set to false.
      Returns:
      String of domain reason.
    • setLanguage

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

      public String getLanguage()
      Gets reason language.
      Returns:
      reason language.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPDomainCheckResult 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 EPPDomainCheckResult instance.
      Throws:
      EPPEncodeException - Unable to encode EPPDomainCheckResult instance.
    • decode

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

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

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