Class EPPRegistryMinMaxPeriod

java.lang.Object
com.verisign.epp.codec.registry.v02.EPPRegistryMinMaxPeriod
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPRegistryMinMaxPeriod extends Object implements EPPCodecComponent
The default, minimum, and maximum period length for the command type. The <registry:length> element contains the following child elements, where all of the child elements require the "unit" attribute with possible values of "y" for year and "m" for month
See Also:
  • Field Details

  • Constructor Details

    • EPPRegistryMinMaxPeriod

      public EPPRegistryMinMaxPeriod()
    • EPPRegistryMinMaxPeriod

      public EPPRegistryMinMaxPeriod(Integer aMinNumber, EPPRegistryPeriodType.Unit aMinUnit, Integer aMaxNumber, EPPRegistryPeriodType.Unit aMaxUnit, Integer aDefaultNumber, EPPRegistryPeriodType.Unit aDefaultUnit)
      Constructor for EPPRegistryMinMaxPeriod that takes all of the attribute values as parameters.
      Parameters:
      aMinNumber - The minimum supported period length number.
      aMinUnit - The minimum supported period length unit.
      aMaxNumber - The maximum supported period length number.
      aMaxUnit - The maximum supported period length unit.
      aDefaultNumber - The default period length number if not defined by the client.
      aDefaultUnit - The default period length unit if not defined by the client.
    • EPPRegistryMinMaxPeriod

      public EPPRegistryMinMaxPeriod(int aMinNumber, EPPRegistryPeriodType.Unit aMinUnit, int aMaxNumber, EPPRegistryPeriodType.Unit aMaxUnit, int aDefaultNumber, EPPRegistryPeriodType.Unit aDefaultUnit)
      Constructor for EPPRegistryMinMaxPeriod that takes all of the attribute values as parameters.
      Parameters:
      aMinNumber - The minimum supported period length number.
      aMinUnit - The minimum supported period length unit.
      aMaxNumber - The maximum supported period length number.
      aMaxUnit - The maximum supported period length unit.
      aDefaultNumber - The default period length number if not defined by the client.
      aDefaultUnit - The default period length unit if not defined by the client.
  • Method Details

    • encode

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

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

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

      public boolean equals(Object aObject)
      implements a deep EPPRegistryMinMaxPeriod compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPRegistryMinMaxPeriod instance to compare with
      Returns:
      true if this object is the same as the aObject argument; false otherwise
    • 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.
    • getMin

      public EPPRegistryMinPeriodType getMin()
      Gets the minimum supported period length.
      Returns:
      Minimum supported period length if defined; null otherwise.
    • setMin

      public void setMin(EPPRegistryMinPeriodType aMin)
      Sets the minimum supported period length.
      Parameters:
      aMin - Minimum supported period length
    • getMax

      public EPPRegistryMaxPeriodType getMax()
      Gets the maximum supported period length.
      Returns:
      Maximum supported period length if defined; null otherwise.
    • setMax

      public void setMax(EPPRegistryMaxPeriodType aMax)
      Sets the maximum supported period length.
      Parameters:
      aMax - Maximum supported period length
    • getDefaultLength

      public EPPRegistryDefaultPeriodType getDefaultLength()
      Gets the default supported period length.
      Returns:
      Default supported period length if defined; null otherwise.
    • setDefaultLength

      public void setDefaultLength(EPPRegistryDefaultPeriodType aDefault)
      Sets the default supported period length.
      Parameters:
      aDefault - Default supported period length
    • getNamespace

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