public class EPPFeePeriod extends java.lang.Object implements EPPCodecComponent
unit
attribute.
Valid values for the unit
attribute are y
for years
and m
for months.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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. |
java.lang.String |
getNamespace()
Returns the XML namespace associated with the
EPPCodecComponent . |
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 . |
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
.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 valuepublic 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
.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EPPFeePeriod
instance.clone
in interface EPPCodecComponent
clone
in class java.lang.Object
EPPFeePeriod
java.lang.CloneNotSupportedException
- standard Object.clone exceptionpublic void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
decode
in interface EPPCodecComponent
aElement
- - Root DOM Element to decode EPPFeePeriod from.EPPDecodeException
- Unable to decode aElementpublic org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encode
in interface EPPCodecComponent
aDocument
- - 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.Object
aObject
- EPPFeePeriod
instance to compare withtrue
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.Object
String
if successful;
ERROR
otherwise.public java.lang.String getNamespace()
EPPCodecComponent
.getNamespace
in interface EPPCodecComponent
EPPCodecComponent
.Copyright © VeriSign Inc. All Rights Reserved.