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

## Class EPPMaintenanceItem

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

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

      public class EPPMaintenanceItem
      extends java.lang.Object
      implements EPPCodecComponent

  Represents a maintenance that includes the following child elements:
  - <maint:id> element that is the maintenance identifier.
  - <maint:type> The OPTIONAL type of the maintenance that has the possible set of values defined by server policy.
  - <maint:pollType> An OPTIONAL element that is the registry maintenance notification poll message type.
  - <maint:systems> elements that contains one or more <maint:system> elements.
  - <maint:environment> element that indicates the type of the affected system using the Environment enumeration.
  - <maint:start> element that represents the maintenance start date and time.
  - <maint:end> element that represents the maintenance end date and time.
  - <maint:reason> element that is the reason behind the maintenance.
  - <maint:description> OPTIONAL free-form description of the maintenance.
  - <maint:tlds> OPTIONAL element containing list of affected top-level domains or registry zones.
  - <maint:intervention> OPTIONAL element that contains when the maintenance affects the connection or implementation for the client.
  - <maint:crDate> element that represents the created date and time for the maintenance.
  - <maint:upDate> OPTIONAL element that represents the updated date and time for the maintenance.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `EPPMaintenanceItem.Environment` | Environment enumerated values.
    `static class` | `EPPMaintenanceItem.PollType` | Poll type enumerated values.
    `static class` | `EPPMaintenanceItem.Reason` | Reason enumerated values.

  - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPMaintenanceItem()` | Default constructor for `EPPMaintenance`.
    `EPPMaintenanceItem​(EPPMaintenanceId aMaintenanceId, java.util.List<EPPMaintenanceSystem> aSystems, EPPMaintenanceItem.Environment aEnvironment, java.util.Date aStartDate, java.util.Date aEndDate, EPPMaintenanceItem.Reason aReason, java.util.Date aCreatedDate)` | Constructor for `EPPMaintenance` with all of the required attributes as parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addDescription​(EPPMaintenanceDescription aDescription)` | Add a description to the list of descriptions.
    `void` | `addSystem​(EPPMaintenanceSystem aSystem)` | Add a system to the list of affected systems.
    `void` | `addTld​(java.lang.String aTld)` | Add a top-level domain to the list of affected top-level domains.
    `void` | `addType​(EPPMaintenanceType aType)` | Add a type to the list of types.
    `java.lang.Object` | `clone()` | Clone `EPPMaintenance`.
    `void` | `decode​(org.w3c.dom.Element aElement)` | Decode the `EPPMaintenance` 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 `EPPMaintenance` instance.
    `boolean` | `equals​(java.lang.Object aObject)` | implements a deep `EPPMaintenance` compare.
    `java.util.Date` | `getCreatedDate()` | Gets the maintenance created date.
    `java.lang.String` | `getCustomEnvironment()` | Gets the custom environment name, when the environment is set to `EPPMaintenanceItem.Environment.custom`.
    `java.util.List<EPPMaintenanceDescription>` | `getDescriptions()` | Gets the free-form descriptions of the maintenance without having to create an external resource.
    `java.lang.String` | `getDetail()` | Gets URI to detailed maintenance description.
    `java.util.Date` | `getEndDate()` | Gets the optional maintenance end date and time.
    `EPPMaintenanceItem.Environment` | `getEnvironment()` | Gets the type of the affected system.
    `EPPMaintenanceIntervention` | `getIntervention()` | Gets the optional client intervention by the maintenance.
    `java.util.Date` | `getLastUpdatedDate()` | Gets the optional maintenance last updated date.
    `EPPMaintenanceId` | `getMaintenanceId()` | Gets the maintenance identifier.
    `java.lang.String` | `getNamespace()` | Returns the XML namespace associated with the `EPPCodecComponent`.
    `EPPMaintenanceItem.PollType` | `getPollType()` | Gets the poll type of the Registry Maintenance Notification poll message.
    `EPPMaintenanceItem.Reason` | `getReason()` | Gets the reason behind the maintenance.
    `java.util.Date` | `getStartDate()` | Gets the optional maintenance start date and time.
    `java.util.List<EPPMaintenanceSystem>` | `getSystems()` | Gets the maintenance systems.
    `java.util.List<java.lang.String>` | `getTlds()` | Gets the optional top-level domains affected by the maintenance.
    `java.util.List<EPPMaintenanceType>` | `getTypes()` | Gets the types of the maintenance.
    `boolean` | `hasCustomEnvironment()` | Is the custom environment name defined?
    `boolean` | `hasDescriptions()` | Is the descriptions defined?
    `boolean` | `hasDetail()` | Is the detail defined?
    `boolean` | `hasLastUpdatedDate()` | Is the last updated date defined?
    `boolean` | `hasPollType()` | Is the poll type defined?
    `boolean` | `hasTypes()` | Is the types defined?
    `void` | `setCreatedDate​(java.util.Date aCreatedDate)` | Sets the maintenance created date.
    `void` | `setCustomEnvironment​(java.lang.String aCustomEnvironment)` | Sets the custom environment name, when the environment is set to `EPPMaintenanceItem.Environment.custom`.
    `void` | `setDescriptions​(java.util.List<EPPMaintenanceDescription> aDescriptions)` | Sets the free-form descriptions of the maintenance without having to create an external resource.
    `void` | `setDetail​(java.lang.String aDetail)` | Sets URI to detailed maintenance description.
    `void` | `setEndDate​(java.util.Date aEndDate)` | Sets the optional maintenance end date and time.
    `void` | `setEnvironment​(EPPMaintenanceItem.Environment aEnvironment)` | Sets the type of the affected system.
    `void` | `setIntervention​(EPPMaintenanceIntervention aIntervention)` | Sets the optional client intervention.
    `void` | `setLastUpdatedDate​(java.util.Date aLastUpdatedDate)` | Sets the maintenance last updated date.
    `void` | `setMaintenanceId​(EPPMaintenanceId aMaintenanceId)` | Sets the maintenance identifier.
    `void` | `setPollType​(EPPMaintenanceItem.PollType aPollType)` | Sets the poll type of the Registry Maintenance Notification poll message.
    `void` | `setReason​(EPPMaintenanceItem.Reason aReason)` | Sets the reason behind the maintenance.
    `void` | `setStartDate​(java.util.Date aStartDate)` | Sets the optional maintenance start date and time.
    `void` | `setSystems​(java.util.List<EPPMaintenanceSystem> aSystems)` | Sets the maintenance systems.
    `void` | `setTlds​(java.util.List<java.lang.String> aTlds)` | Optional top-level domains affected by the maintenance.
    `void` | `setTypes​(java.util.List<EPPMaintenanceType> aTypes)` | Sets the types of the maintenance.
    `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 `EPPMaintenance`.
      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

    - #### EPPMaintenanceItem

          public EPPMaintenanceItem()

      Default constructor for `EPPMaintenance`. All the the attributes default to `null`. Must call required setter methods before invoking `encode(Document)`, which include:
      - maintenance identifier - `setMaintenanceId(EPPMaintenanceId)`
      - systems - `setSystems(List)`
      - environment - `setStartDate(Date)`
      - start date - `setEndDate(Date)`
      - end date - `setEnvironment(Environment)`
      - reason - `setReason(Reason)`
      - created date - `setCreatedDate(Date)`

    - #### EPPMaintenanceItem

          public EPPMaintenanceItem​(EPPMaintenanceId aMaintenanceId,
                                    java.util.List<EPPMaintenanceSystem> aSystems,
                                    EPPMaintenanceItem.Environment aEnvironment,
                                    java.util.Date aStartDate,
                                    java.util.Date aEndDate,
                                    EPPMaintenanceItem.Reason aReason,
                                    java.util.Date aCreatedDate)

      Constructor for `EPPMaintenance` with all of the required attributes as parameters.
      Parameters:
        `aMaintenanceId` - Maintenance identifier
        `aSystems` - Systems affected by the maintenance.
        `aEnvironment` - Type of the affected system.
        `aStartDate` - Maintenance start date and time
        `aEndDate` - Maintenance end date and time
        `aReason` - Reason behind the maintenance.
        `aCreatedDate` - Maintenance created date

  - ### Method Detail

    - #### getMaintenanceId

          public EPPMaintenanceId getMaintenanceId()

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

    - #### setMaintenanceId

          public void setMaintenanceId​(EPPMaintenanceId aMaintenanceId)

      Sets the maintenance identifier.
      Parameters:
        `aMaintenanceId` - The maintenance identifier.

    - #### hasTypes

          public boolean hasTypes()

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

    - #### getTypes

          public java.util.List<EPPMaintenanceType> getTypes()

      Gets the types of the maintenance.
      Returns:
        The types of the maintenance if defined; `null` otherwise.

    - #### addType

          public void addType​(EPPMaintenanceType aType)

      Add a type to the list of types.
      Parameters:
        `aType` - Type to add to the list.

    - #### setTypes

          public void setTypes​(java.util.List<EPPMaintenanceType> aTypes)

      Sets the types of the maintenance.
      Parameters:
        `aTypes` - Types of the maintenance.

    - #### hasPollType

          public boolean hasPollType()

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

    - #### getPollType

          public EPPMaintenanceItem.PollType getPollType()

      Gets the poll type of the Registry Maintenance Notification poll message.
      Returns:
        Poll type of the Registry Maintenance Notification poll message if defined; `null` otherwise.

    - #### setPollType

          public void setPollType​(EPPMaintenanceItem.PollType aPollType)

      Sets the poll type of the Registry Maintenance Notification poll message.
      Parameters:
        `aPollType` - Poll type of the Registry Maintenance Notification poll message. Set to `null` to unset it.

    - #### getSystems

          public java.util.List<EPPMaintenanceSystem> getSystems()

      Gets the maintenance systems.
      Returns:
        Maintenance systems if defined; `null` otherwise.

    - #### addSystem

          public void addSystem​(EPPMaintenanceSystem aSystem)

      Add a system to the list of affected systems.
      Parameters:
        `aSystem` - Affected system to add to the list.

    - #### setSystems

          public void setSystems​(java.util.List<EPPMaintenanceSystem> aSystems)

      Sets the maintenance systems.
      Parameters:
        `aSystems` - Maintenance systems to set.

    - #### getEnvironment

          public EPPMaintenanceItem.Environment getEnvironment()

      Gets the type of the affected system.
      Returns:
        Type of the affected system if defined; `code` otherwise.

    - #### setEnvironment

          public void setEnvironment​(EPPMaintenanceItem.Environment aEnvironment)

      Sets the type of the affected system.
      Parameters:
        `aEnvironment` - The type of the affect system to set.

    - #### hasCustomEnvironment

          public boolean hasCustomEnvironment()

      Is the custom environment name defined?
      Returns:
        `true` if the custom environment name is defined; `false` otherwise.

    - #### getCustomEnvironment

          public java.lang.String getCustomEnvironment()

      Gets the custom environment name, when the environment is set to `EPPMaintenanceItem.Environment.custom`.
      Returns:
        Custom environment name if defined; `null` otherwise.

    - #### setCustomEnvironment

          public void setCustomEnvironment​(java.lang.String aCustomEnvironment)

      Sets the custom environment name, when the environment is set to `EPPMaintenanceItem.Environment.custom`.
      Parameters:
        `aCustomEnvironment` - The custom environment name to set.

    - #### getStartDate

          public java.util.Date getStartDate()

      Gets the optional maintenance start date and time.
      Returns:
        start date and time if defined; `null` otherwise.

    - #### setStartDate

          public void setStartDate​(java.util.Date aStartDate)

      Sets the optional maintenance start date and time.
      Parameters:
        `aStartDate` - Maintenance start date and time. Set to `null` if undefined.

    - #### getEndDate

          public java.util.Date getEndDate()

      Gets the optional maintenance end date and time.
      Returns:
        end date and time if defined; `null` otherwise.

    - #### setEndDate

          public void setEndDate​(java.util.Date aEndDate)

      Sets the optional maintenance end date and time.
      Parameters:
        `aEndDate` - Maintenance end date and time. Set to `null` if undefined.

    - #### getReason

          public EPPMaintenanceItem.Reason getReason()

      Gets the reason behind the maintenance.
      Returns:
        Reason behind the maintenance if defined; `null` otherwise.

    - #### setReason

          public void setReason​(EPPMaintenanceItem.Reason aReason)

      Sets the reason behind the maintenance.
      Parameters:
        `aReason` - Reason behind the maintenance to set.

    - #### hasDetail

          public boolean hasDetail()

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

    - #### getDetail

          public java.lang.String getDetail()

      Gets URI to detailed maintenance description.
      Returns:
        URI to detailed maintenance description if defined; `null` otherwise.

    - #### setDetail

          public void setDetail​(java.lang.String aDetail)

      Sets URI to detailed maintenance description.
      Parameters:
        `aDetail` - URI to detailed maintenance description to set

    - #### hasDescriptions

          public boolean hasDescriptions()

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

    - #### getDescriptions

          public java.util.List<EPPMaintenanceDescription> getDescriptions()

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

    - #### addDescription

          public void addDescription​(EPPMaintenanceDescription aDescription)

      Add a description to the list of descriptions.
      Parameters:
        `aDescription` - Description to add to the list.

    - #### setDescriptions

          public void setDescriptions​(java.util.List<EPPMaintenanceDescription> aDescriptions)

      Sets the free-form descriptions of the maintenance without having to create an external resource.
      Parameters:
        `aDescriptions` - Free-form descriptions of the maintenance without having to create an external resource. Set to `null` to unset the descriptions.

    - #### getTlds

          public java.util.List<java.lang.String> getTlds()

      Gets the optional top-level domains affected by the maintenance.
      Returns:
        top-level domains affected by the maintenance if defined; `null` otherwise.

    - #### addTld

          public void addTld​(java.lang.String aTld)

      Add a top-level domain to the list of affected top-level domains.
      Parameters:
        `aTld` - Top-level domain to add to the list.

    - #### setTlds

          public void setTlds​(java.util.List<java.lang.String> aTlds)

      Optional top-level domains affected by the maintenance.
      Parameters:
        `aTlds` - the tlds to set. Set to `null` if undefined.

    - #### getIntervention

          public EPPMaintenanceIntervention getIntervention()

      Gets the optional client intervention by the maintenance.
      Returns:
        optional client intervention if defined; `null` otherwise.

    - #### setIntervention

          public void setIntervention​(EPPMaintenanceIntervention aIntervention)

      Sets the optional client intervention.
      Parameters:
        `aIntervention` - client intervention. Set to `null` if undefined.

    - #### getCreatedDate

          public java.util.Date getCreatedDate()

      Gets the maintenance created date.
      Returns:
        Maintenance created date if defined; `null` otherwise.

    - #### setCreatedDate

          public void setCreatedDate​(java.util.Date aCreatedDate)

      Sets the maintenance created date.
      Parameters:
        `aCreatedDate` - Maintenance created date

    - #### hasLastUpdatedDate

          public boolean hasLastUpdatedDate()

      Is the last updated date defined?
      Returns:
        `true` if the last updated date is defined; `false` otherwise.

    - #### getLastUpdatedDate

          public java.util.Date getLastUpdatedDate()

      Gets the optional maintenance last updated date.
      Returns:
        Maintenance last updated date if defined; `null` otherwise.

    - #### setLastUpdatedDate

          public void setLastUpdatedDate​(java.util.Date aLastUpdatedDate)

      Sets the maintenance last updated date.
      Parameters:
        `aLastUpdatedDate` - Maintenance last updated date

    - #### encode

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

      Encode a DOM Element tree from the attributes of the `EPPMaintenance` 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 `EPPMaintenance` instance.
      Throws:
        `EPPEncodeException` - Unable to encode `EPPMaintenance` instance.

    - #### decode

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

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

    - #### equals

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

      implements a deep `EPPMaintenance` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPMaintenance` 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 `EPPMaintenance`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of `EPPMaintenance`
      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`.