Class EPPProtocolExtension

java.lang.Object
com.verisign.epp.codec.gen.EPPProtocolExtension
All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, Cloneable

public abstract class EPPProtocolExtension extends Object implements EPPMessage
Represents an EPPProtocol extension that is sent by an EPP Client and received by an EPP Server. An EPPProtocolExtension can be encoded and decoded by EPPCodec.

Every EPPProtocol extension must extend EPPProtocolExtension and implement the Template Method Design Pattern doGenEncode and doGenDecode methods. An EPPProtocolExtension client will call encode or decode, which in turn will call doGenEncode or doGenDecode, respectively. There is one derived EPPProtocolExtension for each type of extension defined in the general EPP Specification.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Allocates a new EPPProtocolExtension with default attribute values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPProtocolExtension.
    void
    decode(Element aElement)
    decode EPPProtocolExtension from a DOM element tree.
    protected abstract void
    doDecode(Element aElement)
    Decodes the atributes of a general extension of EPPProtocolExtension.
    protected abstract Element
    doEncode(Document aDocument)
    Encodes the atributes of a protocol extension of EPPProtocolExtension.
    encode(Document aDocument)
    encode EPPProtocolExtension into a DOM element tree.
    boolean
    equals(Object aObject)
    implements a deep EPPProtocolExtension compare.
    abstract String
    Gets the EPP namespace associated with the EPPProtocolExtension.
    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 Details

    • EPPProtocolExtension

      public EPPProtocolExtension()
      Allocates a new EPPProtocolExtension with default attribute values.
  • Method Details

    • getNamespace

      public abstract String getNamespace()
      Gets the EPP namespace associated with the EPPProtocolExtension.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Specified by:
      getNamespace in interface EPPMessage
      Returns:
      Namespace URI associated with the EPPProtocolExtension.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode EPPProtocolExtension into a DOM element tree. The <extensiongt; element is created and the attribute nodes are appending as children. This method is a Template Method in the Template Method Design Pattern.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document to create elements from
      Returns:
      <extensiongt; root element tree.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode EPPProtocolExtension from a DOM element tree. The "extension" element needs to be the value of the aElement argument. This method is a Template Method in the Template Method Design Pattern.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - <extensiongt; root element tree.
      Throws:
      EPPDecodeException - Error decoding the DOM element tree.
    • equals

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

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

      protected abstract Element doEncode(Document aDocument) throws EPPEncodeException
      Encodes the atributes of a protocol extension of EPPProtocolExtension. An example of a protocol extension is EPPAlert. encode is a Template Method and this method is a Primitive Operation within the Template Method Design Pattern.
      Parameters:
      aDocument - DOM document used as a factory of DOM objects.
      Returns:
      instance root DOM element along with attribute child nodes.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • doDecode

      protected abstract void doDecode(Element aElement) throws EPPDecodeException
      Decodes the atributes of a general extension of EPPProtocolExtension. An example of a protocol extension is EPPAlert. decode is a Template Method and this method is a Primitive Operation within the Template Method Design Pattern.
      Parameters:
      aElement - root DOM element associated with instance
      Throws:
      EPPDecodeException - Error decoding the DOM element tree.