Package com.verisign.epp.codec.gen
Class EPPResult
java.lang.Object
com.verisign.epp.codec.gen.EPPResult
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
Represents an individual result that is contained in an
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:- A "code" attribute whose value is a four-digit, decimal number that describes the success or failure of the command.
- A <msg> element containing a human-readable description of the response code. The language of the response is identified via an OPTIONAL "lang" attribute. If not specified, the default attribute value MUST be "en" (English).
- Zero or more OPTIONAL <value> elements that identify a client- provided element (including XML tag and value) that caused a server error condition.
- Zero or more OPTIONAL <extValue> elements that can be used to provide additional error diagnostic information.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intObject 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 final intAuthentication error
This response code MUST be returned when a server notes an error when validating client credentials.static final intAuthentication 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 final intAuthorization error
This response code MUST be returned when a server notes a client authorization error when executing a command.static final intBilling 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 final intCommand 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 final intCommand 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 final intCommand syntax error
This response code MUST be returned when a server receives an improperly formed command element.static final intCommand 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 final intData 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 final StringThe default language of the result message "en".static final intInvalid 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 final intRequired 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 final intObject 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 final intObject 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 final intObject 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 final intObject exists
This response code MUST be returned when a server receives a command to create an object that already exists in the repository.static final intObject 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 final intObject 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 final intParameter 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 final intParameter value syntax error
This response code MUST be returned when a server receives a command containing a parameter whose value is improperly formed.static final intParameter 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 final intSession 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 final intObject 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 final intCommand 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 final intCommand completed successfully; ending session
This response code MUST be returned when responding to a successful logout commandstatic final intCommand 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 final intCommand 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 final intCommand 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 final intUnimplemented command
This response code MUST be returned when a server receives a valid EPP command element that is not implemented by the server.static final intUnimplemented 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 final intUnimplemented 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 final intUnimplemented 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 final intUnimplemented 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 final intUnknown command
This response code MUST be returned when a server receives a command element that is not defined by EPP. -
Constructor Summary
ConstructorsConstructorDescriptionAllocates a newEPPResultwith default attribute values.EPPResult(int aCode) Allocates a newEPPResultwith a result code.Allocates a newEPPResultwith a result code and result message.Allocates a newEPPResultwith a result code, result message, and result message language.Allocates a newEPPResultwith all of the attribute set with the arguments.Allocates a newEPPResultwith a result code, result message, and result values. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtValue(EPPExtValue aExtValue) Adds anEPPExtValueinstance to the list of client error elements.voidaddExtValueReason(String aReason) Adds anextValuereason, which will set the value, XML namespace, and XML prefix to default values.voidAdds anEPPValueinstance to the list of client error elements.voidAdds an individual XML value to the list of XML values.clone()CloneEPPResult.voiddecodeEPPResultfrom a DOM element tree.encodeEPPResultinto a DOM element tree.booleanimplements a deepEPPResultcompare.Vector<?> Gets aVectorof all of theEPPValueandEPPExtValuedefined in the result.intgetCode()Gets the result code.Gets theEPPExtValueinstances associated with the result.getLang()Gets the message language of the result.Gets the message of the result.Returns the XML namespace associated with theEPPCodecComponent.Gets the value strings associated with the result.Gets theEPPValueinstances associated with the result.booleanWas the result a success?voidsetAllValues(Vector<?> aValues) Sets the value and extValue lists based on a singleVectorofEPPValueorEPPExtValueinstances.voidsetCode(int aCode) Sets the result code.voidsetCode(int aCode, boolean aUseDefaultMessage) Sets the result code and the default en message associated with the result code ifaUseDefaultMessageis set totrue; otherwise only the result code is set.voidsetExtValueReasons(Vector<String> aReasons) Sets aVectorofextValuereasons.voidsetExtValues(EPPExtValue[] aExtValues) Sets the extended values associated with the result using an array.voidsetExtValues(Vector<EPPExtValue> aExtValues) Sets the extValue's associated with the result.voidSets the message language of the result.voidsetMessage(String aMessage) Sets the message of the result in the default language of "en".voidsetMessage(String aMessage, String aLang) Sets the message of the result along with the language of the message.voidSets the values associated with the result.voidSets the values associated with the result.booleanShould the EPP session be closed based on the result code?toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
DEFAULT_LANG
The default language of the result message "en".- See Also:
-
SUCCESS
public static final int SUCCESSCommand completed successfully
This is the usual response code for a successfully completed command that is not addressed by any other 1xxx-series response code.- See Also:
-
SUCCESS_PENDING
public static final int SUCCESS_PENDINGCommand 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.- See Also:
-
SUCCESS_POLL_NO_MSGS
public static final int SUCCESS_POLL_NO_MSGSCommand completed successfully; no messages
This response code MUST be returned when responding to a poll request command and the server message queue is empty.- See Also:
-
SUCCESS_POLL_MSG
public static final int SUCCESS_POLL_MSGCommand 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.- See Also:
-
SUCCESS_END_SESSION
public static final int SUCCESS_END_SESSIONCommand completed successfully; ending session
This response code MUST be returned when responding to a successful logout command- See Also:
-
UNKNOWN_COMMAND
public static final int UNKNOWN_COMMANDUnknown command
This response code MUST be returned when a server receives a command element that is not defined by EPP.- See Also:
-
COMMAND_SYNTAX_ERROR
public static final int COMMAND_SYNTAX_ERRORCommand syntax error
This response code MUST be returned when a server receives an improperly formed command element.- See Also:
-
COMMAND_USE_ERROR
public static final int COMMAND_USE_ERRORCommand 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. For example, a logout command can not be executed without having first completed a login command.- See Also:
-
MISSING_PARAMETER
public static final int MISSING_PARAMETERRequired parameter missing
This response code MUST be returned when a server receives a command for which a required parameter value has not been provided.- See Also:
-
PARAM_OUT_OF_RANGE
public static final int PARAM_OUT_OF_RANGEParameter 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. The error value SHOULD be returned via a value element in the EPP response.- See Also:
-
PARAM_SYNTAX_ERROR
public static final int PARAM_SYNTAX_ERRORParameter value syntax error
This response code MUST be returned when a server receives a command containing a parameter whose value is improperly formed. The error value SHOULD be returned via a value element in the EPP response.- See Also:
-
UNIMPLEMENTED_VERSION
public static final int UNIMPLEMENTED_VERSIONUnimplemented 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.- See Also:
-
UNIMPLEMENTED_COMMAND
public static final int UNIMPLEMENTED_COMMANDUnimplemented command
This response code MUST be returned when a server receives a valid EPP command element that is not implemented by the server. For example, a transfer command MAY be unimplemented for certain object types.- See Also:
-
UNIMPLEMENTED_OPTION
public static final int UNIMPLEMENTED_OPTIONUnimplemented 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. For example, a server MAY not implement the protocol's session-less operating mode.- See Also:
-
UNIMPLEMENTED_EXTENSION
public static final int UNIMPLEMENTED_EXTENSIONUnimplemented 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.- See Also:
-
BILLING_ERROR
public static final int BILLING_ERRORBilling 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.- See Also:
-
NOT_RENEWABLE
public static final int NOT_RENEWABLEObject 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.- See Also:
-
NOT_TRANSFERABLE
public static final int NOT_TRANSFERABLEObject 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.- See Also:
-
AUTHENTICATION_ERROR
public static final int AUTHENTICATION_ERRORAuthentication error
This response code MUST be returned when a server notes an error when validating client credentials.- See Also:
-
AUTHORIZATION_ERROR
public static final int AUTHORIZATION_ERRORAuthorization error
This response code MUST be returned when a server notes a client authorization error when executing a command. This error is used to note that a client lacks privileges to execute the requested command.- See Also:
-
INVALID_AUTHORIZATION_INFO
public static final int INVALID_AUTHORIZATION_INFOInvalid authorization information
This response code MUST be returned when a server receives invalid command authorization information required to confirm authorization to execute a command. This error is used to note that a client has the privileges required to execute the requested command, but the authorization information provided by the client does not match the authorization information archived by the server.- See Also:
-
OBJECT_PENDING_TRANSFER
public static final int OBJECT_PENDING_TRANSFERObject 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.- See Also:
-
OBJECT_NOT_PENDING_TRANSFER
public static final int OBJECT_NOT_PENDING_TRANSFERObject 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.- See Also:
-
OBJECT_EXISTS
public static final int OBJECT_EXISTSObject exists
This response code MUST be returned when a server receives a command to create an object that already exists in the repository.- See Also:
-
OBJECT_DOES_NOT_EXIST
public static final int OBJECT_DOES_NOT_EXISTObject 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.- See Also:
-
STATUS_PROHIBITS_OP
public static final int STATUS_PROHIBITS_OPObject 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. For example, a server MAY disallow transfer commands under terms and conditions that are matters of local policy, or the server may have received a delete command for an object whose status prohibits deletion.- See Also:
-
ASSOC_PROHIBITS_OP
public static final int ASSOC_PROHIBITS_OPObject 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. For example, a server MAY disallow delete commands while an object has active associations with other objects.- See Also:
-
PARAM_VALUE_POLICY_ERROR
public static final int PARAM_VALUE_POLICY_ERRORParameter 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. For example, the server MAY support a subset of a range of valid protocol parameter values. The error value SHOULD be returned via a <value> element in the EPP response.- See Also:
-
UNIMPLEMENTED_OBJECT_SERVICE
public static final int UNIMPLEMENTED_OBJECT_SERVICEUnimplemented 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.- See Also:
-
DATA_MGT_POLICY_VIOLATION
public static final int DATA_MGT_POLICY_VIOLATIONData 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. For example, removing all attribute values or object associations from an object MAY be a violation of a server's data management policies.- See Also:
-
COMMAND_FAILED
public static final int COMMAND_FAILEDCommand 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. The failure MAY be transient. The server MUST keep any ongoing session active.- See Also:
-
COMMAND_FAILED_END
public static final int COMMAND_FAILED_ENDCommand 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. The failure is not transient, and will cause other commands to fail as well. The server MUST end the active session and close the existing connection.- See Also:
-
AUTHENTICATION_ERROR_END
public static final int AUTHENTICATION_ERROR_ENDAuthentication 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. The server MUST close the existing connection.- See Also:
-
SESSION_LIMIT_END
public static final int SESSION_LIMIT_ENDSession 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. It may be possible to establish a session by ending existing unused sessions.- See Also:
-
-
Constructor Details
-
EPPResult
public EPPResult()Allocates a newEPPResultwith default attribute values. The defaults are set to:
- code is set to
SUCCESS - values is set to
null - message is set to "Command completed successfully"
- lang is set to "en"
- code is set to
-
EPPResult
public EPPResult(int aCode) Allocates a newEPPResultwith a result code. The other attributes will be set as follows:
- values is set to
null - message is set to "en" equivalent of
aCodeif code is a pre-defined code; otherwise is set tonull. - lang is set to
DEFAULT_LANG.
- Parameters:
aCode- result code that must be in the range 1000-9999.
- values is set to
-
EPPResult
Allocates a newEPPResultwith a result code and result message. The other attributes will be set as follows:
- values is set to
null - lang is set to
DEFAULT_LANG
- Parameters:
aCode- result code that must be in the range 1000-9999.aMessage- result message in the default "en" language.
- values is set to
-
EPPResult
Allocates a newEPPResultwith a result code, result message, and result message language. The other attributes will be set as follows:
- values is set to
null
- Parameters:
aCode- result code that must be in the range 1000-9999.aMessage- result message in the default "en" language.aLang- Language of result message.
- values is set to
-
EPPResult
Allocates a newEPPResultwith a result code, result message, and result values.
This method should only be called for error results, since successful results don't include values.- Parameters:
aCode- result code that must be in the range 1000-9999.aMessage- result message in the default "en" language.aValues- Vector of eitherEPPValueorEPPExtValueinstances.
-
EPPResult
Allocates a newEPPResultwith all of the attribute set with the arguments. This method should only be called for error results, since successful results don't include values.- Parameters:
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 eitherEPPValueorEPPExtValueinstances.
-
-
Method Details
-
addValue
Adds an individual XML value to the list of XML values. The XML prefix and XML prefix will be set to the default values.- Parameters:
aValue- XMLStringvalue. For example, "<epp:login/>".
-
addValue
Adds anEPPValueinstance to the list of client error elements. This method allows for the specification of an XML prefix and XML namespace for the error value.- Parameters:
aValue-EPPValueinstance that includes the client element XML and its associated XML prefix and namespace.
-
addExtValueReason
Adds anextValuereason, 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.- Parameters:
aReason- Human-readable message that describes the reason for the error.
-
addExtValue
Adds anEPPExtValueinstance 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.- Parameters:
aExtValue-EPPExtValueinstance that includes the client element XML and its associated XML prefix and namespace.
-
clone
CloneEPPResult.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- Deep copy clone of
EPPResult - Throws:
CloneNotSupportedException- standard Object.clone exception
-
decode
decodeEPPResultfrom a DOM element tree. TheaElementargument needs to be the <result> element.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- The <result> XML element.- Throws:
EPPDecodeException- Error decoding the DOM element tree.
-
encode
encodeEPPResultinto a DOM element tree. The result is created and the attribute nodes are appended as children.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- Used as a document factory- Returns:
- <result> root element tree.
- Throws:
EPPEncodeException- Error encoding the DOM element tree.
-
equals
implements a deepEPPResultcompare. -
getCode
public int getCode()Gets the result code.- Returns:
- Result code that must be in the range 1000-9999.
-
getLang
Gets the message language of the result. The Language must be structured as documented in [RFC1766].- Returns:
- Language of the message.
-
getMessage
Gets the message of the result. The language of the message can be retreived bygetLang.- Returns:
- Message
Stringdescribing the result.
-
getValues
Gets theEPPValueinstances associated with the result.- Returns:
- Vector error value
EPPValueinstances if defined;nullotherwise.
-
getExtValues
Gets theEPPExtValueinstances associated with the result.- Returns:
- Vector error value
EPPExtValueinstances if defined;nullotherwise.
-
getAllValues
Gets aVectorof all of theEPPValueandEPPExtValuedefined in the result.- Returns:
- Vector error value
EPPValueorEPPExtValueinstances if defined;nullotherwise.
-
setAllValues
Sets the value and extValue lists based on a singleVectorofEPPValueorEPPExtValueinstances.- Parameters:
aValues-VectorofEPPValueorEPPExtValueinstances.
-
getStrValues
Gets the value strings associated with the result.- Returns:
- Vector error value
Stringinstances if defined;nullotherwise. - Since:
- EPP 1.0
-
isSuccess
public boolean isSuccess()Was the result a success?- Returns:
trueif success;falseotherwise.
-
shouldCloseSession
public boolean shouldCloseSession()Should the EPP session be closed based on the result code?- Returns:
trueif the session should be closed;falseotherwise
-
setCode
public void setCode(int aCode) Sets the result code.- Parameters:
aCode- Result code that must be in the range 1000-9999.
-
setCode
public void setCode(int aCode, boolean aUseDefaultMessage) Sets the result code and the default en message associated with the result code ifaUseDefaultMessageis set totrue; otherwise only the result code is set.- Parameters:
aCode- Result code that must be in the range 1000-9999.aUseDefaultMessage- Use the default en message associated with aCode?
-
setLang
Sets the message language of the result. The Language must be structured as documented in [RFC1766].- Parameters:
aLang- Language of the message.
-
setMessage
Sets the message of the result in the default language of "en".- Parameters:
aMessage- MessageStringdescribing the result.
-
setMessage
Sets the message of the result along with the language of the message. The Language must be structured as documented in [RFC1766].- Parameters:
aMessage- MessageStringdescribing the result.aLang- Language of the message
-
setValues
Sets the values associated with the result.- Parameters:
aValues- Array ofEPPValueinstances.
-
setValues
Sets the values associated with the result.- Parameters:
aValues- Vector ofEPPValueinstances.
-
setExtValues
Sets the extended values associated with the result using an array. In the specification, an extended value can be used to provide additional error diagnostic information, including a value identifying a client-provided element (including XML tag and value) that caused a server error condition, and a reason containing a human-readable message that describes the reason for the error.- Parameters:
aExtValues- Array ofEPPExtValueinstances.- Since:
- EPP 1.0
-
setExtValues
Sets the extValue's associated with the result.- Parameters:
aExtValues- Vector ofEPPExtValueinstances.
-
setExtValueReasons
Sets aVectorofextValuereasons. 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.- Parameters:
aReasons-Vectorof human-readableStringmessages that describe the reason for the error.
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-