public class EPPResult extends java.lang.Object implements EPPCodecComponent
EPPResponse
. A result documents the success or failure of
command execution. If the command was processed successfully, only one
<result> element MUST be returned. If the command was not processed
successfully, multiple <result> elements MAY be returned to document
failure conditions. Each <result> element contains the following
attribute and child elements:Modifier and Type | Field and Description |
---|---|
static int |
ASSOC_PROHIBITS_OP
Object association prohibits operation
This response code MUST be returned when a server receives a command to transform an object that can not be completed due to dependencies on other objects that are associated with the target object. |
static int |
AUTHENTICATION_ERROR
Authentication error
This response code MUST be returned when a server notes an error when validating client credentials. |
static int |
AUTHENTICATION_ERROR_END
Authentication error; server closing connection
This response code MUST be returned when a server notes an error when validating client credentials and a server-defined limit on the number of allowable failures has been exceeded. |
static int |
AUTHORIZATION_ERROR
Authorization error
This response code MUST be returned when a server notes a client authorization error when executing a command. |
static int |
BILLING_ERROR
Billing failure
This response code MUST be returned when a server attempts to execute a billable operation and the command can not be completed due to a client billing failure. |
static int |
COMMAND_FAILED
Command failed
This response code MUST be returned when a server is unable to execute a command due to an internal server error that is not related to the protocol. |
static int |
COMMAND_FAILED_END
Command failed; server closing connection
This response code MUST be returned when a server receives a command that can not be completed due to an internal server error that is not related to the protocol. |
static int |
COMMAND_SYNTAX_ERROR
Command syntax error
This response code MUST be returned when a server receives an improperly formed command element. |
static int |
COMMAND_USE_ERROR
Command use error
This response code MUST be returned when a server receives a properly formed command element, but the command can not be executed due to a sequencing or context error. |
static int |
DATA_MGT_POLICY_VIOLATION
Data management policy violation
This response code MUST be returned when a server receives a command whose execution results in a violation of server data management policies. |
static java.lang.String |
DEFAULT_LANG
The default language of the result message "en".
|
static int |
INVALID_AUTHORIZATION_INFO
Invalid authorization information
This response code MUST be returned when a server receives invalid command authorization information required to confirm authorization to execute a command. |
static int |
MISSING_PARAMETER
Required parameter missing
This response code MUST be returned when a server receives a command for which a required parameter value has not been provided. |
static int |
NOT_RENEWABLE
Object is not eligible for renewal
This response code MUST be returned when a client attempts to renew an object that is not eligible for renewal in accordance with server policy. |
static int |
NOT_TRANSFERABLE
Object is not eligible for transfer
This response code MUST be returned when a client attempts to transfer an object that is not eligible for transfer in accordance with server policy. |
static int |
OBJECT_DOES_NOT_EXIST
Object does not exist
This response code MUST be returned when a server receives a command to query or transform an object that does not exist in the repository. |
static int |
OBJECT_EXISTS
Object exists
This response code MUST be returned when a server receives a command to create an object that already exists in the repository. |
static int |
OBJECT_NOT_PENDING_TRANSFER
Object not pending transfer
This response code MUST be returned when a server receives a command to confirm, reject, or cancel the transfer an object when no command has been made to transfer the object. |
static int |
OBJECT_PENDING_TRANSFER
Object pending transfer
This response code MUST be returned when a server receives a command to transfer an object that is pending transfer due to an earlier transfer request. |
static int |
PARAM_OUT_OF_RANGE
Parameter value range error
This response code MUST be returned when a server receives a command parameter whose value is outside the range of values specified by the protocol. |
static int |
PARAM_SYNTAX_ERROR
Parameter value syntax error
This response code MUST be returned when a server receives a command containing a parameter whose value is improperly formed. |
static int |
PARAM_VALUE_POLICY_ERROR
Parameter value policy error
This response code MUST be returned when a server receives a command containing a parameter value that is syntactically valid, but semantically invalid due to local policy. |
static int |
SESSION_LIMIT_END
Session limit exceeded; server closing connection
This response code MUST be retunred when a server receives a login command, and the command can not be completed because the client has exceeded a system-defined limit on the number of session that the client can establish. |
static int |
STATUS_PROHIBITS_OP
Object status prohibits operation
This response code MUST be returned when a server receives a command to transform an object that can not be completed due to server policy or business practices. |
static int |
SUCCESS
Command completed successfully
This is the usual response code for a successfully completed command that is not addressed by any other 1xxx-series response code. |
static int |
SUCCESS_END_SESSION
Command completed successfully; ending session
This response code MUST be returned when responding to a successful logout command |
static int |
SUCCESS_PENDING
Command completed successfully; action pending
This response code MUST be returned when responding to a command the requires offline activity before the requested action can be completed. |
static int |
SUCCESS_POLL_MSG
Command completed successfully; ack to dequeue
This response code MUST be returned when responding to a <poll> request command and a message has been retrieved from the server message queue. |
static int |
SUCCESS_POLL_NO_MSGS
Command completed successfully; no messages
This response code MUST be returned when responding to a poll request command and the server message queue is empty. |
static int |
UNIMPLEMENTED_COMMAND
Unimplemented command
This response code MUST be returned when a server receives a valid EPP command element that is not implemented by the server. |
static int |
UNIMPLEMENTED_EXTENSION
Unimplemented extension
This response code MUST be returned when a server receives a valid EPP command element that contains a protocol command extension that is not implemented by the server. |
static int |
UNIMPLEMENTED_OBJECT_SERVICE
Unimplemented object service
This response code MUST be returned when a server receives a command to operate on an object service that is not supported by the server. |
static int |
UNIMPLEMENTED_OPTION
Unimplemented option
This response code MUST be returned when a server receives a valid EPP command element that contains a protocol option that is not implemented by the server. |
static int |
UNIMPLEMENTED_VERSION
Unimplemented protocol version
This response code MUST be returned when a server receives a command element specifying a protocol version that is not implemented by the server. |
static int |
UNKNOWN_COMMAND
Unknown command
This response code MUST be returned when a server receives a command element that is not defined by EPP. |
Constructor and Description |
---|
EPPResult()
Allocates a new
EPPResult with default attribute values. |
EPPResult(int aCode)
Allocates a new
EPPResult with a result code. |
EPPResult(int aCode,
java.lang.String aMessage)
Allocates a new
EPPResult with a result code and result
message. |
EPPResult(int aCode,
java.lang.String aMessage,
java.lang.String aLang)
Allocates a new
EPPResult with a result code, result
message, and result message language. |
EPPResult(int aCode,
java.lang.String aMessage,
java.lang.String aLang,
java.util.Vector aValues)
Allocates a new
EPPResult with all of the attribute set
with the arguments. |
EPPResult(int aCode,
java.lang.String aMessage,
java.util.Vector aValues)
Allocates a new
EPPResult with a result code, result
message, and result values. |
Modifier and Type | Method and Description |
---|---|
void |
addExtValue(EPPExtValue aExtValue)
Adds an
EPPExtValue instance to the list of client error
elements. |
void |
addExtValueReason(java.lang.String aReason)
Adds an
extValue reason, which will set the value, XML
namespace, and XML prefix to default values. |
void |
addValue(EPPValue aValue)
Adds an
EPPValue instance to the list of client error
elements. |
void |
addValue(java.lang.String aValue)
Adds an individual XML value to the list of XML values.
|
java.lang.Object |
clone()
Clone
EPPResult . |
void |
decode(org.w3c.dom.Element aElement)
decode
EPPResult from a DOM element tree. |
org.w3c.dom.Element |
encode(org.w3c.dom.Document aDocument)
encode
EPPResult into a DOM element tree. |
boolean |
equals(java.lang.Object aObject)
implements a deep
EPPResult compare. |
java.util.Vector |
getAllValues()
Gets a
Vector of all of the EPPValue and
EPPExtValue defined in the result. |
int |
getCode()
Gets the result code.
|
java.util.Vector |
getExtValues()
Gets the
EPPExtValue instances associated with the result. |
java.lang.String |
getLang()
Gets the message language of the result.
|
java.lang.String |
getMessage()
Gets the message of the result.
|
java.lang.String |
getNamespace()
Returns the XML namespace associated with the
EPPCodecComponent . |
java.util.Vector |
getStrValues()
Gets the value strings associated with the result.
|
java.util.Vector |
getValues()
Gets the
EPPValue instances associated with the result. |
boolean |
isSuccess()
Was the result a succcess?
|
void |
setAllValues(java.util.Vector aValues)
Sets the value and extValue lists based on a single
Vector
of EPPValue or EPPExtValue instances. |
void |
setCode(int aCode)
Sets the result code.
|
void |
setCode(int aCode,
boolean aUseDefaultMessage)
Sets the result code and the default en message associated with the
result code if
aUseDefaultMessage is set to
true ; otherwise only the result code is set. |
void |
setExtValueReasons(java.util.Vector aReasons)
Sets a
Vector of extValue reasons. |
void |
setExtValues(EPPExtValue[] aExtValues)
Sets the extended values associated with the result using an array.
|
void |
setExtValues(java.util.Vector aExtValues)
Sets the extValue's associated with the result.
|
void |
setLang(java.lang.String aLang)
Sets the message language of the result.
|
void |
setMessage(java.lang.String aMessage)
Sets the message of the result in the default language of "en".
|
void |
setMessage(java.lang.String aMessage,
java.lang.String aLang)
Sets the message of the result along with the language of the message.
|
void |
setValues(EPPValue[] aValues)
Sets the values associated with the result.
|
void |
setValues(java.util.Vector aValues)
Sets the values associated with the result.
|
boolean |
shouldCloseSession()
Should the EPP session be closed based on the result code?
|
java.lang.String |
toString()
Implementation of
Object.toString , which will result in an
indented XML String representation of the concrete
EPPCodecComponent . |
public static final java.lang.String DEFAULT_LANG
public static final int SUCCESS
public static final int SUCCESS_PENDING
public static final int SUCCESS_POLL_NO_MSGS
public static final int SUCCESS_POLL_MSG
public static final int SUCCESS_END_SESSION
public static final int UNKNOWN_COMMAND
public static final int COMMAND_SYNTAX_ERROR
public static final int COMMAND_USE_ERROR
public static final int MISSING_PARAMETER
public static final int PARAM_OUT_OF_RANGE
public static final int PARAM_SYNTAX_ERROR
public static final int UNIMPLEMENTED_VERSION
public static final int UNIMPLEMENTED_COMMAND
public static final int UNIMPLEMENTED_OPTION
public static final int UNIMPLEMENTED_EXTENSION
public static final int BILLING_ERROR
public static final int NOT_RENEWABLE
public static final int NOT_TRANSFERABLE
public static final int AUTHENTICATION_ERROR
public static final int AUTHORIZATION_ERROR
public static final int INVALID_AUTHORIZATION_INFO
public static final int OBJECT_PENDING_TRANSFER
public static final int OBJECT_NOT_PENDING_TRANSFER
public static final int OBJECT_EXISTS
public static final int OBJECT_DOES_NOT_EXIST
public static final int STATUS_PROHIBITS_OP
public static final int ASSOC_PROHIBITS_OP
public static final int PARAM_VALUE_POLICY_ERROR
public static final int UNIMPLEMENTED_OBJECT_SERVICE
public static final int DATA_MGT_POLICY_VIOLATION
public static final int COMMAND_FAILED
public static final int COMMAND_FAILED_END
public static final int AUTHENTICATION_ERROR_END
public static final int SESSION_LIMIT_END
public EPPResult()
EPPResult
with default attribute values.
The defaults are set to:SUCCESS
null
public EPPResult(int aCode)
EPPResult
with a result code. The other
attributes will be set as follows:null
aCode
if code is a
pre-defined code; otherwise is set to null
.
DEFAULT_LANG
.
aCode
- result code that must be in the range 1000-9999.public EPPResult(int aCode, java.lang.String aMessage)
EPPResult
with a result code and result
message. The other attributes will be set as follows:null
DEFAULT_LANG
aCode
- result code that must be in the range 1000-9999.aMessage
- result message in the default "en" language.public EPPResult(int aCode, java.lang.String aMessage, java.lang.String aLang)
EPPResult
with a result code, result
message, and result message language. The other attributes will be
set as follows:null
aCode
- result code that must be in the range 1000-9999.aMessage
- result message in the default "en" language.aLang
- Language of result message.public EPPResult(int aCode, java.lang.String aMessage, java.util.Vector aValues)
EPPResult
with a result code, result
message, and result values. aCode
- result code that must be in the range 1000-9999.aMessage
- result message in the default "en" language.aValues
- Vector of either EPPValue
or
EPPExtValue
instances.public EPPResult(int aCode, java.lang.String aMessage, java.lang.String aLang, java.util.Vector aValues)
EPPResult
with all of the attribute set
with the arguments. This method should only be called for error
results, since successful results don't include values.aCode
- result code that must be in the range 1000-9999.aMessage
- result message in the default "en" language.aLang
- Language of result message.aValues
- Vector of either EPPValue
or
EPPExtValue
instances.public void addValue(java.lang.String aValue)
aValue
- XML String
value. For example,
"<epp:login/>".public void addValue(EPPValue aValue)
EPPValue
instance to the list of client error
elements. This method allows for the specification of an XML prefix
and XML namespace for the error value.aValue
- EPPValue
instance that includes the client
element XML and its associated XML prefix and namespace.public void addExtValueReason(java.lang.String aReason)
extValue
reason, which will set the value, XML
namespace, and XML prefix to default values. The default values will
not specify a client element that caused the error. The reason is free
form text that can be used to provide more information about the error
from the server business logic.aReason
- Human-readable message that describes the reason for the
error.public void addExtValue(EPPExtValue aExtValue)
EPPExtValue
instance to the list of client error
elements. This method allows for the specification of an XML prefix
and XML namespace for the error value and a reason.aExtValue
- EPPExtValue
instance that includes the
client element XML and its associated XML prefix and namespace.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EPPResult
.clone
in interface EPPCodecComponent
clone
in class java.lang.Object
EPPResult
java.lang.CloneNotSupportedException
- standard Object.clone exceptionpublic void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
EPPResult
from a DOM element tree. The
aElement
argument needs to be the <result> element.decode
in interface EPPCodecComponent
aElement
- The <result> XML element.EPPDecodeException
- Error decoding the DOM element tree.public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
EPPResult
into a DOM element tree. The result is
created and the attribute nodes are appended as children.encode
in interface EPPCodecComponent
aDocument
- DOCUMENT ME!EPPEncodeException
- Error encoding the DOM element tree.public boolean equals(java.lang.Object aObject)
EPPResult
compare.equals
in class java.lang.Object
aObject
- EPPResult
instance to compare withtrue
if equal; false
otherwisepublic int getCode()
public java.lang.String getLang()
public java.lang.String getMessage()
getLang
.String
describing the result.public java.util.Vector getValues()
EPPValue
instances associated with the result.EPPValue
instances if defined;
null
otherwise.public java.util.Vector getExtValues()
EPPExtValue
instances associated with the result.EPPExtValue
instances if
defined; null
otherwise.public java.util.Vector getAllValues()
Vector
of all of the EPPValue
and
EPPExtValue
defined in the result.EPPValue
or
EPPExtValue
instances if defined;
null
otherwise.public void setAllValues(java.util.Vector aValues)
Vector
of EPPValue
or EPPExtValue
instances.aValues
- Vector
of EPPValue
or
EPPExtValue
instances.public java.util.Vector getStrValues()
String
instances if defined;
null
otherwise.public boolean isSuccess()
true
if success; false
otherwise.public boolean shouldCloseSession()
true
if the session should be closed; false
otherwisepublic void setCode(int aCode)
aCode
- Result code that must be in the range 1000-9999.public void setCode(int aCode, boolean aUseDefaultMessage)
aUseDefaultMessage
is set to
true
; otherwise only the result code is set.aCode
- Result code that must be in the range 1000-9999.aUseDefaultMessage
- Use the default en message associated with
aCode?public void setLang(java.lang.String aLang)
aLang
- Language of the message.public void setMessage(java.lang.String aMessage)
aMessage
- Message String
describing the result.public void setMessage(java.lang.String aMessage, java.lang.String aLang)
aMessage
- Message String
describing the result.aLang
- Language of the messagepublic void setValues(EPPValue[] aValues)
aValues
- Array of EPPValue
instances.public void setValues(java.util.Vector aValues)
aValues
- Vector of EPPValue
instances.public void setExtValues(EPPExtValue[] aExtValues)
aExtValues
- Array of EPPExtValue
instances.public void setExtValues(java.util.Vector aExtValues)
aExtValues
- Vector of EPPExtValue
instances.public void setExtValueReasons(java.util.Vector aReasons)
Vector
of extValue
reasons.
Each reason will set the value,
XML namespace, and XML prefix to default values. The default values will
not specify a client element that caused the error. The reason is free
form text that can be used to provide more information about the error
from the server business logic.aReasons
- Vector
of human-readable String
messages that describe the reason for the error.public java.lang.String toString()
Object.toString
, which will result in an
indented XML String
representation of the concrete
EPPCodecComponent
.toString
in class java.lang.Object
String
if successful;
ERROR
otherwise.public java.lang.String getNamespace()
EPPCodecComponent
.getNamespace
in interface EPPCodecComponent
EPPCodecComponent
.Copyright © VeriSign Inc. All Rights Reserved.