Class EPPRegistryAbstractMinMax

java.lang.Object
com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable
Direct Known Subclasses:
EPPRegistryContactCity, EPPRegistryContactName, EPPRegistryContactOrg, EPPRegistryContactPostalCode, EPPRegistryContactStateProvince, EPPRegistryContactStreet, EPPRegistryDomainContact, EPPRegistryDomainHostLimit, EPPRegistryDomainNSLimit, EPPRegistryDS, EPPRegistryExternalHost, EPPRegistryInternalHost, EPPRegistryKey, EPPRegistryMinMaxLength

public abstract class EPPRegistryAbstractMinMax extends Object implements EPPCodecComponent
Abstract base class for defining a complex element that includes min and max sub-elements.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
    Possible XML Element Name of max attribute.
    protected static final String
    Possible XML Element Name of max attribute.
    protected static final String
    Possible XML Element Name of min attribute.
    protected static final String
    Possible XML Element Name of min attribute.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default EPPRegistryAbstractMinMax constructor.
    EPPRegistryAbstractMinMax(int aMin, int aMax)
    EPPRegistryAbstractMinMax that takes both the minimum and maximum values as int's.
    EPPRegistryAbstractMinMax that takes both the minimum and maximum values as Integer's.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPRegistryAbstractMinMax.
    void
    decode(Element aElement)
    Decode the EPPRegistryAbstractMinMax attributes from the aElement DOM Element tree.
    encode(Document aDocument)
    Encode a DOM Element tree from the attributes of the EPPRegistryAbstractMinMax instance.
    boolean
    equals(Object aObject)
    implements a deep EPPRegistryAbstractMinMax compare.
    protected abstract String
    Gets the maximum element local name.
    protected abstract String
    Gets the minimum element local name.
    protected abstract org.slf4j.Logger
    Gets the Logger to use.
    Gets the maximum value.
    Gets the minimum value.
    Returns the XML namespace associated with the EPPCodecComponent.
    protected abstract String
    Gets the root element local name.
    void
    Sets the maximum value.
    void
    Sets the minimum value.
    Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
    protected void
    Validate the state of the EPPRegistryAbstractMinMax instance.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • EPPRegistryAbstractMinMax

      public EPPRegistryAbstractMinMax()
      Default EPPRegistryAbstractMinMax constructor.
    • EPPRegistryAbstractMinMax

      public EPPRegistryAbstractMinMax(Integer aMin, Integer aMax)
      EPPRegistryAbstractMinMax that takes both the minimum and maximum values as Integer's.
      Parameters:
      aMin - Minimum value
      aMax - Maximum value
    • EPPRegistryAbstractMinMax

      public EPPRegistryAbstractMinMax(int aMin, int aMax)
      EPPRegistryAbstractMinMax that takes both the minimum and maximum values as int's.
      Parameters:
      aMin - Minimum value
      aMax - Maximum value
  • Method Details

    • getRootName

      protected abstract String getRootName()
      Gets the root element local name.
      Returns:
      Root element local name.
    • getElmMin

      protected abstract String getElmMin()
      Gets the minimum element local name.
      Returns:
      Minimum element local name.
    • getElmMax

      protected abstract String getElmMax()
      Gets the maximum element local name.
      Returns:
      Maximum element local name.
    • getLogger

      protected abstract org.slf4j.Logger getLogger()
      Gets the Logger to use.
      Returns:
      Logger instance to use for logging.
    • encode

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

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

      protected void validateState() throws EPPEncodeException
      Validate the state of the EPPRegistryAbstractMinMax instance. A valid state means that all of the required attributes have been set. If validateState returns without an exception, the state is valid. If the state is not valid, the EPPCodecException will contain a description of the error.
      Throws:
      EPPEncodeException - Validation error
    • clone

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

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

      public Integer getMin()
      Gets the minimum value.
      Returns:
      Minimum value if defined; null otherwise.
    • setMin

      public void setMin(Integer aMin)
      Sets the minimum value.
      Parameters:
      aMin - Minimum value
    • getMax

      public Integer getMax()
      Gets the maximum value.
      Returns:
      Maximum value if defined; null otherwise.
    • setMax

      public void setMax(Integer aMax)
      Sets the maximum value.
      Parameters:
      aMax - Maximum value
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.
    • 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.