com.verisign.epp.codec.org

## Class EPPOrgCheckResult

- java.lang.Object
- - com.verisign.epp.codec.org.EPPOrgCheckResult

- All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

      public class EPPOrgCheckResult
      extends java.lang.Object
      implements EPPCodecComponent

  `EPPOrgCheckResult` is used to represent the for the check of an individual org. The org information includes the org identifier, whether the org identifier is available, and optionally the reason that the org identifier is not available.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ELM_LOCALNAME` XML local name for `EPPOrgCheckResult`.
    `static java.lang.String` | `ELM_NAME` XML root tag for `EPPOrgCheckResult`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPOrgCheckResult()` Default constructor for `EPPOrgCheckResult`.
    `EPPOrgCheckResult(java.lang.String aOrgId, boolean aAvailable)` Constructor for `EPPOrgCheckResult` that takes org identifier and whether the org identifier is available.
    `EPPOrgCheckResult(java.lang.String aOrgId, java.lang.String aReason)` Constructor for `EPPOrgCheckResult` that is used for unavailable org identifiers providing the reason the org identifier is not available.
    `EPPOrgCheckResult(java.lang.String aOrgId, java.lang.String aReason, java.lang.String aReasonLang)` Constructor for `EPPOrgCheckResult` that is used for unavailable org identifiers providing the reason the org identifier is not available with the reason language.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` clone an `EPPCodecComponent`.
    `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 of `EPPOrgCheckResult` with this instance.
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `java.lang.String` | `getOrgId()` Gets the org identifier.
    `java.lang.String` | `getReason()` Gets the reason that the org identifier is not available.
    `java.lang.String` | `getReasonLang()` Gets the reason language value.
    `boolean` | `hasReason()` Is the reason defined?
    `boolean` | `hasReasonLang()` Is the reason language defined?
    `boolean` | `isAvailable()` Is the org identifier available?
    `void` | `setAvailable(boolean aAvailable)` Sets the org identifier is available.
    `void` | `setOrgId(java.lang.String aOrgId)` Sets the org identifier.
    `void` | `setReason(java.lang.String aReason)` Sets the reason that the org identifier is not available.
    `void` | `setReasonLang(java.lang.String aReasonLang)` Sets the reason language value.
    `java.lang.String` | `toString()` 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 Detail

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

      XML local name for `EPPOrgCheckResult`.
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      XML root tag for `EPPOrgCheckResult`.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPOrgCheckResult

          public EPPOrgCheckResult()

      Default constructor for `EPPOrgCheckResult`.

    - #### EPPOrgCheckResult

          public EPPOrgCheckResult(java.lang.String aOrgId,
                                   boolean aAvailable)

      Constructor for `EPPOrgCheckResult` that takes org identifier and whether the org identifier is available.
      Parameters:
        `aOrgId` - The org identifier
        `aAvailable` - Is the org identifier available?

    - #### EPPOrgCheckResult

          public EPPOrgCheckResult(java.lang.String aOrgId,
                                   java.lang.String aReason)

      Constructor for `EPPOrgCheckResult` that is used for unavailable org identifiers providing the reason the org identifier is not available.
      Parameters:
        `aOrgId` - The org identifier
        `aReason` - Reason that the org identifier is not available.

    - #### EPPOrgCheckResult

          public EPPOrgCheckResult(java.lang.String aOrgId,
                                   java.lang.String aReason,
                                   java.lang.String aReasonLang)

      Constructor for `EPPOrgCheckResult` that is used for unavailable org identifiers providing the reason the org identifier is not available with the reason language.
      Parameters:
        `aOrgId` - The org identifier
        `aReason` - Reason that the org identifier is not available.
        `aReasonLang` - Reason language for reason value.

  - ### Method Detail

    - #### getOrgId

          public java.lang.String getOrgId()

      Gets the org identifier.
      Returns:
        The org identifier if defined;`null` otherwise.

    - #### setOrgId

          public void setOrgId(java.lang.String aOrgId)

      Sets the org identifier.
      Parameters:
        `aOrgId` - The org identifier

    - #### isAvailable

          public boolean isAvailable()

      Is the org identifier available?
      Returns:
        `true` if the org identifier is available; `false` otherwise.

    - #### setAvailable

          public void setAvailable(boolean aAvailable)

      Sets the org identifier is available.
      Parameters:
        `aAvailable` - `true` if the org identifier is available; `false` otherwise.

    - #### hasReason

          public boolean hasReason()

      Is the reason defined?
      Returns:
        `true` if the reason is defined; `false` otherwise.

    - #### getReason

          public java.lang.String getReason()

      Gets the reason that the org identifier is not available.
      Returns:
        Reason that the org identifier is not available if defined; `null` otherwise.

    - #### setReason

          public void setReason(java.lang.String aReason)

      Sets the reason that the org identifier is not available.
      Parameters:
        `aReason` - Reason that the org identifier is not available. Set to `null` to clear the reason.

    - #### hasReasonLang

          public boolean hasReasonLang()

      Is the reason language defined?
      Returns:
        `true` if the reason language is defined; `false` otherwise.

    - #### getReasonLang

          public java.lang.String getReasonLang()

      Gets the reason language value.
      Returns:
        Reason language if defined; `null` otherwise.

    - #### setReasonLang

          public void setReasonLang(java.lang.String aReasonLang)

      Sets the reason language value.
      Parameters:
        `aReasonLang` - Reason language for reason value.

    - #### 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 interface `EPPCodecComponent`
      Parameters:
        `aDocument` - DOM Document, which acts is an Element factory
      Returns:
        Element Root element associated with the object
      Throws:
        `EPPEncodeException` - Error encoding `EPPOrgCheckResult`

    - #### decode

          public void decode(org.w3c.dom.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 java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      clone an `EPPCodecComponent`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of concrete `EPPOrgCheckResult`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### toString

          public java.lang.String toString()

      Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Indented XML `String` if successful; `ERROR` otherwise.

    - #### equals

          public boolean equals(java.lang.Object aObject)

      Compare an instance of `EPPOrgCheckResult` with this instance.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - Object to compare with.
      Returns:
        `true` if equal; `false` otherwise.

    - #### getNamespace

          public java.lang.String getNamespace()

      Returns the XML namespace associated with the `EPPCodecComponent`.
      Specified by:
        `getNamespace` in interface `EPPCodecComponent`
      Returns:
        XML namespace for the `EPPCodecComponent`.