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
EPPFeeCreditrepresents the credit value information returned by the server.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_LANGDefault value for the description language.static java.lang.StringELM_LOCALNAMEConstant for the phase local namestatic java.lang.StringELM_NAMEConstant for the phase qualified name (prefix and local name)
-
Constructor Summary
Constructors Constructor Description EPPFeeCredit()Default constructor.EPPFeeCredit(java.math.BigDecimal aCredit)CreateEPPFeeCreditinstance with the required credit value.EPPFeeCredit(java.math.BigDecimal aCredit, java.lang.String aDescription)CreateEPPFeeCreditinstance with the required credit value and the optional description.EPPFeeCredit(java.math.BigDecimal aCredit, java.lang.String aDescription, java.lang.String aLanguage)CreateEPPFeeCreditinstance with all attributes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPFeeCredit.voiddecode(org.w3c.dom.Element aElement)Decode theEPPFeeCreditelement aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPFeeCreditinstance.booleanequals(java.lang.Object aObject)implements a deepEPPFeeCreditcompare.java.math.BigDecimalgetCredit()Gets the credit value.java.lang.StringgetDescription()Gets the description value.java.lang.StringgetLanguage()Gets description language.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.booleanhasDescription()Is the description defined?voidsetCredit(java.math.BigDecimal aCredit)Sets the credit value.voidsetDescription(java.lang.String aDescription)Sets the description value.voidsetLanguage(java.lang.String aLanguage)Sets description language.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation 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)
CreateEPPFeeCreditinstance with the required credit value.- Parameters:
aCredit- The credit value
-
EPPFeeCredit
public EPPFeeCredit(java.math.BigDecimal aCredit, java.lang.String aDescription)CreateEPPFeeCreditinstance 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)CreateEPPFeeCreditinstance with all attributes- Parameters:
aCredit- The credit valueaDescription- Human-readable descriptionaLanguage- Optional language ofaDescription. Set tonullto set the default language, which is "en".
-
-
Method Detail
-
hasDescription
public boolean hasDescription()
Is the description defined?- Returns:
trueif the description is defined;falseotherwise.
-
getDescription
public java.lang.String getDescription()
Gets the description value.- Returns:
- Description if defined;
nullotherwise.
-
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 tonullto 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.CloneNotSupportedExceptionCloneEPPFeeCredit.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein 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 EPPDecodeExceptionDecode theEPPFeeCreditelement aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- - Root DOM Element to decodeEPPFeeCreditfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPFeeCreditinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the
EPPFeeCreditinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPFeeCreditinstance.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPFeeCreditcompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPFeeCreditinstance to compare with- Returns:
trueif equal;falseotherwise
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-