Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.verisign.epp.codec.defReg
Class EPPDefRegPeriod

    java.lang.Object
      com.verisign.epp.codec.defReg.EPPDefRegPeriod

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

    public class EPPDefRegPeriod

extends java.lang.Object
implements EPPCodecComponent

Represents a defReg Period. A defReg name object MAY have a specified validity period. If server policy supports defReg object validity periods, the validity period is defined when a defReg object is created, and it MAY be extended by the EPP <renew> or <transfer> commands. As a matter of server policy, this specification does not define actions to be taken upon expiration of a defReg object's validity period.
Validity periods are measured in years or months with the appropriate units specified using the `unit` attribute. Valid values for the `unit` attribute are `y` for years and `m` for months.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `PERIOD_UNIT_MONTH` Period in Unit Month
`static java.lang.String` | `PERIOD_UNIT_YEAR` Period in Unit Year

Constructor Summary
`EPPDefRegPeriod()` `EPPDefRegPeriod` default constructor.
`EPPDefRegPeriod(int aPeriod)` `EPPDefRegPeriod` constructor that takes the defReg period (in unit of year) as an argument
`EPPDefRegPeriod(java.lang.String aPUnit, int aPeriod)` `EPPDefRegPeriod` constructor that takes the defReg period and period unit as an arguments

Method Summary
`java.lang.Object` | `clone()` Clone `EPPDefRegPeriod`.
`void` | `decode(org.w3c.dom.Element aElement)` Decode the EPPDefRegPeriod 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 EPPDefRegPeriod instance.
`boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPDefRegPeriod` compare.
`int` | `getPeriod()` Get defReg period.
`java.lang.String` | `getPUnit()` Get defReg period unit.
`boolean` | `isPeriodUnspec()` Test whether the period has been specfied: `true` is unspecified and `false` is specified.
`void` | `setPeriod(int newPeriod)` Set defReg period.
`void` | `setPUnit(java.lang.String newPUnit)` Set defReg period of un.
`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

### PERIOD_UNIT_MONTH

    public static final java.lang.String PERIOD_UNIT_MONTH

  Period in Unit Month

  See Also:
    Constant Field Values

### PERIOD_UNIT_YEAR

    public static final java.lang.String PERIOD_UNIT_YEAR

  Period in Unit Year

  See Also:
    Constant Field Values

Constructor Detail

### EPPDefRegPeriod

    public EPPDefRegPeriod()

  `EPPDefRegPeriod` default constructor. The period is initialized to `unspecified`. The period must be set before invoking `encode`.

### EPPDefRegPeriod

    public EPPDefRegPeriod(int aPeriod)

  `EPPDefRegPeriod` constructor that takes the defReg period (in unit of year) as an argument

  Parameters:
    `aPeriod` - int

### EPPDefRegPeriod

    public EPPDefRegPeriod(java.lang.String aPUnit,
                           int aPeriod)

  `EPPDefRegPeriod` constructor that takes the defReg period and period unit as an arguments

  Parameters:
    `aPUnit` - String
    `aPeriod` - int

Method Detail

### clone

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

  Clone `EPPDefRegPeriod`.

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

### decode

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

  Decode the EPPDefRegPeriod attributes from the aElement DOM Element tree.

  Specified by:
    `decode` in interface `EPPCodecComponent`
  Parameters:
    `aElement` - - Root DOM Element to decode EPPDefRegPeriod from.
  Throws:
    `EPPDecodeException` - Unable to decode aElement

### encode

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

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

### equals

    public boolean equals(java.lang.Object aObject)

  implements a deep `EPPDefRegPeriod` compare.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `aObject` - `EPPDefRegPeriod` instance to compare with
  Returns:
    DOCUMENT ME!

### getPeriod

    public int getPeriod()

  Get defReg period.

  Returns:
    int

### getPUnit

    public java.lang.String getPUnit()

  Get defReg period unit.

  Returns:
    String

### isPeriodUnspec

    public boolean isPeriodUnspec()

  Test whether the period has been specfied: `true` is unspecified and `false` is specified.

  Returns:
    boolean

### setPeriod

    public void setPeriod(int newPeriod)
                   throws EPPCodecException

  Set defReg period.

  Parameters:
    `newPeriod` - int
  Throws:
    `EPPCodecException` - DOCUMENT ME!

### setPUnit

    public void setPUnit(java.lang.String newPUnit)

  Set defReg period of un. Creation date: (5/30/01 11:36:52 AM)

  Parameters:
    `newPUnit` - java.lang.String

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © VeriSign Inc. All Rights Reserved.