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,Serializable,Cloneable
EPPFeeValue represents the fee value information returned by the
server.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringFee is applied later after allocation.static StringFee is applied immediately at the time of the operation.static final StringDefault value for the description language.static final StringConstant for the phase local namestatic final StringConstant for the phase qualified name (prefix and local name)static StringConstant to reflect that there is no grace period. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EPPFeeValue(BigDecimal aFee) CreateEPPFeeValueinstance with the required fee value.EPPFeeValue(BigDecimal aFee, String aDescription) CreateEPPFeeValueinstance with the required fee value and the optional description.EPPFeeValue(BigDecimal aFee, String aDescription, Boolean aRefundable, String aGracePeriod, String aApplied) CreateEPPFeeValueinstance with all attributes except language.EPPFeeValue(BigDecimal aFee, String aDescription, String aLanguage) CreateEPPFeeValueinstance with the required fee value and the optional description and language.EPPFeeValue(BigDecimal aFee, String aDescription, String aLanguage, Boolean aRefundable, String aGracePeriod, String aApplied) CreateEPPFeeValueinstance with all attributes. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPFeeValueinstance.voidDecode theEPPFeeValueelement aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPFeeValueinstance.booleanimplements a deepEPPFeeValuecompare.Gets the OPTIONAL applied value.Gets the description value.getFee()Gets the fee value.Gets the OPTIONAL grace-period value.Gets description language.Returns the XML namespace associated with theEPPCodecComponent.booleanIs the applied attribute defined? AppliedbooleanIs the description defined?booleanIs the grace-period defined?booleanIs the refundable attribute defined?Is the fee refundable?voidsetApplied(String aApplied) Sets the applied value.voidsetDescription(String aDescription) Sets the description value.voidsetFee(BigDecimal aFee) Sets the fee value.voidsetGracePeriod(String aGracePeriod) Sets the OPTIONAL grace-period value.voidsetLanguage(String aLanguage) Sets description language.voidsetRefundable(Boolean aRefundable) Sets whether the fee is refundable.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
ELM_LOCALNAME
Constant for the phase local name- See Also:
-
ELM_NAME
Constant for the phase qualified name (prefix and local name)- See Also:
-
APPLIED_IMMEDIATE
Fee is applied immediately at the time of the operation. -
APPLIED_DELAYED
Fee is applied later after allocation. -
GRACE_PERIOD_NONE
Constant to reflect that there is no grace period. -
DEFAULT_LANG
Default value for the description language.- See Also:
-
-
Constructor Details
-
EPPFeeValue
public EPPFeeValue()Default constructor. The command value MUST be set using thesetFee(BigDecimal)method. -
EPPFeeValue
CreateEPPFeeValueinstance with the required fee value.- Parameters:
aFee- The fee value
-
EPPFeeValue
CreateEPPFeeValueinstance with the required fee value and the optional description.- Parameters:
aFee- The fee valueaDescription- Human-readable description
-
EPPFeeValue
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(BigDecimal aFee, String aDescription, Boolean aRefundable, String aGracePeriod, 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(BigDecimal aFee, String aDescription, String aLanguage, Boolean aRefundable, String aGracePeriod, 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 Details
-
hasDescription
public boolean hasDescription()Is the description defined?- Returns:
trueif the description is defined;falseotherwise.
-
getDescription
Gets the description value.- Returns:
- Description if defined;
nullotherwise.
-
setDescription
Sets the description value.- Parameters:
aDescription- Description value.
-
getLanguage
Gets description language.- Returns:
- Description language with the default of
DEFAULT_LANG.
-
setLanguage
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
Is the fee refundable?- Returns:
nullif undefined,trueif the fee is refundable, orfalseif not refundable.
-
setRefundable
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
Gets the OPTIONAL grace-period value.- Returns:
- grace-period value if defined;
nullotherwise.
-
setGracePeriod
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
Gets the OPTIONAL applied value.- Returns:
- The applied that should be one of the
APPLIEDconstant values if set;DEFAULT_APPLIEDotherwise.
-
setApplied
Sets the applied value.- Parameters:
aApplied- Applied value that should be one of theAPPLIEDconstant values ornullto unset the attribute.
-
getFee
Gets the fee value.- Returns:
- Fee value
-
setFee
Sets the fee value.- Parameters:
aFee- Fee value
-
clone
CloneEPPFeeValueinstance.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPFeeValue - Throws:
CloneNotSupportedException- standard Object.clone exception
-
decode
Decode theEPPFeeValueelement aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- - Root DOM Element to decodeEPPFeeValuefrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
encode
Encode 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
implements a deepEPPFeeValuecompare. -
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-