public class EPPFeeValue extends java.lang.Object implements EPPCodecComponent
EPPFeeValue represents the fee value information returned by the
server.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
APPLIED_DELAYED
Fee is applied later after allocation.
|
static java.lang.String |
APPLIED_IMMEDIATE
Fee is applied immediately at the time of the operation.
|
static java.lang.String |
DEFAULT_APPLIED
Default applied value, which is to apply the fee immediately.
|
static java.lang.String |
ELM_LOCALNAME
Constant for the phase local name
|
static java.lang.String |
ELM_NAME
Constant for the phase qualified name (prefix and local name)
|
static java.lang.String |
GRACE_PERIOD_NONE
Constant to reflect that there is no grace period.
|
| Constructor and Description |
|---|
EPPFeeValue()
Default constructor.
|
EPPFeeValue(java.math.BigDecimal aFee)
Create
EPPFeeValue instance with the required fee value. |
EPPFeeValue(java.math.BigDecimal aFee,
java.lang.String aDescription)
Create
EPPFeeValue instance 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)
Create
EPPFeeValue instance with all attributes. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Clone
EPPFeeValue instance. |
void |
decode(org.w3c.dom.Element aElement)
Decode the
EPPFeeValue element aElement DOM Element tree. |
org.w3c.dom.Element |
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of the
EPPFeeValue instance. |
boolean |
equals(java.lang.Object aObject)
implements a deep
EPPFeeValue compare. |
java.lang.String |
getApplied()
Gets the OPTIONAL applied value.
|
java.lang.String |
getDescription()
Gets the description value.
|
java.math.BigDecimal |
getFee()
Gets the fee value.
|
java.lang.String |
getGracePeriod()
Gets the OPTIONAL grace-period value.
|
java.lang.String |
getNamespace()
Returns the XML namespace associated with the
EPPCodecComponent. |
boolean |
hasApplied()
Is the applied attribute defined? Applied
|
boolean |
hasDescription()
Is the description defined?
|
boolean |
hasGracePeriod()
Is the grace-period defined?
|
boolean |
hasRefundable()
Is the refundable attribute defined?
|
java.lang.Boolean |
isRefundable()
Is the fee refundable?
|
void |
setApplied(java.lang.String aApplied)
Sets the applied value.
|
void |
setDescription(java.lang.String aDescription)
Sets the description value.
|
void |
setFee(java.math.BigDecimal aFee)
Sets the fee value.
|
void |
setGracePeriod(java.lang.String aGracePeriod)
Sets the OPTIONAL grace-period value.
|
void |
setRefundable(java.lang.Boolean aRefundable)
Sets whether the fee is refundable.
|
java.lang.String |
toString()
Implementation of
Object.toString, which will result in an
indented XML String representation of the concrete
EPPCodecComponent. |
public static final java.lang.String ELM_LOCALNAME
public static final java.lang.String ELM_NAME
public static java.lang.String APPLIED_IMMEDIATE
public static java.lang.String APPLIED_DELAYED
public static java.lang.String GRACE_PERIOD_NONE
public static java.lang.String DEFAULT_APPLIED
public EPPFeeValue()
setFee(BigDecimal) method.public EPPFeeValue(java.math.BigDecimal aFee)
EPPFeeValue instance with the required fee value.aFee - The fee valuepublic EPPFeeValue(java.math.BigDecimal aFee,
java.lang.String aDescription)
EPPFeeValue instance with the required fee value and
the optional description.aFee - The fee valueaDescription - Human-readable descriptionpublic EPPFeeValue(java.math.BigDecimal aFee,
java.lang.String aDescription,
java.lang.Boolean aRefundable,
java.lang.String aGracePeriod,
java.lang.String aApplied)
EPPFeeValue instance with all attributes.aFee - The required fee value.aDescription - Optional Human-readable description. Pass as null
if there is no description.aRefundable - Is the fee refundable? Set to null to not set the
optional refundable attribute.aGracePeriod - Optional grace period when aRefundable is
true. Set to GRACE_PERIOD_NONE if
aRefundable is false. Set to
null to not set the optional grace period
attribute.aApplied - Optional applied attribute that defines when fees are applied.
Use either the APPLIED_IMMEDIATE constant or the
APPLIED_DELAYED constant. Set to null
to not set the applied attribute.public boolean hasDescription()
true if the description is defined;
false otherwise.public java.lang.String getDescription()
null otherwise.public void setDescription(java.lang.String aDescription)
aDescription - Description value.public boolean hasRefundable()
true if the refundable attribute is defined;
false otherwise.public java.lang.Boolean isRefundable()
null if undefined, true if the fee is
refundable, or false if not refundable.public void setRefundable(java.lang.Boolean aRefundable)
aRefundable - Set to true if the fee is refundable,
false, or null if undefined.public boolean hasGracePeriod()
true if the grace-period is defined;
false otherwise.public java.lang.String getGracePeriod()
null otherwise.public void setGracePeriod(java.lang.String aGracePeriod)
aGracePeriod - Grace-period value if defined; null otherwise.public boolean hasApplied()
true if the applied attribute is defined;
false otherwise.public java.lang.String getApplied()
APPLIED
constant values if set; DEFAULT_APPLIED otherwise.public void setApplied(java.lang.String aApplied)
aApplied - Applied value that should be one of the APPLIED
constant values or null to set to the default value
of DEFAULT_APPIED.public java.math.BigDecimal getFee()
public void setFee(java.math.BigDecimal aFee)
aFee - Fee valuepublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
EPPFeeValue instance.clone in interface EPPCodecComponentclone in class java.lang.ObjectEPPFeeValuejava.lang.CloneNotSupportedException - standard Object.clone exceptionpublic void decode(org.w3c.dom.Element aElement)
throws EPPDecodeException
EPPFeeValue element aElement DOM Element tree.decode in interface EPPCodecComponentaElement - - Root DOM Element to decode EPPFeeValue from.EPPDecodeException - Unable to decode aElementpublic org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
throws EPPEncodeException
EPPFeeValue instance.encode in interface EPPCodecComponentaDocument - - DOM Document that is being built. Used as an Element factory.EPPFeeValue instance.EPPEncodeException - - Unable to encode EPPFeeValue instance.public boolean equals(java.lang.Object aObject)
EPPFeeValue compare.equals in class java.lang.ObjectaObject - EPPFeeValue instance to compare withtrue if equal; false otherwisepublic java.lang.String toString()
Object.toString, which will result in an
indented XML String representation of the concrete
EPPCodecComponent.toString in class java.lang.ObjectString if successful; ERROR
otherwise.public java.lang.String getNamespace()
EPPCodecComponent.getNamespace in interface EPPCodecComponentEPPCodecComponent.