Class EPPRegistryContactStreet

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

public class EPPRegistryContactStreet extends EPPRegistryAbstractMinMax
The minimum and maximum length and the minimum and maximum number of the <contact:street> elements defined in [RFC5733].
See Also:
  • Field Details

  • Constructor Details

    • EPPRegistryContactStreet

      public EPPRegistryContactStreet()
      Creates a new EPPRegistryContactStreet object.
    • EPPRegistryContactStreet

      public EPPRegistryContactStreet(Integer aMin, Integer aMax, Integer aMinEntry, Integer aMaxEntry)
      Creates a new EPPRegistryContactStreet object that takes both the minimum and maximum values as Integer's.
      Parameters:
      aMin - Minimum value
      aMax - Maximum value
      aMinEntry - Minimum number of <contact:street> elements.
      aMaxEntry - Maximum number of <contact:street> elements.
    • EPPRegistryContactStreet

      public EPPRegistryContactStreet(int aMin, int aMax, int aMinEntry, int aMaxEntry)
      Creates a new EPPRegistryContactStreet object that takes both the minimum and maximum values as int's.
      Parameters:
      aMin - Minimum value
      aMax - Maximum value
      aMinEntry - Minimum number of <contact:street> elements.
      aMaxEntry - Maximum number of <contact:street> elements.
  • Method Details

    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPRegistryContactStreet instance.
      Specified by:
      encode in interface EPPCodecComponent
      Overrides:
      encode in class EPPRegistryAbstractMinMax
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Element Root DOM Element representing the EPPRegistryContactStreet instance.
      Throws:
      EPPEncodeException - - Unable to encode EPPRegistryContactStreet instance.
    • decode

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

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

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

      public Integer getMinEntry()
      Gets the minimum entry value, which defines the minimum number of <contact:street> elements.
      Returns:
      Minimum entry value if defined; null otherwise.
    • setMinEntry

      public void setMinEntry(Integer aMinEntry)
      Sets the minimum entry value, which defines the minimum number of <contact:street> elements.
      Parameters:
      aMinEntry - Minimum number of <contact:street> elements.
    • getMaxEntry

      public Integer getMaxEntry()
      Gets the maximum entry value, which defines the maximum number of <contact:street> elements.
      Returns:
      Maximum entry value if defined; null otherwise.
    • setMaxEntry

      public void setMaxEntry(Integer aMaxEntry)
      Sets the maximum entry value, which defines the maximum number of <contact:street> elements.
      Parameters:
      aMaxEntry - Maximum number of <contact:street> elements.
    • validateState

      protected void validateState() throws EPPEncodeException
      Validate the state of the EPPRegistryContactStreet 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.
      Overrides:
      validateState in class EPPRegistryAbstractMinMax
      Throws:
      EPPEncodeException - Validation error
    • 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 EPPRegistryAbstractMinMax
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getRootName

      protected String getRootName()
      Gets the root element local name.
      Specified by:
      getRootName in class EPPRegistryAbstractMinMax
      Returns:
      Root element local name.
    • getElmMin

      protected String getElmMin()
      Gets the minimum element local name.
      Specified by:
      getElmMin in class EPPRegistryAbstractMinMax
      Returns:
      Minimum element local name.
    • getElmMax

      protected String getElmMax()
      Gets the maximum element local name.
      Specified by:
      getElmMax in class EPPRegistryAbstractMinMax
      Returns:
      Maximum element local name.
    • getLogger

      protected org.slf4j.Logger getLogger()
      Gets the Logger to use.
      Specified by:
      getLogger in class EPPRegistryAbstractMinMax
      Returns:
      Logger instance to use for logging.