Class EPPNamestoreExtNSExtErrData
- java.lang.Object
-
- com.verisign.epp.codec.namestoreext.EPPNamestoreExtNSExtErrData
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPNamestoreExtNSExtErrData extends java.lang.Object implements EPPCodecComponent
Namestore <nsExtErrData> extension element to an error EPP Response. The error code and message is currently associated with an EPP response code of 2306 "Parameter value policy error", and can have one of theEPPNamestoreExtNSExtErrData
ERROR
constant values. Optionally, a "lang" attribute can be provide to indicate the language. The default value for "lang" is "en" (English).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_LANG
The default language of the error message "en".static java.lang.String
ELM_NAME
XML root tag forEPPNamestoreExtNSExtErrData
.static int
ERROR_SUB_PRODUCT_NOT_EXISTS
Specified sub-product does not exist
-
Constructor Summary
Constructors Constructor Description EPPNamestoreExtNSExtErrData()
Default constructor.EPPNamestoreExtNSExtErrData(int aCode)
Constructor that sets the error code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
clone anEPPCodecComponent
.void
decode(org.w3c.dom.Element aElement)
decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encode instance into a DOM element tree.boolean
equals(java.lang.Object aObject)
Compare an instance ofEPPNamestoreExtNSExtErrData
with this instance.int
getCode()
Gets the error code.java.lang.String
getLang()
Gets the error message language.java.lang.String
getMessage()
Gets the error message.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.protected java.lang.String
getRootElm()
Gets the root element name.void
setCode(int aCode)
Sets the error code.void
setCode(int aCode, boolean aUseDefaultMessage)
Sets the error code and the default "en" message associated with the error code ifaUserDefaultMessage
is set totrue
.void
setLang(java.lang.String aLang)
Sets the error message language.void
setMessage(java.lang.String aMessage)
Sets the error message.
-
-
-
Field Detail
-
DEFAULT_LANG
public static final java.lang.String DEFAULT_LANG
The default language of the error message "en".- See Also:
- Constant Field Values
-
ERROR_SUB_PRODUCT_NOT_EXISTS
public static final int ERROR_SUB_PRODUCT_NOT_EXISTS
Specified sub-product does not exist- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPNamestoreExtNSExtErrData
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPNamestoreExtNSExtErrData
public EPPNamestoreExtNSExtErrData()
Default constructor. The error code is set to -1.
-
EPPNamestoreExtNSExtErrData
public EPPNamestoreExtNSExtErrData(int aCode)
Constructor that sets the error code. Use of the theERROR
constants for the error code.- Parameters:
aCode
- Error code
-
-
Method Detail
-
getCode
public int getCode()
Gets the error code.- Returns:
- Error code that should be one of the
ERROR
constant values.
-
setCode
public void setCode(int aCode)
Sets the error code.- Parameters:
aCode
- Error code that should be one of theERROR
constant values.
-
setCode
public void setCode(int aCode, boolean aUseDefaultMessage)
Sets the error code and the default "en" message associated with the error code ifaUserDefaultMessage
is set totrue
.- Parameters:
aCode
- Error code that should be one of theERROR
constant values.aUseDefaultMessage
- Use the default en message associated with aCode?
-
getMessage
public java.lang.String getMessage()
Gets the error message.- Returns:
- Error message associated with the error code in the specified language.
-
setMessage
public void setMessage(java.lang.String aMessage)
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
public java.lang.String getLang()
Gets the error message language. The Language must be structured as documented in [RFC1766].- Returns:
- Error message language.
-
setLang
public void setLang(java.lang.String aLang)
Sets the error message language. The Language must be structured as documented in [RFC1766].- Parameters:
aLang
- DOCUMENT ME!
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
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:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException
- Error encodingEPPNamestoreExtNSExtErrData
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
decode a DOM element tree to initialize the instance attributes. TheaElement
argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
-Element
to decode- Throws:
EPPDecodeException
- Error decodingElement
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPNamestoreExtNSExtErrData
with this instance.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
- Object to compare with.- Returns:
true
if equal;false
otherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone anEPPCodecComponent
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of concrete
EPPNamestoreExtNSExtErrData
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
getRootElm
protected java.lang.String getRootElm()
Gets the root element name.- Returns:
- "persReg:creErrData"
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-