Class EPPHostAttr

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

public class EPPHostAttr extends Object implements EPPCodecComponent
EPPHostAttr is used to support the host attribute model.
See Also:
  • Field Details

  • Constructor Details

    • EPPHostAttr

      public EPPHostAttr()
      EPPHostAttr default constructor.
    • EPPHostAttr

      public EPPHostAttr(String aName)
      EPPHostAttr constructor the takes the host name.
      Parameters:
      aName - the fully qualified name of a host
    • EPPHostAttr

      public EPPHostAttr(String aName, Vector<EPPHostAddress> aAddresses)
      EPPHostAttr constructor the takes the host name and a Vector of host addresses.
      Parameters:
      aName - the fully qualified name of a host
      aAddresses - Vector of EPPHostAddress instances
  • Method Details

    • getName

      public String getName()
      Get the host name.
      Returns:
      Host Name
    • setName

      public void setName(String aName)
      Set the host name.
      Parameters:
      aName - Host Name
    • hasAddresses

      public boolean hasAddresses()
      Are addresses set?
      Returns:
      true if addresses are set; false otherwise.
    • addAddress

      public void addAddress(EPPHostAddress aAddress)
      Add a address to the list of addresses.
      Parameters:
      aAddress - Address to add
    • getAddresses

      public Vector<EPPHostAddress> getAddresses()
      Gets the host addresses.
      Returns:
      Vector of EPPHostAddress instances if defined; null otherwise.
    • setAddresses

      public void setAddresses(Vector<EPPHostAddress> aAddresses)
      Sets the host addresses.
      Parameters:
      aAddresses - Vector of EPPHostAddress instances.
    • clone

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

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPHostAttr attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - - Root DOM Element to decode EPPHostAttr 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 EPPHostAttr 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 EPPHostAttr instance.
      Throws:
      EPPEncodeException - - Unable to encode EPPHostAttr instance.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPHostAttr compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPHostAttr instance to compare with
      Returns:
      true if equal; 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.
    • getNamespace

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