|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.verisign.epp.codec.balance.EPPCreditThreshold
public class EPPCreditThreshold
The EPPCreditThreshold
is the EPPCodecComponent
that knows how to encode and decode Credit Threshold Type elements from/to
XML and object instance.
Field Summary | |
---|---|
static java.lang.String |
FIXED
The constant value for FIXED |
static java.lang.String |
PERCENT
The constant value for PERCENT |
Constructor Summary | |
---|---|
EPPCreditThreshold()
Create a new instance of EPPCreditThreshold. |
|
EPPCreditThreshold(java.lang.String aType,
java.math.BigDecimal aCreditThresholdValue)
Create a new instance of EPPCreditThreshold with the given threshold type and threshold amount |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone EPPCreditThreshold . |
void |
decode(org.w3c.dom.Element aElement)
Populate the data of this instance with the data stored in the given Element of the DOM tree. |
org.w3c.dom.Element |
encode(org.w3c.dom.Document aDocument)
Append all attributes frm the EPPCreditThreshold to the
given DOM Document |
boolean |
equals(java.lang.Object aObject)
implements a deep EPPCreditThreshold compare. |
java.lang.String |
getType()
Gets the type of the credit threshold, which is either EPPCreditThreshold.FIXED or
EPPCreditThreshold.PERCENT . |
java.math.BigDecimal |
getValue()
Gets the credit threshold value. |
void |
setType(java.lang.String aType)
Sets the type of the credit threshold, which is either EPPCreditThreshold.FIXED or
EPPCreditThreshold.PERCENT . |
void |
setValue(java.math.BigDecimal aCreditThresholdValue)
Sets the credit threshold value. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FIXED
public static final java.lang.String PERCENT
Constructor Detail |
---|
public EPPCreditThreshold()
type
defaults to EPPCreditThreshold.FIXED
and the
creditThresholdValue
value needs to be set via
setValue(BigDecimal)
prior to called
encode(Document)
.
public EPPCreditThreshold(java.lang.String aType, java.math.BigDecimal aCreditThresholdValue)
aType
- the type value to use for this instance. Should use one of the
static constants defined for this class as a value.aCreditThresholdValue
- The threshold amount in a fixed dollar amount if
aType
is EPPCreditThreshold.FIXED
or
in a percentage value if aType
is
EPPCreditThreshold.PERCENT
Method Detail |
---|
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
EPPCreditThreshold
to the
given DOM Document
encode
in interface EPPCodecComponent
aDocument
- The DOM Document to append data to
Element
EPPEncodeException
- Thrown when errors occur during the encode attempt or if the
instance is invalid.public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
decode
in interface EPPCodecComponent
aElement
- The root element of the report fragment of XML
EPPDecodeException
- Thrown if any errors occur during decoding.public boolean equals(java.lang.Object aObject)
EPPCreditThreshold
compare.
equals
in class java.lang.Object
aObject
- EPPCreditThreshold
instance to compare with
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EPPCreditThreshold
.
clone
in interface EPPCodecComponent
clone
in class java.lang.Object
EPPCreditThreshold
java.lang.CloneNotSupportedException
- standard Object.clone exceptionpublic java.lang.String getType()
EPPCreditThreshold.FIXED
or
EPPCreditThreshold.PERCENT
.
EPPCreditThreshold.FIXED
is the default value.
EPPCreditThreshold.FIXED
or
EPPCreditThreshold.PERCENT
public void setType(java.lang.String aType)
EPPCreditThreshold.FIXED
or
EPPCreditThreshold.PERCENT
.
aType
- Either EPPCreditThreshold.FIXED
or
EPPCreditThreshold.PERCENT
public java.math.BigDecimal getValue()
null
otherwise.public void setValue(java.math.BigDecimal aCreditThresholdValue)
type
is EPPCreditThreshold.FIXED
and is a
percentage of the value if the type
is
EPPCreditThreshold.PERCENT
.
aCreditThresholdValue
- Credit threshold value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |