Package com.verisign.epp.codec.fee.v1_0
Class EPPFeeValue
- java.lang.Object
-
- com.verisign.epp.codec.fee.v1_0.EPPFeeValue
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPFeeValue extends java.lang.Object implements EPPCodecComponent
EPPFeeValuerepresents the fee value information returned by the server.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPPLIED_DELAYEDFee is applied later after allocation.static java.lang.StringAPPLIED_IMMEDIATEFee is applied immediately at the time of the operation.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)static java.lang.StringGRACE_PERIOD_NONEConstant to reflect that there is no grace period.
-
Constructor Summary
Constructors Constructor Description EPPFeeValue()Default constructor.EPPFeeValue(java.math.BigDecimal aFee)CreateEPPFeeValueinstance with the required fee value.EPPFeeValue(java.math.BigDecimal aFee, java.lang.String aDescription)CreateEPPFeeValueinstance with the required fee value and the optional description.EPPFeeValue(java.math.BigDecimal aFee, java.lang.String aDescription, java.lang.Boolean aRefundable, java.lang.String aGracePeriod, java.lang.String aApplied)CreateEPPFeeValueinstance with all attributes except language.EPPFeeValue(java.math.BigDecimal aFee, java.lang.String aDescription, java.lang.String aLanguage)CreateEPPFeeValueinstance with the required fee value and the optional description and language.EPPFeeValue(java.math.BigDecimal aFee, java.lang.String aDescription, java.lang.String aLanguage, java.lang.Boolean aRefundable, java.lang.String aGracePeriod, java.lang.String aApplied)CreateEPPFeeValueinstance with all attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPFeeValueinstance.voiddecode(org.w3c.dom.Element aElement)Decode theEPPFeeValueelement aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPFeeValueinstance.booleanequals(java.lang.Object aObject)implements a deepEPPFeeValuecompare.java.lang.StringgetApplied()Gets the OPTIONAL applied value.java.lang.StringgetDescription()Gets the description value.java.math.BigDecimalgetFee()Gets the fee value.java.lang.StringgetGracePeriod()Gets the OPTIONAL grace-period value.java.lang.StringgetLanguage()Gets description language.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.booleanhasApplied()Is the applied attribute defined? AppliedbooleanhasDescription()Is the description defined?booleanhasGracePeriod()Is the grace-period defined?booleanhasRefundable()Is the refundable attribute defined?java.lang.BooleanisRefundable()Is the fee refundable?voidsetApplied(java.lang.String aApplied)Sets the applied value.voidsetDescription(java.lang.String aDescription)Sets the description value.voidsetFee(java.math.BigDecimal aFee)Sets the fee value.voidsetGracePeriod(java.lang.String aGracePeriod)Sets the OPTIONAL grace-period value.voidsetLanguage(java.lang.String aLanguage)Sets description language.voidsetRefundable(java.lang.Boolean aRefundable)Sets whether the fee is refundable.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
-
APPLIED_IMMEDIATE
public static java.lang.String APPLIED_IMMEDIATE
Fee is applied immediately at the time of the operation.
-
APPLIED_DELAYED
public static java.lang.String APPLIED_DELAYED
Fee is applied later after allocation.
-
GRACE_PERIOD_NONE
public static java.lang.String GRACE_PERIOD_NONE
Constant to reflect that there is no grace period.
-
DEFAULT_LANG
public static final java.lang.String DEFAULT_LANG
Default value for the description language.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPFeeValue
public EPPFeeValue()
Default constructor. The command value MUST be set using thesetFee(BigDecimal)method.
-
EPPFeeValue
public EPPFeeValue(java.math.BigDecimal aFee)
CreateEPPFeeValueinstance with the required fee value.- Parameters:
aFee- The fee value
-
EPPFeeValue
public EPPFeeValue(java.math.BigDecimal aFee, java.lang.String aDescription)CreateEPPFeeValueinstance with the required fee value and the optional description.- Parameters:
aFee- The fee valueaDescription- Human-readable description
-
EPPFeeValue
public EPPFeeValue(java.math.BigDecimal aFee, java.lang.String aDescription, java.lang.String aLanguage)CreateEPPFeeValueinstance with the required fee value and the optional description and language.- Parameters:
aFee- The fee valueaDescription- Human-readable descriptionaLanguage- Optional language ofaDescription. Set tonullto set the default language, which is "en".
-
EPPFeeValue
public EPPFeeValue(java.math.BigDecimal aFee, java.lang.String aDescription, java.lang.Boolean aRefundable, java.lang.String aGracePeriod, java.lang.String aApplied)CreateEPPFeeValueinstance with all attributes except language.- Parameters:
aFee- The required fee value.aDescription- Optional Human-readable description. Pass asnullif there is no description.aRefundable- Is the fee refundable? Set tonullto not set the optional refundable attribute.aGracePeriod- Optional grace period whenaRefundableistrue. Set toGRACE_PERIOD_NONEifaRefundableisfalse. Set tonullto not set the optional grace period attribute.aApplied- Optional applied attribute that defines when fees are applied. Use either theAPPLIED_IMMEDIATEconstant or theAPPLIED_DELAYEDconstant. Set tonullto not set the applied attribute.
-
EPPFeeValue
public EPPFeeValue(java.math.BigDecimal aFee, java.lang.String aDescription, java.lang.String aLanguage, java.lang.Boolean aRefundable, java.lang.String aGracePeriod, java.lang.String aApplied)CreateEPPFeeValueinstance with all attributes.- Parameters:
aFee- The required fee value.aDescription- Optional Human-readable description. Pass asnullif there is no description.aLanguage- Optional language ofaDescription. Set tonullto set the default language, which is "en".aRefundable- Is the fee refundable? Set tonullto not set the optional refundable attribute.aGracePeriod- Optional grace period whenaRefundableistrue. Set toGRACE_PERIOD_NONEifaRefundableisfalse. Set tonullto not set the optional grace period attribute.aApplied- Optional applied attribute that defines when fees are applied. Use either theAPPLIED_IMMEDIATEconstant or theAPPLIED_DELAYEDconstant. Set tonullto not set the applied attribute.
-
-
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.
-
hasRefundable
public boolean hasRefundable()
Is the refundable attribute defined?- Returns:
trueif the refundable attribute is defined;falseotherwise.
-
isRefundable
public java.lang.Boolean isRefundable()
Is the fee refundable?- Returns:
nullif undefined,trueif the fee is refundable, orfalseif not refundable.
-
setRefundable
public void setRefundable(java.lang.Boolean aRefundable)
Sets whether the fee is refundable.- Parameters:
aRefundable- Set totrueif the fee is refundable,false, ornullif undefined.
-
hasGracePeriod
public boolean hasGracePeriod()
Is the grace-period defined?- Returns:
trueif the grace-period is defined;falseotherwise.
-
getGracePeriod
public java.lang.String getGracePeriod()
Gets the OPTIONAL grace-period value.- Returns:
- grace-period value if defined;
nullotherwise.
-
setGracePeriod
public void setGracePeriod(java.lang.String aGracePeriod)
Sets the OPTIONAL grace-period value.- Parameters:
aGracePeriod- Grace-period value if defined;nullotherwise.
-
hasApplied
public boolean hasApplied()
Is the applied attribute defined? Applied- Returns:
trueif the applied attribute is defined;falseotherwise.
-
getApplied
public java.lang.String getApplied()
Gets the OPTIONAL applied value.- Returns:
- The applied that should be one of the
APPLIEDconstant values if set;DEFAULT_APPLIEDotherwise.
-
setApplied
public void setApplied(java.lang.String aApplied)
Sets the applied value.- Parameters:
aApplied- Applied value that should be one of theAPPLIEDconstant values ornullto unset the attribute.
-
getFee
public java.math.BigDecimal getFee()
Gets the fee value.- Returns:
- Fee value
-
setFee
public void setFee(java.math.BigDecimal aFee)
Sets the fee value.- Parameters:
aFee- Fee value
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPFeeValueinstance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPFeeValue - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPFeeValueelement aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- - Root DOM Element to decodeEPPFeeValuefrom.- 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 theEPPFeeValueinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the
EPPFeeValueinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPFeeValueinstance.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPFeeValuecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPFeeValueinstance 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.
-
-