Class EPPHostAddRemove

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

public class EPPHostAddRemove extends 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:
  • Constructor Details

    • EPPHostAddRemove

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

      public EPPHostAddRemove(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(String aName)
      Constructor for EPPHostAddRemove. The addresses attribute defaults to null.
      Parameters:
      aName - DOCUMENT ME!
    • EPPHostAddRemove

      public EPPHostAddRemove(Vector<EPPHostAddress> aAddresses, 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 Details

    • 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 Vector<EPPHostAddress> getAddresses()
      Gets the addresses to add or remove.
      Returns:
      Vector EPPHostAddress instances if defined; null otherwise.
    • setAddresses

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

      public Element encode(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(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(Object aObject)
      implements a deep EPPHostAddRemove compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPHostAddRemove instance to compare with
      Returns:
      true when equal; false otherwise.
    • clone

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

      public 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 Vector<EPPHostStatus> getStatuses()
      Gets statuses.
      Returns:
      Vector of EPPHostStatus if defined; null otherwise.
    • setStatuses

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

      public void setName(String aName)
      Sets name.
      Parameters:
      aName - String
    • getNamespace

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