com.verisign.epp.codec.fee.v09
Class EPPFeeValue

java.lang.Object
  extended by com.verisign.epp.codec.fee.v09.EPPFeeValue
All Implemented Interfaces:
EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

public class EPPFeeValue
extends java.lang.Object
implements EPPCodecComponent

EPPFeeValue represents the fee value information returned by the server.

See Also:
Serialized Form

Field Summary
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 Summary
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.
 
Method Summary
 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.
 boolean hasApplied()
          Is the applied attribute defined?
 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.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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_APPLIED

public static java.lang.String DEFAULT_APPLIED
Default applied value, which is to apply the fee immediately.

Constructor Detail

EPPFeeValue

public EPPFeeValue()
Default constructor. The command value MUST be set using the setFee(BigDecimal) method.


EPPFeeValue

public EPPFeeValue(java.math.BigDecimal aFee)
Create EPPFeeValue instance with the required fee value.

Parameters:
aFee - The fee value

EPPFeeValue

public EPPFeeValue(java.math.BigDecimal aFee,
                   java.lang.String aDescription)
Create EPPFeeValue instance with the required fee value and the optional description.

Parameters:
aFee - The fee value
aDescription - Human-readable description

EPPFeeValue

public 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.

Parameters:
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.
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.

hasRefundable

public boolean hasRefundable()
Is the refundable attribute defined?

Returns:
true if the refundable attribute is defined; false otherwise.

isRefundable

public java.lang.Boolean isRefundable()
Is the fee refundable?

Returns:
null if undefined, true if the fee is refundable, or false if not refundable.

setRefundable

public void setRefundable(java.lang.Boolean aRefundable)
Sets whether the fee is refundable.

Parameters:
aRefundable - Set to true if the fee is refundable, false, or null if undefined.

hasGracePeriod

public boolean hasGracePeriod()
Is the grace-period defined?

Returns:
true if the grace-period is defined; false otherwise.

getGracePeriod

public java.lang.String getGracePeriod()
Gets the OPTIONAL grace-period value.

Returns:
grace-period value if defined; null otherwise.

setGracePeriod

public void setGracePeriod(java.lang.String aGracePeriod)
Sets the OPTIONAL grace-period value.

Parameters:
aGracePeriod - Grace-period value if defined; null otherwise.

hasApplied

public boolean hasApplied()
Is the applied attribute defined? Applied

Returns:
true if the applied attribute is defined; false otherwise.

getApplied

public java.lang.String getApplied()
Gets the OPTIONAL applied value.

Returns:
The applied that should be one of the APPLIED constant values if set; DEFAULT_APPLIED otherwise.

setApplied

public void setApplied(java.lang.String aApplied)
Sets the applied value.

Parameters:
aApplied - Applied value that should be one of the APPLIED constant values or null to set to the default value of DEFAULT_APPIED.

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.CloneNotSupportedException
Clone EPPFeeValue instance.

Specified by:
clone in interface EPPCodecComponent
Overrides:
clone in class java.lang.Object
Returns:
clone of EPPFeeValue
Throws:
java.lang.CloneNotSupportedException - standard Object.clone exception

decode

public void decode(org.w3c.dom.Element aElement)
            throws EPPDecodeException
Decode the EPPFeeValue element aElement DOM Element tree.

Specified by:
decode in interface EPPCodecComponent
Parameters:
aElement - - Root DOM Element to decode EPPFeeValue 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 the EPPFeeValue instance.

Specified by:
encode in interface EPPCodecComponent
Parameters:
aDocument - - DOM Document that is being built. Used as an Element factory.
Returns:
Element - Root DOM Element representing the EPPFeeValue instance.
Throws:
EPPEncodeException - - Unable to encode EPPFeeValue instance.

equals

public boolean equals(java.lang.Object aObject)
implements a deep EPPFeeValue compare.

Overrides:
equals in class java.lang.Object
Parameters:
aObject - EPPFeeValue instance to compare with
Returns:
true if equal; false otherwise

toString

public java.lang.String toString()
Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

Overrides:
toString in class java.lang.Object
Returns:
Indented XML String if successful; ERROR otherwise.


Copyright © VeriSign Inc. All Rights Reserved.