Package com.verisign.epp.codec.maintenance.v1_0

## Class EPPMaintenanceDescription

- java.lang.Object
- - com.verisign.epp.codec.maintenance.v1_0.EPPMaintenanceDescription

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

      public class EPPMaintenanceDescription
      extends java.lang.Object
      implements EPPCodecComponent

  `EPPMaintenanceDescription` is a free-form descriptions of the maintenance without having to create and traverse an external resource defined by the <maint:detail> element. The OPTIONAL "lang" attribute MAY be present to identify the language if the negotiated value is something other then the default value of "en" (English). The OPTIONAL "type" attribute MAY be present to identify the format of the description. It MUST either be "plain" for plain text or "html" HTML text that is defined in [W3C-HTML5] and XML-escaped, with a default value of "plain".
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `EPPMaintenanceDescription.Type` | Description type enumerated values.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `DEFAULT_LANG` | Default language
    `static java.lang.String` | `ELM_LOCALNAME` | XML local name for `EPPMaintenanceDescription`.
    `static java.lang.String` | `ELM_NAME` | XML root tag for `EPPMaintenance`.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPMaintenanceDescription()` | Default constructor for `EPPMaintenanceDescription`.
    `EPPMaintenanceDescription​(java.lang.String aDescription)` | Constructor for `EPPMaintenanceDescription` with the required attribute as a parameter.
    `EPPMaintenanceDescription​(java.lang.String aDescription, EPPMaintenanceDescription.Type aType, java.lang.String aLang)` | Constructor for `EPPMaintenanceDescription` with all of the attributes as parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `clone()` | Clone `EPPMaintenanceDescription`.
    `void` | `decode​(org.w3c.dom.Element aElement)` | Decode the `EPPMaintenanceDescription` attributes from the aElement DOM Element tree.
    `org.w3c.dom.Element` | `encode​(org.w3c.dom.Document aDocument)` | Encode a DOM Element tree from the attributes of the `EPPMaintenanceDescription` instance.
    `boolean` | `equals​(java.lang.Object aObject)` | implements a deep `EPPMaintenanceDescription` compare.
    `java.lang.String` | `getDescription()` | Gets the free-form description of the maintenance without having to create an external resource.
    `java.lang.String` | `getLang()` | Gets the description language value.
    `java.lang.String` | `getNamespace()` | Returns the XML namespace associated with the `EPPCodecComponent`.
    `EPPMaintenanceDescription.Type` | `getType()` | Gets the description type value.
    `boolean` | `hasLang()` | Is the description language defined with a non-default value?
    `void` | `setDescription​(java.lang.String aDescription)` | Sets the free-form description of the maintenance without having to create an external resource.
    `void` | `setLang​(java.lang.String aLang)` | Sets the description language value.
    `void` | `setType​(EPPMaintenanceDescription.Type aType)` | Sets the description type 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

    - #### DEFAULT_LANG

          public static final java.lang.String DEFAULT_LANG

      Default language
      See Also:
        Constant Field Values

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

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

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

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

  - ### Constructor Detail

    - #### EPPMaintenanceDescription

          public EPPMaintenanceDescription()

      Default constructor for `EPPMaintenanceDescription`. The required attributes need to be set. The `type` attribute defaults to `EPPMaintenanceDescription.Type.plain` and the `lang` attribute defaults to `DEFAULT_LANG`.

    - #### EPPMaintenanceDescription

          public EPPMaintenanceDescription​(java.lang.String aDescription)

      Constructor for `EPPMaintenanceDescription` with the required attribute as a parameter.
      Parameters:
        `aDescription` - Description value

    - #### EPPMaintenanceDescription

          public EPPMaintenanceDescription​(java.lang.String aDescription,
                                           EPPMaintenanceDescription.Type aType,
                                           java.lang.String aLang)

      Constructor for `EPPMaintenanceDescription` with all of the attributes as parameters.
      Parameters:
        `aDescription` - Description value
        `aType` - Type of the description
        `aLang` - Language of the description

  - ### Method Detail

    - #### getDescription

          public java.lang.String getDescription()

      Gets the free-form description of the maintenance without having to create an external resource.
      Returns:
        The free-form description of the maintenance if defined; `null` otherwise.

    - #### setDescription

          public void setDescription​(java.lang.String aDescription)

      Sets the free-form description of the maintenance without having to create an external resource.
      Parameters:
        `aDescription` - Free-form description of the maintenance without having to create an external resource.

    - #### hasLang

          public boolean hasLang()

      Is the description language defined with a non-default value?
      Returns:
        `true` if the description language is defined; `false` otherwise.

    - #### getLang

          public java.lang.String getLang()

      Gets the description language value.
      Returns:
        Description language if defined; `DEFAULT_LANG` otherwise.

    - #### setLang

          public void setLang​(java.lang.String aLang)

      Sets the description language value.
      Parameters:
        `aLang` - Description language for value.

    - #### getType

          public EPPMaintenanceDescription.Type getType()

      Gets the description type value.
      Returns:
        Description type with a default value of `EPPMaintenanceDescription.Type.plain`.

    - #### setType

          public void setType​(EPPMaintenanceDescription.Type aType)

      Sets the description type value.
      Parameters:
        `aType` - Description type value.

    - #### encode

          public org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
                                     throws EPPEncodeException

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

    - #### decode

          public void decode​(org.w3c.dom.Element aElement)
                      throws EPPDecodeException

      Decode the `EPPMaintenanceDescription` attributes from the aElement DOM Element tree.
      Specified by:
        `decode` in interface `EPPCodecComponent`
      Parameters:
        `aElement` - Root DOM Element to decode `EPPMaintenanceDescription` from.
      Throws:
        `EPPDecodeException` - Unable to decode aElement.

    - #### equals

          public boolean equals​(java.lang.Object aObject)

      implements a deep `EPPMaintenanceDescription` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPMaintenanceDescription` instance to compare with
      Returns:
        `true` of `aObject` is equal to instance; `false` otherwise.

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Clone `EPPMaintenanceDescription`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of `EPPMaintenanceDescription`
      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.

    - #### 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`.