Package com.verisign.epp.codec.persreg
Class EPPPersRegCreateErrData
java.lang.Object
com.verisign.epp.codec.persreg.EPPPersRegCreateErrData
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
Personal Registration <creErrData> extension element to an error EPP
Create Response. The error code and message is currently associated with an
EPP response code of 2305 "Object association prohibits operation", and can
have one of the
EPPPersRegCreateErrDataERROR constant values.
Optionally, a "lang" attribute can be provide to indicate the language. The
default value for "lang" is "en" (English). - See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EPPPersRegCreateErrData(int aCode) Constructor that sets the error code. -
Method Summary
Modifier and TypeMethodDescriptionclone()clone anEPPCodecComponent.voiddecode a DOM element tree to initialize the instance attributes.encode instance into a DOM element tree.booleanCompare an instance ofEPPPersRegCreateErrDatawith this instance.intgetCode()Gets the error code.getLang()Gets the error message language.Gets the error message.Returns the XML namespace associated with theEPPCodecComponent.protected StringGets the root element name.voidsetCode(int aCode) Sets the error code.voidsetCode(int aCode, boolean aUseDefaultMessage) Sets the error code and the default "en" message associated with the error code ifaUserDefaultMessageis set totrue.voidSets the error message language.voidsetMessage(String aMessage) Sets the error message.
-
Field Details
-
DEFAULT_LANG
The default language of the error message "en".- See Also:
-
ERROR_CS_EXISTS
public static final int ERROR_CS_EXISTSCorresponding service exists- See Also:
-
ERROR_DEFREG_EXISTS
public static final int ERROR_DEFREG_EXISTSConflicting defensive registration exists- See Also:
-
ELM_NAME
XML root tag forEPPPersRegCreateErrData.- See Also:
-
-
Constructor Details
-
EPPPersRegCreateErrData
public EPPPersRegCreateErrData()Default constructor. The error code is set to -1. -
EPPPersRegCreateErrData
public EPPPersRegCreateErrData(int aCode) Constructor that sets the error code. Use of the theERRORconstants for the error code.- Parameters:
aCode- Error code
-
-
Method Details
-
getCode
public int getCode()Gets the error code.- Returns:
- Error code that should be one of the
ERRORconstant values.
-
setCode
public void setCode(int aCode) Sets the error code.- Parameters:
aCode- Error code that should be one of theERRORconstant values.
-
setCode
public void setCode(int aCode, boolean aUseDefaultMessage) Sets the error code and the default "en" message associated with the error code ifaUserDefaultMessageis set totrue.- Parameters:
aCode- Error code that should be one of theERRORconstant values.aUseDefaultMessage- Use the default en message associated with aCode?
-
getMessage
Gets the error message.- Returns:
- Error message associated with the error code in the specified language.
-
setMessage
Sets the error message. This should only be called if the default "en" language message is not valid.- Parameters:
aMessage- Error message associated with the error code in the specified language.
-
getLang
Gets the error message language. The Language must be structured as documented in [RFC1766].- Returns:
- Error message language.
-
setLang
Sets the error message language. The Language must be structured as documented in [RFC1766].- Parameters:
aLang- Error message language
-
encode
encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attributeis appended as a child node.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException- Error encodingEPPPersRegCreate
-
decode
decode a DOM element tree to initialize the instance attributes. TheaElementargument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement-Elementto decode- Throws:
EPPDecodeException- Error decodingElement
-
equals
Compare an instance ofEPPPersRegCreateErrDatawith this instance. -
clone
clone anEPPCodecComponent.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of concrete
EPPPersRegCreateErrData - Throws:
CloneNotSupportedException- standard Object.clone exception
-
getRootElm
Gets the root element name.- Returns:
- "persReg:creErrData"
-
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-