com.verisign.epp.codec.registry.v02

## Class EPPRegistryGracePeriod

- java.lang.Object
- - com.verisign.epp.codec.registry.v02.EPPRegistryPeriodType
  - - com.verisign.epp.codec.registry.v02.EPPRegistryGracePeriod

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

      public class EPPRegistryGracePeriod
      extends EPPRegistryPeriodType

  Defines the grace periods by operation type. The required "command" attribute defines the operation type with the sample values of "create", "renew", "transfer", and "autoRenew". The <registry:gracePeriod> element requires the "unit" attribute with the possible values of "d" for day, "h" for hour, and "m" for minute.
  See Also:
    `EPPRegistryDomain`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryPeriodType

      `EPPRegistryPeriodType.Unit`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ATTR_COMMAND` XML attribute name for the `command` attribute.
    `protected java.lang.String` | `command` EPP transform command to which this period applies
    `static java.lang.String` | `ELM_LOCALNAME` XML local name for `EPPRegistryGracePeriod`.

    - ### Fields inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryPeriodType

      `ATTR_UNIT, number, unit`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPRegistryGracePeriod()` Default constructor.
    `EPPRegistryGracePeriod(java.lang.String aCommand, java.lang.Integer aNumber, EPPRegistryPeriodType.Unit aUnit)` Constructs an instance of `EPPRegistryGracePeriod` with `command`, `number` and `unit`.
    `EPPRegistryGracePeriod(java.lang.String command, int number, EPPRegistryPeriodType.Unit unit)` Constructs an instance of `EPPRegistryGracePeriod` with `command`, `number` and `unit`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPRegistryGracePeriod` 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 `EPPRegistryGracePeriod` instance.
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPRegistryGracePeriod` compare.
    `java.lang.String` | `getCommand()` Get the EPP transform command to which this period applies.
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `protected java.lang.String` | `getRootName()` Gets the root element local name.
    `void` | `setCommand(java.lang.String command)` Set the EPP transform command to which this period applies.

    - ### Methods inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryPeriodType

      `clone, getNumber, getUnit, setNumber, setUnit, toString`

    - ### 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 `EPPRegistryGracePeriod`.
      See Also:
        Constant Field Values

    - #### ATTR_COMMAND

          public static final java.lang.String ATTR_COMMAND

      XML attribute name for the `command` attribute.
      See Also:
        Constant Field Values

    - #### command

          protected java.lang.String command

      EPP transform command to which this period applies

  - ### Constructor Detail

    - #### EPPRegistryGracePeriod

          public EPPRegistryGracePeriod()

      Default constructor. Must call `EPPRegistryPeriodType.setNumber(Integer)`, `#setUnit(String)` and `setCommand(String)` before calling `encode(Document)` method.

    - #### EPPRegistryGracePeriod

          public EPPRegistryGracePeriod(java.lang.String aCommand,
                                        java.lang.Integer aNumber,
                                        EPPRegistryPeriodType.Unit aUnit)

      Constructs an instance of `EPPRegistryGracePeriod` with `command`, `number` and `unit`.
      Parameters:
        `aCommand` - EPP command to which this period applies
        `aNumber` - number must be > 0
        `aUnit` - unit must be one of `Unit#d`, `Unit#h`, or `Unit#m`.

    - #### EPPRegistryGracePeriod

          public EPPRegistryGracePeriod(java.lang.String command,
                                        int number,
                                        EPPRegistryPeriodType.Unit unit)

      Constructs an instance of `EPPRegistryGracePeriod` with `command`, `number` and `unit`.
      Parameters:
        `command` - EPP command to which this period applies
        `number` - number must be > 0
        `unit` - unit must be one of `Unit#d`, `Unit#h`, or `Unit#m`.

  - ### Method Detail

    - #### encode

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

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

    - #### decode

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

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

    - #### equals

          public boolean equals(java.lang.Object aObject)

      implements a deep `EPPRegistryGracePeriod` compare.
      Overrides:
        `equals` in class `EPPRegistryPeriodType`
      Parameters:
        `aObject` - `EPPRegistryGracePeriod` instance to compare with
      Returns:
        `true` if this object is the same as the aObject argument; `false` otherwise

    - #### getCommand

          public java.lang.String getCommand()

      Get the EPP transform command to which this period applies.
      Returns:
        EPP transform command to which this period applies

    - #### setCommand

          public void setCommand(java.lang.String command)

      Set the EPP transform command to which this period applies.
      Parameters:
        `command` - EPP transform command to which this period applies

    - #### getNamespace

          public java.lang.String getNamespace()

      Returns the XML namespace associated with the `EPPCodecComponent`.
      Returns:
        XML namespace for the `EPPCodecComponent`.

    - #### getRootName

          protected java.lang.String getRootName()

      Gets the root element local name.
      Overrides:
        `getRootName` in class `EPPRegistryPeriodType`
      Returns:
        Root element local name.

Copyright © VeriSign Inc. All Rights Reserved.