Package com.verisign.epp.codec.gen
Class EPPResponse
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPResponse
-
- All Implemented Interfaces:
EPPCodecComponent
,EPPMessage
,java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
EPPBalanceInfoResp
,EPPContactCheckResp
,EPPContactCreateResp
,EPPContactInfoResp
,EPPContactPendActionMsg
,EPPContactTransferResp
,EPPDefRegCheckResp
,EPPDefRegCreateResp
,EPPDefRegInfoResp
,EPPDefRegRenewResp
,EPPDefRegTransferResp
,EPPDomainCheckResp
,EPPDomainCreateResp
,EPPDomainInfoResp
,EPPDomainPendActionMsg
,EPPDomainRenewResp
,EPPDomainTransferResp
,EPPEmailFwdCheckResp
,EPPEmailFwdCreateResp
,EPPEmailFwdInfoResp
,EPPEmailFwdPendActionMsg
,EPPEmailFwdRenewResp
,EPPEmailFwdTransferResp
,EPPHostCheckResp
,EPPHostCreateResp
,EPPHostInfoResp
,EPPHostPendActionMsg
,EPPIdnTableCheckResp
,EPPIdnTableInfoResp
,EPPLowBalancePollResponse
,EPPMaintenanceInfoResp
,EPPNameVerificationCheckResp
,EPPNameVerificationCreateResp
,EPPNameVerificationInfoResp
,EPPNameVerificationPendActionMsg
,EPPNameWatchCreateResp
,EPPNameWatchInfoResp
,EPPNameWatchRenewResp
,EPPNameWatchTransferResp
,EPPOrgCheckResp
,EPPOrgCreateResp
,EPPOrgInfoResp
,EPPOrgPendActionMsg
,EPPRegistryCheckResp
,EPPRegistryCheckResp
,EPPRegistryCreateResp
,EPPRegistryCreateResp
,EPPRegistryInfoResp
,EPPRegistryInfoResp
,EPPRegistryUpdateResp
,EPPRgpPollResponse
,EPPValidateCheckResp
public class EPPResponse extends java.lang.Object implements EPPMessage
Represents an EPP response that is send by an EPP Server and received by an EPP Client. AnEPPResponse
can be encoded and decoded byEPPCodec
. Every EPP response contain the following:
- transaction id - Mirror of the transaction id set in the associated
EPPCommand
- results - One or more
EPPResult
instances.
EPPResponse
is a concrete class that can be extended by the Command Mapping responses. A Command Mapping response must override the Template Design PatterndoEncode
anddoDecode
methods.EPPResponse
provides a defaultdoEncode
anddoDecode
implementation that does nothing. AnEPPResponse
client will callencode
ordecode
, which in turn will calldoEncode
ordoDecode
, respectively.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_EXTENSION
XML tag name for unspecified extension element.static java.lang.String
ELM_MESSAGE_QUEUE
XML tag name response extension data, which is defined byEPPResponse
derived classes.static java.lang.String
ELM_MESSAGE_QUEUE_QDATE
XML tag name for the "qDate" child element to the <msgQ> elementstatic java.lang.String
ELM_NAME
XML root tag name forEPPReponse
.static java.lang.String
ELM_RESPONSE_DATA
XML tag name response extension data, which is defined byEPPResponse
derived classes.protected java.util.Vector
extensions
Extension objects associated with the response.static java.lang.String
TRANSFER_CLIENT_APPROVED
Transfer status constant - clientApprovedstatic java.lang.String
TRANSFER_CLIENT_CANCELLED
Transfer status constant - clientCancelledstatic java.lang.String
TRANSFER_CLIENT_REJECTED
Transfer status constant - clientRejectedstatic java.lang.String
TRANSFER_PENDING
Transfer status constant - pendingstatic java.lang.String
TRANSFER_SERVER_APPROVED
Transfer status constant - serverApprovedstatic java.lang.String
TRANSFER_SERVER_CANCELLED
Transfer status constant - serverCancelled
-
Constructor Summary
Constructors Constructor Description EPPResponse()
Allocates a newEPPResponse
with default attribute values.EPPResponse(EPPTransId aTransId)
Allocates a newEPPResponse
setting the transaction id.EPPResponse(EPPTransId aTransId, EPPResult aResult)
Allocates a newEPPResponse
setting the transaction id and an individual result.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addExtension(EPPCodecComponent aExtension)
Adds an extension object.java.lang.Object
clone()
CloneEPPResponse
.void
decode(org.w3c.dom.Element aElement)
decodeEPPResponse
from a DOM element tree.protected void
doDecode(org.w3c.dom.Element aElement)
Decodes the attributes of the concreteEPPResponse
and must be overridden byEPPResponse
derived classes.protected org.w3c.dom.Element
doEncode(org.w3c.dom.Document aDocument)
Encodes the attributes of the concreteEPPResponse
and must be overridden byEPPResponse
derived classes.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encodeEPPResponse
into a DOM element tree.boolean
equals(java.lang.Object aObject)
implements a deepEPPResponse
compare.java.util.Set<java.lang.String>
findDuplicateExtNamespaces()
Find the set of duplicate EPP extension XML namespaces based on the list of EPP extensions set in the response.java.util.Set<java.lang.String>
findExtNamespaces(java.util.List<java.lang.String> aFilterExtNamespaces)
Find the set of unique EPP extension XML namespaces based on the list of EPP extensions set in the response.java.util.Set<java.lang.String>
findExtNamespaceSuffixes(java.util.List<java.lang.String> aFilterExtNamespaceSuffixes)
Find the set of unique EPP extension XML namespace suffixes based on the list of EPP extensions set in the response and the optional use of a list of XML namespace suffixes to filter.java.util.Set<java.lang.String>
findUnsupportedExtNamespaces(java.util.List<java.lang.String> aSupportedExtNamespaces)
Find the set of unsupported EPP extension XML namespaces based the passed in supported extension XML namespaces and on the list of EPP extensions set in the response.java.util.Set<java.lang.String>
findUnsupportedExtNamespaceSuffixes(java.util.List<java.lang.String> aSupportedExtNamespaceSuffixes)
Find the set of unsupported EPP extensions based on passing the list of supported extension XML namespace suffixes and the list of EPP extensions set in the command.EPPCodecComponent
getExtension(java.lang.Class aExtensionClass)
Gets the extension object with the specified class.EPPCodecComponent
getExtension(java.lang.Class aExtensionClass, boolean aFailOnDuplicate)
Gets the response extension object with the specified class with the option to fail when a duplicate extension is found.java.util.Vector
getExtensions()
Gets the extensions.java.lang.Long
getMessageQueue()
Deprecated.As of EPP 1.0, replaced withgetMsgQueueCount()
EPPMsgQueue
getMsgQueue()
Gets the response message queue object.java.lang.Long
getMsgQueueCount()
Convenience method for getting the message queue count attribute.java.util.Date
getMsgQueueDate()
Convenience method for getting the message queue date attribute.java.lang.String
getMsgQueueMsg()
Convenience method for getting the message queue message attribute.java.lang.String
getNamespace()
Gets the EPP namespace associated with theEPPResponse
.java.util.Date
getQDate()
Deprecated.As of EPP 1.0, replaced withgetMsgQueueDate()
EPPResult
getResult()
Gets the first result in the response.java.util.Vector
getResults()
Gets the Vector of results associated with theEPPResponse
.EPPTransId
getTransId()
Gets the Transaction Id associated with theEPPResponse
.java.lang.String
getType()
Gets the EPP response extension type name ornull
if there is no extension.boolean
hasExtension(java.lang.Class aExtensionClass)
Does the response have an extension object of a specified class? If so, the extension object can be retrieved with a call togetExtensions(Class)
.boolean
hasExtensions()
Does the response have an extension objects? If so, the command extension objects can be retrieved with a call togetExtensions
.boolean
hasMessageQueue()
Deprecated.As of EPP 1.0, replaced withhasMsgQueue()
.boolean
hasMsgQueue()
Does the response have a message queue object? If so, the response message queue object can be retrieved with a call togetMsgQueue
.boolean
hasResultCode(int aCode)
Does the response have a result with the specified result code?boolean
isSuccess()
Does the response have a success status?isSuccess
will check that there is only oneEPPResult
defined and the result code is set to a value of 10??.void
setExtension(EPPCodecComponent aExtension)
Deprecated.Replaced byaddExtension(EPPCodecComponent)
.void
setExtensions(java.util.Vector aExtensions)
Sets the response extension objects.void
setMsgQueue(EPPMsgQueue aMsgQueue)
Sets the response message queue object.void
setResult(int aCode)
Sets an individual result for the response with a result code.void
setResult(int aCode, java.lang.String aText)
Sets an individual result for the response with a result code and the result text.void
setResult(int aCode, java.lang.String aText, java.util.Vector aValues)
Sets an individual result for the response with a result code, the result text, and a Vector ofString
values.void
setResult(EPPResult aResult)
Sets an individual result for the response with anEPPResult
instance.void
setResults(java.util.Vector someResults)
Sets the result(s) of the response as a Vector ofEPPResult
instances.void
setTransId(EPPTransId aTransId)
Sets the Transaction Id associated with theEPPResponse
.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
TRANSFER_CLIENT_APPROVED
public static final java.lang.String TRANSFER_CLIENT_APPROVED
Transfer status constant - clientApproved- See Also:
- Constant Field Values
-
TRANSFER_CLIENT_CANCELLED
public static final java.lang.String TRANSFER_CLIENT_CANCELLED
Transfer status constant - clientCancelled- See Also:
- Constant Field Values
-
TRANSFER_CLIENT_REJECTED
public static final java.lang.String TRANSFER_CLIENT_REJECTED
Transfer status constant - clientRejected- See Also:
- Constant Field Values
-
TRANSFER_PENDING
public static final java.lang.String TRANSFER_PENDING
Transfer status constant - pending- See Also:
- Constant Field Values
-
TRANSFER_SERVER_APPROVED
public static final java.lang.String TRANSFER_SERVER_APPROVED
Transfer status constant - serverApproved- See Also:
- Constant Field Values
-
TRANSFER_SERVER_CANCELLED
public static final java.lang.String TRANSFER_SERVER_CANCELLED
Transfer status constant - serverCancelled- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag name forEPPReponse
.- See Also:
- Constant Field Values
-
ELM_MESSAGE_QUEUE
public static final java.lang.String ELM_MESSAGE_QUEUE
XML tag name response extension data, which is defined byEPPResponse
derived classes.- See Also:
- Constant Field Values
-
ELM_RESPONSE_DATA
public static final java.lang.String ELM_RESPONSE_DATA
XML tag name response extension data, which is defined byEPPResponse
derived classes.- See Also:
- Constant Field Values
-
ELM_MESSAGE_QUEUE_QDATE
public static final java.lang.String ELM_MESSAGE_QUEUE_QDATE
XML tag name for the "qDate" child element to the <msgQ> element- See Also:
- Constant Field Values
-
ELM_EXTENSION
public static final java.lang.String ELM_EXTENSION
XML tag name for unspecified extension element.- See Also:
- Constant Field Values
-
extensions
protected java.util.Vector extensions
Extension objects associated with the response. The extension object is associated with a unique XML Namespace, XML Schema, and can be any simple or complex object that implements theEPPCodecComponent
interface.
-
-
Constructor Detail
-
EPPResponse
public EPPResponse()
Allocates a newEPPResponse
with default attribute values. The defaults include the following:
- transaction id is set to
null
. This attribute must be set usingsetTransId
before invokingencode
. - extensions is set to
null
. This attribute is optional. - message queue is set to
null
. This attribute is optional. - results - Set to an individual successful result
- transaction id is set to
-
EPPResponse
public EPPResponse(EPPTransId aTransId)
Allocates a newEPPResponse
setting the transaction id. The results attribute will default to an individual successful result. Both the extensions and the message queue will be set tonull
.- Parameters:
aTransId
- Transaction id associated with the response.
-
EPPResponse
public EPPResponse(EPPTransId aTransId, EPPResult aResult)
Allocates a newEPPResponse
setting the transaction id and an individual result. Both the extensions and the message queue will be set tonull
.- Parameters:
aTransId
- Transaction id associated with the response.aResult
- Result to associate with the response.
-
-
Method Detail
-
getType
public java.lang.String getType()
Gets the EPP response extension type name ornull
if there is no extension.- Returns:
- Extension type name if defined;
null
otherwise. For example,getType
will return EPPDomainCheckResp.ELM_NAME for a EPPDomainCheckResp instance.
-
getTransId
public EPPTransId getTransId()
Gets the Transaction Id associated with theEPPResponse
. This should include theEPPCommand
client specified transaction id, and a server generated transaction id.- Returns:
- EPPTransId instance if defined;
null
otherwise.
-
setTransId
public void setTransId(EPPTransId aTransId)
Sets the Transaction Id associated with theEPPResponse
. This should include theEPPCommand
client specified transaction id, and a server generated transaction id.- Parameters:
aTransId
- Response transaction id
-
getNamespace
public java.lang.String getNamespace()
Gets the EPP namespace associated with theEPPResponse
. A baseEPPResponse
instance will have the EPP namespace equal toEPPCodec.NS
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Specified by:
getNamespace
in interfaceEPPMessage
- Returns:
- Namespace URI associated with the
EPPResponse
.
-
getResults
public java.util.Vector getResults()
Gets the Vector of results associated with theEPPResponse
.- Returns:
- Vector of
EPPResult
instances.
-
getResult
public EPPResult getResult()
Gets the first result in the response. UsegetResults()
to get all results associated with the response.- Returns:
- The first result if defined;
null
otherwise
-
isSuccess
public boolean isSuccess()
Does the response have a success status?isSuccess
will check that there is only oneEPPResult
defined and the result code is set to a value of 10??.- Returns:
true
if is success;false
otherwise.
-
hasResultCode
public boolean hasResultCode(int aCode)
Does the response have a result with the specified result code?- Parameters:
aCode
- Result code to scan for- Returns:
true
if the result code exists in response;false
otherwise.
-
setResult
public void setResult(int aCode)
Sets an individual result for the response with a result code. The EPP Specification defines the range of the result codes to be 1000 - 9999.
setResult(int)
will set the results to a Vector of oneEPPResult
with the result code set toaCode
.
If the code is set to one of the pre-defined result codes, the result text will be set to the matching en value, as defined in the EPP Specification; otherwise the text is set to the empty string "".- Parameters:
aCode
- Result code (1000-9999)
-
setResult
public void setResult(int aCode, java.lang.String aText)
Sets an individual result for the response with a result code and the result text. The EPP Specification defines the range of the result codes to be 1000 - 9999.
setResult(int)
will set the results to a Vector of oneEPPResult
with the result code set toaCode
, and the result text set toaText
. The language of the text will default to "en".- Parameters:
aCode
- Result code (1000-9999)aText
- Result text in the default "en" language.
-
setResult
public void setResult(int aCode, java.lang.String aText, java.util.Vector aValues)
Sets an individual result for the response with a result code, the result text, and a Vector ofString
values. This method should only be called if there is an error, since values are not included with successful results. The EPP Specification defines the range of the result codes to be 1000 - 9999.
setResult(int)
will set the results to a Vector of oneEPPResult
with the result code set toaCode
, the result text set toaText
, and the values set tosomeValues
. The language of the text will default to "en".- Parameters:
aCode
- Result code (1000-9999)aText
- Result text in the default "en" language.aValues
- Vector ofEPPValue
orEPPExtValue
instances
-
setResult
public void setResult(EPPResult aResult)
Sets an individual result for the response with anEPPResult
instance. This method allows for specification of result attributes like the text language.- Parameters:
aResult
- Individual response result.
-
setResults
public void setResults(java.util.Vector someResults)
Sets the result(s) of the response as a Vector ofEPPResult
instances. This method should only be used if there is an error, since only errors can contain more than one result.- Parameters:
someResults
- Vector ofEPPResult
instances
-
hasExtension
public boolean hasExtension(java.lang.Class aExtensionClass)
Does the response have an extension object of a specified class? If so, the extension object can be retrieved with a call togetExtensions(Class)
.- Parameters:
aExtensionClass
- Specific extension class to look for- Returns:
true
if the extension object exists;false
otherwise.
-
getExtension
public EPPCodecComponent getExtension(java.lang.Class aExtensionClass)
Gets the extension object with the specified class. The extension object is an unspecified element in the EPP Specifications. To create an extension object, an XML Schema for the extension object must exist with a unique XML Namespace. A customEPPExtensionFactory
must be created for the extension, which returns an instance ofEPPCodecComponent
for an instance of an extension object in the EPP Response.- Parameters:
aExtensionClass
- of desired extension- Returns:
- Concrete
EPPCodecComponent
associated with the response if exists;null
otherwise.
-
getExtension
public EPPCodecComponent getExtension(java.lang.Class aExtensionClass, boolean aFailOnDuplicate) throws EPPDuplicateExtensionException
Gets the response extension object with the specified class with the option to fail when a duplicate extension is found. The extension object is an unspecified element in the EPP Specifications. To create an extension object, an XML Schema for the extension object must exist with a unique XML Namespace. A customEPPExtensionFactory
must be created for the extension, which returns an instance ofEPPCodecComponent
for an instance of an extension object in theEPPResponse
.- Parameters:
aExtensionClass
-Class
of desired extensionaFailOnDuplicate
- ThrowEPPDuplicateExtensionException
iftrue
and a duplicate extension is found- Returns:
- Concrete
EPPCodecComponent
associated with the command if exists;null
otherwise. - Throws:
EPPDuplicateExtensionException
- If a duplicate extension is found with the extension included in the extension
-
setExtension
@Deprecated public void setExtension(EPPCodecComponent aExtension)
Deprecated.Replaced byaddExtension(EPPCodecComponent)
. This method will add the extension as is done inaddExtension(EPPCodecComponent)
.Sets a response extension object. The extension object is an unspecified element in the EPP Specifications. The unspecified element will be encoded under the <unspec> element of the EPP Response.- Parameters:
aExtension
- response extension object associated with the response
-
addExtension
public void addExtension(EPPCodecComponent aExtension)
Adds an extension object. The extension object is an unspecified element in the EPP Specifications. The unspecified element will be encoded under the <unspec> element of the EPP Response.- Parameters:
aExtension
- extension object associated with the response
-
hasExtensions
public boolean hasExtensions()
Does the response have an extension objects? If so, the command extension objects can be retrieved with a call togetExtensions
.- Returns:
true
if there are extension objects;false
otherwise.
-
getExtensions
public java.util.Vector getExtensions()
Gets the extensions. The extension objects are an unspecified elements in the EPP Specification. To create an extension object, an XML Schema for the extension object must exist with a unique XML Namespace. A customEPPExtensionFactory
must be created for the extension, which returns an instance ofEPPCodecComponent
for an instance of an extension object in the EPP Response.- Returns:
Vector
of concreteEPPCodecComponent
associated with the response if exists;null
otherwise.
-
setExtensions
public void setExtensions(java.util.Vector aExtensions)
Sets the response extension objects. The extension objects are an unspecified element in the EPP Specifications. The unspecified element will be encoded under the <unspec> element of the EPP Response.- Parameters:
aExtensions
- command extension objects associated with the command
-
findDuplicateExtNamespaces
public java.util.Set<java.lang.String> findDuplicateExtNamespaces()
Find the set of duplicate EPP extension XML namespaces based on the list of EPP extensions set in the response.- Returns:
Set
of duplicate EPP extension XML namespaces;null
otherwise.
-
findUnsupportedExtNamespaces
public java.util.Set<java.lang.String> findUnsupportedExtNamespaces(java.util.List<java.lang.String> aSupportedExtNamespaces)
Find the set of unsupported EPP extension XML namespaces based the passed in supported extension XML namespaces and on the list of EPP extensions set in the response.- Parameters:
aSupportedExtNamespaces
- List of EPP extensions to scan for unsupported XML namespaces. Passnull
for no supported extensions.- Returns:
Set
of unsupported EPP extension XML namespaces;null
otherwise.
-
findUnsupportedExtNamespaceSuffixes
public java.util.Set<java.lang.String> findUnsupportedExtNamespaceSuffixes(java.util.List<java.lang.String> aSupportedExtNamespaceSuffixes)
Find the set of unsupported EPP extensions based on passing the list of supported extension XML namespace suffixes and the list of EPP extensions set in the command.- Parameters:
aSupportedExtNamespaceSuffixes
- List of EPP extensions to scan for unsupported XML namespace suffixes. Passnull
for no supported extensions.- Returns:
Set
of unsupported EPP extension XML namespace suffixes;null
otherwise.
-
findExtNamespaces
public java.util.Set<java.lang.String> findExtNamespaces(java.util.List<java.lang.String> aFilterExtNamespaces)
Find the set of unique EPP extension XML namespaces based on the list of EPP extensions set in the response.- Parameters:
aFilterExtNamespaces
- Filter extension namespaces from the returned set. Set tonull
for no filtering.- Returns:
Set
of unique EPP extension XML namespaces.
-
findExtNamespaceSuffixes
public java.util.Set<java.lang.String> findExtNamespaceSuffixes(java.util.List<java.lang.String> aFilterExtNamespaceSuffixes)
Find the set of unique EPP extension XML namespace suffixes based on the list of EPP extensions set in the response and the optional use of a list of XML namespace suffixes to filter.- Parameters:
aFilterExtNamespaceSuffixes
- Filter extension namespace suffixes from the returned set. Set tonull
for no filtering.- Returns:
Set
of unique EPP extension XML namespace suffixes.
-
hasMessageQueue
@Deprecated public boolean hasMessageQueue()
Deprecated.As of EPP 1.0, replaced withhasMsgQueue()
. This method will returntrue
if a message queue object exists that has a non-null
message count.Does the response have a message queue object? If so, the response message queue object can be retrieved with a call togetMessageQueue
.- Returns:
true
if this is an message queue object;false
otherwise.
-
getMessageQueue
@Deprecated public java.lang.Long getMessageQueue()
Deprecated.As of EPP 1.0, replaced withgetMsgQueueCount()
Gets the response message queue object. Currently the message queue object is aLong
count of the number of messages.- Returns:
- Number of queue messages if defined;
null
otherwise.
-
getQDate
@Deprecated public java.util.Date getQDate()
Deprecated.As of EPP 1.0, replaced withgetMsgQueueDate()
Get the response message queue date.- Returns:
- message queue date if defined;
null
otherwise.
-
hasMsgQueue
public boolean hasMsgQueue()
Does the response have a message queue object? If so, the response message queue object can be retrieved with a call togetMsgQueue
.- Returns:
true
if this is an message queue object;false
otherwise.- Since:
- EPP 1.0
-
setMsgQueue
public void setMsgQueue(EPPMsgQueue aMsgQueue)
Sets the response message queue object.- Parameters:
aMsgQueue
- queue object- Since:
- EPP 1.0
-
getMsgQueue
public EPPMsgQueue getMsgQueue()
Gets the response message queue object.- Returns:
- Message queue object if defined;
null
otherwise.
-
getMsgQueueCount
public java.lang.Long getMsgQueueCount()
Convenience method for getting the message queue count attribute. This is equivalent to getting the message queue object bygetMsgQueue()
and than callingEPPMsgQueue.getCount()
.- Returns:
- Count of queue messages if defined;
null
otherwise. - Since:
- EPP 1.0
-
getMsgQueueDate
public java.util.Date getMsgQueueDate()
Convenience method for getting the message queue date attribute.- Returns:
- message queue date if defined;
null
otherwise. - Since:
- EPP 1.0
-
getMsgQueueMsg
public java.lang.String getMsgQueueMsg()
Convenience method for getting the message queue message attribute.- Returns:
- message queue message if defined;
null
otherwise. - Since:
- EPP 1.0
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encodeEPPResponse
into a DOM element tree. The <response> 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 interfaceEPPCodecComponent
- Parameters:
aDocument
- Used as a document factory- Returns:
- <response> root element tree.
- Throws:
EPPEncodeException
- Error encoding the DOM element tree.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException, EPPComponentNotFoundException
decodeEPPResponse
from a DOM element tree. The "response" element needs to be the value of theaElement
argument. This method is a Template Method in the Template Method Design Pattern.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- <response> root element tree.- Throws:
EPPDecodeException
- Error decoding the DOM element tree.EPPComponentNotFoundException
- An extension component could not be found
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPResponse
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPResponse
instance to compare with- Returns:
true
if equal;false
otherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPResponse
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPResponse
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
doEncode
protected org.w3c.dom.Element doEncode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encodes the attributes of the concreteEPPResponse
and must be overridden byEPPResponse
derived classes. The default implementation is to do nothing, sinceEPPResponse
is a concrete class.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 void doDecode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decodes the attributes of the concreteEPPResponse
and must be overridden byEPPResponse
derived classes. The default implementation is to do nothing, sinceEPPResponse
is a concrete class.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.
-
-