Class EPPRegistryExternalHost

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

public class EPPRegistryExternalHost extends EPPRegistryMinMaxLength
Defines the policies for external hosts. The <registry:external> elements contains the following child elements:
  • <registry:minIP> - Minimum number of IP addresses supported for an external host.
  • <registry:maxIP> - Maximum number of IP addresses supported for an external host.
  • <registry:sharePolicy> - The OPTIONAL policy for the sharing of external hosts in the server.The possible shared policy values include:
    • "perRegistrar" - The external hosts are shared across domains sponsored by an individual registrar client. Each registrar client will have its own set of external hosts to manage.
    • "perZone" - The external hosts are shared across all domains of the zone. There is a single pool of external hosts defined for the zone.
    • "perSystem" - The external hosts are shared across all zones of the system. There is a single pool of external hosts across all of the zones supported by the system.
See Also:
  • Field Details

  • Constructor Details

    • EPPRegistryExternalHost

      public EPPRegistryExternalHost()
      Default constructor
    • EPPRegistryExternalHost

      public EPPRegistryExternalHost(Integer min, Integer max, String sharePolicy)
      Constructor that takes min, max and sharePolicy.
      Parameters:
      min - minimum number of IPs supported for an external host
      max - maximum number of IPs supported for an external host
      sharePolicy - "perRegistrar", "perZone" or "perSystem"
    • EPPRegistryExternalHost

      public EPPRegistryExternalHost(int min, int max, String sharePolicy)
      Constructor that takes min, max and sharePolicy.
      Parameters:
      min - minimum number of IPs supported for an external host
      max - maximum number of IPs supported for an external host
      sharePolicy - "perRegistrar", "perZone" or "perSystem"
  • Method Details

    • encode

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

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

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

      public boolean equals(Object aObject)
      implements a deep EPPRegistryExternalHost compare.
      Overrides:
      equals in class EPPRegistryMinMaxLength
      Parameters:
      aObject - EPPRegistryExternalHost 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 EPPRegistryMinMaxLength
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getSharePolicy

      public String getSharePolicy()
      Gets the shared policy.
      Returns:
      shared policy String
    • setSharePolicy

      public void setSharePolicy(String sharePolicy)
      Sets the shared policy.
      Parameters:
      sharePolicy - shared policy String
    • validateState

      protected void validateState() throws EPPEncodeException
      Validate the state of the EPPRegistryExternalHost 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 EPPCodecException State error. This will contain the name of the attribute that is not valid.
      Overrides:
      validateState in class EPPRegistryMinMaxLength
      Throws:
      EPPEncodeException - On invalid state