Package com.verisign.epp.codec.gen
Class EPPProtocolExtension
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPProtocolExtension
-
- All Implemented Interfaces:
EPPCodecComponent,EPPMessage,java.io.Serializable,java.lang.Cloneable
public abstract class EPPProtocolExtension extends java.lang.Object implements EPPMessage
Represents an EPPProtocol extension that is sent by an EPP Client and received by an EPP Server. AnEPPProtocolExtensioncan be encoded and decoded byEPPCodec.
Every EPPProtocol extension must extendEPPProtocolExtensionand implement the Template Method Design PatterndoGenEncodeanddoGenDecodemethods. AnEPPProtocolExtensionclient will callencodeordecode, which in turn will calldoGenEncodeordoGenDecode, respectively. There is one derivedEPPProtocolExtensionfor each type of extension defined in the general EPP Specification.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EPPProtocolExtension()Allocates a newEPPProtocolExtensionwith default attribute values.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPProtocolExtension.voiddecode(org.w3c.dom.Element aElement)decodeEPPProtocolExtensionfrom a DOM element tree.protected abstract voiddoDecode(org.w3c.dom.Element aElement)Decodes the atributes of a general extension ofEPPProtocolExtension.protected abstract org.w3c.dom.ElementdoEncode(org.w3c.dom.Document aDocument)Encodes the atributes of a protocol extension ofEPPProtocolExtension.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)encodeEPPProtocolExtensioninto a DOM element tree.booleanequals(java.lang.Object aObject)implements a deepEPPProtocolExtensioncompare.abstract java.lang.StringgetNamespace()Gets the EPP namespace associated with theEPPProtocolExtension.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Method Detail
-
getNamespace
public abstract java.lang.String getNamespace()
Gets the EPP namespace associated with theEPPProtocolExtension.- Specified by:
getNamespacein interfaceEPPCodecComponent- Specified by:
getNamespacein interfaceEPPMessage- Returns:
- Namespace URI associated with the
EPPProtocolExtension.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionencodeEPPProtocolExtensioninto 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:
encodein interfaceEPPCodecComponent- 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(org.w3c.dom.Element aElement) throws EPPDecodeExceptiondecodeEPPProtocolExtensionfrom a DOM element tree. The "extension" element needs to be the value of theaElementargument. This method is a Template Method in the Template Method Design Pattern.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- <extensiongt; root element tree.- Throws:
EPPDecodeException- Error decoding the DOM element tree.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPProtocolExtensioncompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPProtocolExtensioninstance to compare with- Returns:
trueif equal;falseotherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPProtocolExtension.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPProtocolExtension - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
doEncode
protected abstract org.w3c.dom.Element doEncode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncodes the atributes of a protocol extension ofEPPProtocolExtension. An example of a protocol extension isEPPAlert.encodeis 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(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecodes the atributes of a general extension ofEPPProtocolExtension. An example of a protocol extension isEPPAlert.decodeis 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.
-
-