|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.verisign.epp.codec.fee.v11.EPPFeePeriod
public class EPPFeePeriod
Represents a fee period. Validity periods are measured in years or months
with the appropriate units specified using the unit attribute.
Valid values for the unit attribute are y for years
and m for months.
| Field Summary | |
|---|---|
static java.lang.String |
ELM_LOCALNAME
XML local name for EPPFeePeriod. |
static int |
MAX_PERIOD
Maximum number of periods. |
static int |
MIN_PERIOD
Minimum number of periods. |
static java.lang.String |
PERIOD_UNIT_MONTH
Period in Unit Month |
static java.lang.String |
PERIOD_UNIT_YEAR
Period in Unit Year |
static int |
UNSPEC_PERIOD
Unspecified Period |
| Constructor Summary | |
|---|---|
EPPFeePeriod()
EPPFeePeriod default constructor. |
|
EPPFeePeriod(int aPeriod)
EPPFeePeriod constructor that takes the period value with a
default unit of PERIOD_UNIT_YEAR. |
|
EPPFeePeriod(java.lang.String aPUnit,
int aPeriod)
EPPFeePeriod constructor that takes the period and period
unit as an arguments. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clone EPPFeePeriod instance. |
void |
decode(org.w3c.dom.Element aElement)
Decode the EPPFeePeriod attributes from the aElement DOM Element tree. |
org.w3c.dom.Element |
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of the EPPFeePeriod instance. |
boolean |
equals(java.lang.Object aObject)
Implements a deep EPPFeePeriod compare. |
int |
getPeriod()
Get the period. |
java.lang.String |
getPUnit()
Get the period unit. |
boolean |
isPeriodUnspec()
Test whether the period has been specified. |
void |
setPeriod(int aPeriod)
Set the period. |
void |
setPUnit(java.lang.String aPUnit)
Sets the period unit. |
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 |
|---|
public static final java.lang.String PERIOD_UNIT_MONTH
public static final java.lang.String PERIOD_UNIT_YEAR
public static final int UNSPEC_PERIOD
public static final int MAX_PERIOD
public static final int MIN_PERIOD
public static final java.lang.String ELM_LOCALNAME
EPPFeePeriod.
| Constructor Detail |
|---|
public EPPFeePeriod()
EPPFeePeriod default constructor. The period is initialized
to UNSPEC_PERIOD. The period must be set before invoking
encode.
public EPPFeePeriod(int aPeriod)
EPPFeePeriod constructor that takes the period value with a
default unit of PERIOD_UNIT_YEAR.
aPeriod - Period value
public EPPFeePeriod(java.lang.String aPUnit,
int aPeriod)
EPPFeePeriod constructor that takes the period and period
unit as an arguments.
aPUnit - Period valueaPeriod - The period unit that must be either
PERIOD_UNIT_YEAR or
PERIOD_UNIT_MONTH.| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
EPPFeePeriod instance.
clone in interface EPPCodecComponentclone in class java.lang.ObjectEPPFeePeriod
java.lang.CloneNotSupportedException - standard Object.clone exception
public void decode(org.w3c.dom.Element aElement)
throws EPPDecodeException
decode in interface EPPCodecComponentaElement - - Root DOM Element to decode EPPFeePeriod from.
EPPDecodeException - Unable to decode aElement
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
throws EPPEncodeException
encode in interface EPPCodecComponentaDocument - - DOM Document that is being built. Used as an Element
factory.
EPPEncodeException - - Unable to encode EPPFeePeriod instance.public boolean equals(java.lang.Object aObject)
EPPFeePeriod compare.
equals in class java.lang.ObjectaObject - EPPFeePeriod instance to compare with
true if equals; false otherwise.public int getPeriod()
UNSPEC_PERIOD otherwise.public java.lang.String getPUnit()
PERIOD_UNIT_YEAR for year or
PERIOD_UNIT_MONTH for month.public boolean isPeriodUnspec()
true if unspecified; false otherwise.
public void setPeriod(int aPeriod)
throws EPPCodecException
aPeriod - Period value. Can be UNSPEC_PERIOD to clear the
period; otherwise the period must be between
MIN_PERIOD and MAX_PERIOD.
EPPCodecException - Error with period value.public void setPUnit(java.lang.String aPUnit)
aPUnit - Must be either PERIOD_UNIT_YEAR or
PERIOD_UNIT_MONTH. If not, no change will be
made.public 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||