Class EPPHostDeleteCmd

All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, Cloneable

public class EPPHostDeleteCmd extends EPPDeleteCmd
Represents an EPP Host <delete> command that allows a client to delete a host object. The EPP <delete> command provides a transform operation that allows a client to delete a host object. In addition to the standard EPP command elements, the <delete> command MUST contain a <host:delete> element that identifies the host namespace and the location of the host schema. The <host:delete> element SHALL contain the following child elements:
A <host:name> element that contains the fully qualified name of the host object to be deleted. Use getName and setName to get and set the element.

A host name object MUST NOT be deleted if the host object is associated with any other object. For example, if the host object is associated with a domain object, the host object MUST NOT be deleted until the existing association has been broken.
EPPReponse is the response associated with EPPHostDeleteCmd.
See Also:
  • Constructor Details

    • EPPHostDeleteCmd

      public EPPHostDeleteCmd()
      EPPHostDeleteCmd default constructor. The name is initialized to null. The name must be set before invoking encode.
    • EPPHostDeleteCmd

      public EPPHostDeleteCmd(String aTransId, String aName)
      EPPHostDeleteCmd constructor that takes the host name as an argument.
      Parameters:
      aTransId - Transaction Id associated with command.
      aName - Host name to delete.
  • Method Details

    • getNamespace

      public String getNamespace()
      Gets the EPP command Namespace associated with EPPHostDeleteCmd.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Specified by:
      getNamespace in interface EPPMessage
      Specified by:
      getNamespace in class EPPCommand
      Returns:
      EPPHostMapFactory.NS
    • getKey

      public String getKey()
      Gets the key for the host object, which is the host name.
      Overrides:
      getKey in class EPPCommand
      Returns:
      The host name if set; null otherwise.
    • doEncode

      protected Element doEncode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPHostDeleteCmd instance.
      Specified by:
      doEncode in class EPPDeleteCmd
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Root DOM Element representing the EPPHostDeleteCmd instance.
      Throws:
      EPPEncodeException - Unable to encode EPPHostDeleteCmd instance.
    • doDecode

      protected void doDecode(Element aElement) throws EPPDecodeException
      Decode the EPPHostDeleteCmd attributes from the aElement DOM Element tree.
      Specified by:
      doDecode in class EPPDeleteCmd
      Parameters:
      aElement - Root DOM Element to decode EPPHostDeleteCmd from.
      Throws:
      EPPDecodeException - Unable to decode aElement
    • getName

      public String getName()
      Gets the host name to delete.
      Returns:
      Host Name String instance if defined; null otherwise.
    • setName

      public void setName(String aName)
      Sets the host name to delete.
      Parameters:
      aName - Host Name
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPHostDeleteCmd with this instance.
      Overrides:
      equals in class EPPDeleteCmd
      Parameters:
      aObject - Object to compare with.
      Returns:
      true when equal; false otherwise.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPHostDeleteCmd.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPCommand
      Returns:
      clone of EPPHostDeleteCmd
      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 EPPCommand
      Returns:
      Indented XML String if successful; ERROR otherwise.