Package com.verisign.epp.codec.fee.v1_0
Class EPPFeeCredit
- java.lang.Object
-
- com.verisign.epp.codec.fee.v1_0.EPPFeeCredit
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPFeeCredit extends java.lang.Object implements EPPCodecComponent
EPPFeeCredit
represents the credit value information returned by the server.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_LANG
Default value for the description language.static java.lang.String
ELM_LOCALNAME
Constant for the phase local namestatic java.lang.String
ELM_NAME
Constant for the phase qualified name (prefix and local name)
-
Constructor Summary
Constructors Constructor Description EPPFeeCredit()
Default constructor.EPPFeeCredit(java.math.BigDecimal aCredit)
CreateEPPFeeCredit
instance with the required credit value.EPPFeeCredit(java.math.BigDecimal aCredit, java.lang.String aDescription)
CreateEPPFeeCredit
instance with the required credit value and the optional description.EPPFeeCredit(java.math.BigDecimal aCredit, java.lang.String aDescription, java.lang.String aLanguage)
CreateEPPFeeCredit
instance with all attributes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPFeeCredit
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPFeeCredit
element aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPFeeCredit
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPFeeCredit
compare.java.math.BigDecimal
getCredit()
Gets the credit value.java.lang.String
getDescription()
Gets the description value.java.lang.String
getLanguage()
Gets description language.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.boolean
hasDescription()
Is the description defined?void
setCredit(java.math.BigDecimal aCredit)
Sets the credit value.void
setDescription(java.lang.String aDescription)
Sets the description value.void
setLanguage(java.lang.String aLanguage)
Sets description language.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Constant for the phase local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the phase qualified name (prefix and local name)- See Also:
- Constant Field Values
-
DEFAULT_LANG
public static final java.lang.String DEFAULT_LANG
Default value for the description language.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPFeeCredit
public EPPFeeCredit()
Default constructor. The command value MUST be set using thesetCredit(BigDecimal)
method.
-
EPPFeeCredit
public EPPFeeCredit(java.math.BigDecimal aCredit)
CreateEPPFeeCredit
instance with the required credit value.- Parameters:
aCredit
- The credit value
-
EPPFeeCredit
public EPPFeeCredit(java.math.BigDecimal aCredit, java.lang.String aDescription)
CreateEPPFeeCredit
instance with the required credit value and the optional description.- Parameters:
aCredit
- The credit valueaDescription
- Human-readable description
-
EPPFeeCredit
public EPPFeeCredit(java.math.BigDecimal aCredit, java.lang.String aDescription, java.lang.String aLanguage)
CreateEPPFeeCredit
instance with all attributes- Parameters:
aCredit
- The credit valueaDescription
- Human-readable descriptionaLanguage
- Optional language ofaDescription
. Set tonull
to set the default language, which is "en".
-
-
Method Detail
-
hasDescription
public boolean hasDescription()
Is the description defined?- Returns:
true
if the description is defined;false
otherwise.
-
getDescription
public java.lang.String getDescription()
Gets the description value.- Returns:
- Description if defined;
null
otherwise.
-
setDescription
public void setDescription(java.lang.String aDescription)
Sets the description value.- Parameters:
aDescription
- Description value.
-
getLanguage
public java.lang.String getLanguage()
Gets description language.- Returns:
- Description language with the default of
DEFAULT_LANG
.
-
setLanguage
public void setLanguage(java.lang.String aLanguage)
Sets description language.- Parameters:
aLanguage
- Sets description language. Set tonull
to set to the default value.
-
getCredit
public java.math.BigDecimal getCredit()
Gets the credit value.- Returns:
- Credit value
-
setCredit
public void setCredit(java.math.BigDecimal aCredit)
Sets the credit value.- Parameters:
aCredit
- Credit value
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPFeeCredit
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPFeeCredit
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPFeeCredit
element aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- - Root DOM Element to decodeEPPFeeCredit
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPFeeCredit
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the
EPPFeeCredit
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPFeeCredit
instance.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPFeeCredit
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPFeeCredit
instance to compare with- Returns:
true
if equal;false
otherwise
-
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.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-