Class EPPRelatedDomainExtPeriod

java.lang.Object
com.verisign.epp.codec.relateddomainext.EPPRelatedDomainExtPeriod
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPRelatedDomainExtPeriod extends Object implements EPPCodecComponent
Represents a domain Period. A domain name object MAY have a specified validity period. If server policy supports domain object validity periods, the validity period is defined when a domain 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 domain 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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Period in Unit Month
    static final String
    Period in Unit Year
  • Constructor Summary

    Constructors
    Constructor
    Description
    EPPRelatedDomainExtPeriod default constructor.
    EPPRelatedDomainExtPeriod constructor that takes the domain period (in unit of year) as an argument
    EPPRelatedDomainExtPeriod(String aPUnit, int aPeriod)
    EPPRelatedDomainExtPeriod constructor that takes the domain period and period unit as an arguments
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPRelatedDomainExtPeriod.
    void
    decode(Element aElement)
    Decode the EPPRelatedDomainExtPeriod attributes from the aElement DOM Element tree.
    encode(Document aDocument)
    Encode a DOM Element tree from the attributes of the EPPRelatedDomainExtPeriod instance.
    boolean
    equals(Object aObject)
    implements a deep EPPRelatedDomainExtPeriod compare.
    Returns the XML namespace associated with the EPPCodecComponent.
    int
    Get domain period.
    Get domain period unit.
    boolean
    Test whether the period has been specfied: true is unspecified and false is specified.
    void
    setPeriod(int newPeriod)
    Set domain period.
    void
    setPUnit(String newPUnit)
    Set domain period of un.
    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 Details

  • Constructor Details

    • EPPRelatedDomainExtPeriod

      public EPPRelatedDomainExtPeriod()
      EPPRelatedDomainExtPeriod default constructor. The period is initialized to unspecified. The period must be set before invoking encode.
    • EPPRelatedDomainExtPeriod

      public EPPRelatedDomainExtPeriod(int aPeriod)
      EPPRelatedDomainExtPeriod constructor that takes the domain period (in unit of year) as an argument
      Parameters:
      aPeriod - int
    • EPPRelatedDomainExtPeriod

      public EPPRelatedDomainExtPeriod(String aPUnit, int aPeriod)
      EPPRelatedDomainExtPeriod constructor that takes the domain period and period unit as an arguments
      Parameters:
      aPUnit - String
      aPeriod - int
  • Method Details

    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPRelatedDomainExtPeriod.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPRelatedDomainExtPeriod
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPRelatedDomainExtPeriod attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - - Root DOM Element to decode EPPRelatedDomainExtPeriod from.
      Throws:
      EPPDecodeException - Unable to decode aElement
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPRelatedDomainExtPeriod 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 EPPRelatedDomainExtPeriod instance.
      Throws:
      EPPEncodeException - - Unable to encode EPPRelatedDomainExtPeriod instance.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPRelatedDomainExtPeriod compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPRelatedDomainExtPeriod instance to compare with
      Returns:
      DOCUMENT ME!
    • getPeriod

      public int getPeriod()
      Get domain period.
      Returns:
      int
    • getPUnit

      public String getPUnit()
      Get domain 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 domain period.
      Parameters:
      newPeriod - int
      Throws:
      EPPCodecException - DOCUMENT ME!
    • setPUnit

      public void setPUnit(String newPUnit)
      Set domain period of un. Creation date: (5/30/01 11:36:52 AM)
      Parameters:
      newPUnit - java.lang.String
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.