Class EPPHostAddRemove

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

    public class EPPHostAddRemove
    extends java.lang.Object
    implements EPPCodecComponent
    Represents attributes to add, remove or change with a EPPHostUpdateCmd. In EPPHostUpdateCmd, an instance of EPPHostAddRemove is used to specify the attributes to add, an instance of EPPHostAddRemove is used to specify the attributes to remove and instance of EPPHostAddRemove is used to specify the attributes to change

    The <host:add> and <host:rem> elements SHALL contain the following child elements:
    • One or more <host:address> elements that contains the IP addresses to be associated with or removed from the host. IP address restrictions explained in the <create> command mapping apply here as well.
    • One or more <host:status> elements that contain status values to be associated with or removed from the object. When specifying a value to be removed, only the attribute value is significant; element text is not required to match a value for removal.

    The <host:chg> element SHALL contain the following child elements:
    • A <host:name> element that contains a new fully qualified host name by which the host object will be known.
    See Also:
    EPPHostUpdateCmd, EPPHostAddress, Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAddress​(EPPHostAddress aAddress)
      Add an address to the list of addresses.
      void addStatus​(EPPHostStatus aStatus)
      Add a status to the list of statuses.
      java.lang.Object clone()
      Clone EPPHostAddRemove.
      void decode​(org.w3c.dom.Element aElement)
      Decode the EPPHostAddRemove 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 EPPHostAddRemove instance.
      boolean equals​(java.lang.Object aObject)
      implements a deep EPPHostAddRemove compare.
      java.util.Vector<EPPHostAddress> getAddresses()
      Gets the addresses to add or remove.
      java.lang.String getName()
      Gets name.
      java.lang.String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      java.util.Vector<EPPHostStatus> getStatuses()
      Gets statuses.
      boolean hasAddresses()
      Are addresses set?
      boolean hasStatuses()
      Are statuses set?
      void setAddresses​(java.util.Vector<EPPHostAddress> aAddresses)
      Sets the addresses to add or remove.
      void setName​(java.lang.String aName)
      Sets name.
      void setStatuses​(java.util.Vector<EPPHostStatus> aStatuses)
      Sets statuses.
      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
    • Constructor Detail

      • EPPHostAddRemove

        public EPPHostAddRemove()
        Default constructor for EPPHostAddRemove. The addresses attribute defaults to null.
      • EPPHostAddRemove

        public EPPHostAddRemove​(java.util.Vector<EPPHostAddress> aAddresses)
        Constructor for EPPHostAddRemove that includes the attributes as arguments.
        Parameters:
        aAddresses - Vector of EPPHostAddress instances. Is null or empty for no modifications.
      • EPPHostAddRemove

        public EPPHostAddRemove​(java.lang.String aName)
        Constructor for EPPHostAddRemove. The addresses attribute defaults to null.
        Parameters:
        aName - DOCUMENT ME!
      • EPPHostAddRemove

        public EPPHostAddRemove​(java.util.Vector<EPPHostAddress> aAddresses,
                                java.util.Vector<EPPHostStatus> aStatuses)
        Constructor for EPPHostAddRemove that includes the attributes as arguments.
        Parameters:
        aAddresses - Vector of EPPHostAddress instances. Is null or empty for no modifications.
        aStatuses - Vector of EPPHostStatus instances. Is null or empty for no modifications.
    • Method Detail

      • hasAddresses

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

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

        public java.util.Vector<EPPHostAddress> getAddresses()
        Gets the addresses to add or remove.
        Returns:
        Vector EPPHostAddress instances if defined; null otherwise.
      • setAddresses

        public void setAddresses​(java.util.Vector<EPPHostAddress> aAddresses)
        Sets the addresses to add or remove.
        Parameters:
        aAddresses - Vector of EPPHostAddress instances.
      • encode

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

        public void decode​(org.w3c.dom.Element aElement)
                    throws EPPDecodeException
        Decode the EPPHostAddRemove attributes from the aElement DOM Element tree.
        Specified by:
        decode in interface EPPCodecComponent
        Parameters:
        aElement - Root DOM Element to decode EPPHostAddRemove from.
        Throws:
        EPPDecodeException - Unable to decode aElement.
      • equals

        public boolean equals​(java.lang.Object aObject)
        implements a deep EPPHostAddRemove compare.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        aObject - EPPHostAddRemove instance to compare with
        Returns:
        true when equal; false otherwise.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Clone EPPHostAddRemove.
        Specified by:
        clone in interface EPPCodecComponent
        Overrides:
        clone in class java.lang.Object
        Returns:
        clone of EPPHostAddRemove
        Throws:
        java.lang.CloneNotSupportedException - standard Object.clone exception
      • 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.
      • getName

        public java.lang.String getName()
        Gets name.
        Returns:
        String Name
      • hasStatuses

        public boolean hasStatuses()
        Are statuses set?
        Returns:
        true if statuses are set; false otherwise.
      • addStatus

        public void addStatus​(EPPHostStatus aStatus)
        Add a status to the list of statuses.
        Parameters:
        aStatus - Status to add
      • getStatuses

        public java.util.Vector<EPPHostStatus> getStatuses()
        Gets statuses.
        Returns:
        Vector of EPPHostStatus if defined; null otherwise.
      • setStatuses

        public void setStatuses​(java.util.Vector<EPPHostStatus> aStatuses)
        Sets statuses.
        Parameters:
        aStatuses - Vector of EPPHostStatus instances
      • setName

        public void setName​(java.lang.String aName)
        Sets name.
        Parameters:
        aName - String
      • 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.