Class EPPHostAttr

  • All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

    public class EPPHostAttr
    extends java.lang.Object
    implements EPPCodecComponent
    EPPHostAttr is used to support the host attribute model.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELM_LOCALNAME
      XML local name for EPPHostAttr.
      static java.lang.String ELM_NAME
      XML Element Name of EPPHostAttr root element.
    • Constructor Summary

      Constructors 
      Constructor Description
      EPPHostAttr()
      EPPHostAttr default constructor.
      EPPHostAttr​(java.lang.String aName)
      EPPHostAttr constructor the takes the host name.
      EPPHostAttr​(java.lang.String aName, java.util.Vector<EPPHostAddress> aAddresses)
      EPPHostAttr constructor the takes the host name and a Vector of host addresses.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAddress​(EPPHostAddress aAddress)
      Add a address to the list of addresses.
      java.lang.Object clone()
      Clone EPPHostAttr.
      void decode​(org.w3c.dom.Element aElement)
      Decode the EPPHostAttr attributes from the aElement DOM Element tree.
      org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
      Encode a DOM Element tree from the attributes of the EPPHostAttr instance.
      boolean equals​(java.lang.Object aObject)
      implements a deep EPPHostAttr compare.
      java.util.Vector<EPPHostAddress> getAddresses()
      Gets the host addresses.
      java.lang.String getName()
      Get the host name.
      java.lang.String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      boolean hasAddresses()
      Are addresses set?
      void setAddresses​(java.util.Vector<EPPHostAddress> aAddresses)
      Sets the host addresses.
      void setName​(java.lang.String aName)
      Set the host name.
      java.lang.String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      • Methods inherited from class java.lang.Object

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

      • ELM_LOCALNAME

        public static final java.lang.String ELM_LOCALNAME
        XML local name for EPPHostAttr.
        See Also:
        Constant Field Values
      • ELM_NAME

        public static final java.lang.String ELM_NAME
        XML Element Name of EPPHostAttr root element.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EPPHostAttr

        public EPPHostAttr()
        EPPHostAttr default constructor.
      • EPPHostAttr

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

        public EPPHostAttr​(java.lang.String aName,
                           java.util.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 Detail

      • getName

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

        public void setName​(java.lang.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 java.util.Vector<EPPHostAddress> getAddresses()
        Gets the host addresses.
        Returns:
        Vector of EPPHostAddress instances if defined; null otherwise.
      • setAddresses

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

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

        public void decode​(org.w3c.dom.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 org.w3c.dom.Element encode​(org.w3c.dom.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​(java.lang.Object aObject)
        implements a deep EPPHostAttr compare.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        aObject - EPPHostAttr instance to compare with
        Returns:
        true if equal; false otherwise.
      • toString

        public java.lang.String toString()
        Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
        Overrides:
        toString in class java.lang.Object
        Returns:
        Indented XML String if successful; ERROR otherwise.
      • getNamespace

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