public class EPPDomainPeriod 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
EPPDomainPeriod. |
static java.lang.String |
ELM_NAME
XML Element Name of
EPPDomainPeriod root element. |
static java.lang.String |
PERIOD_UNIT_MONTH
Period in Unit Month
|
static java.lang.String |
PERIOD_UNIT_YEAR
Period in Unit Year
|
| Constructor and Description |
|---|
EPPDomainPeriod()
EPPDomainPeriod default constructor. |
EPPDomainPeriod(int aPeriod)
EPPDomainPeriod constructor that takes the domain period (in unit
of year) as an argument |
EPPDomainPeriod(java.lang.String aPUnit,
int aPeriod)
EPPDomainPeriod constructor that takes the domain period and
period unit as an arguments |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Clone
EPPDomainPeriod. |
void |
decode(org.w3c.dom.Element aElement)
Decode the EPPDomainPeriod 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 EPPDomainPeriod
instance.
|
boolean |
equals(java.lang.Object aObject)
implements a deep
EPPDomainPeriod compare. |
java.lang.String |
getNamespace()
Returns the XML namespace associated with the
EPPCodecComponent. |
int |
getPeriod()
Get domain period.
|
java.lang.String |
getPUnit()
Get domain period unit.
|
boolean |
isPeriodUnspec()
Test whether the period has been specfied:
true is unspecified and
false is specified. |
void |
setPeriod(int newPeriod)
Set domain period.
|
void |
setPUnit(java.lang.String newPUnit)
Set domain period of un.
|
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
EPPDomainPeriod.public static final java.lang.String ELM_NAME
EPPDomainPeriod root element.public static final java.lang.String PERIOD_UNIT_MONTH
public static final java.lang.String PERIOD_UNIT_YEAR
public EPPDomainPeriod()
EPPDomainPeriod default constructor. The period is initialized to
unspecified. The period must be set before invoking
encode.public EPPDomainPeriod(int aPeriod)
EPPDomainPeriod constructor that takes the domain period (in unit
of year) as an argumentaPeriod - intpublic EPPDomainPeriod(java.lang.String aPUnit,
int aPeriod)
EPPDomainPeriod constructor that takes the domain period and
period unit as an argumentsaPUnit - StringaPeriod - intpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
EPPDomainPeriod.clone in interface EPPCodecComponentclone in class java.lang.ObjectEPPDomainPeriodjava.lang.CloneNotSupportedException - standard Object.clone exceptionpublic void decode(org.w3c.dom.Element aElement)
throws EPPDecodeException
decode in interface EPPCodecComponentaElement - - Root DOM Element to decode EPPDomainPeriod from.EPPDecodeException - Unable to decode aElementpublic 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 EPPDomainPeriod instance.public boolean equals(java.lang.Object aObject)
EPPDomainPeriod compare.equals in class java.lang.ObjectaObject - EPPDomainPeriod instance to compare withtrue if equal; false otherwise.public int getPeriod()
public java.lang.String getPUnit()
public boolean isPeriodUnspec()
true is unspecified and
false is specified.public void setPeriod(int newPeriod)
throws EPPCodecException
newPeriod - intEPPCodecException - DOCUMENT ME!public void setPUnit(java.lang.String newPUnit)
newPUnit - java.lang.Stringpublic 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.