Package com.verisign.epp.codec.defReg
Class EPPDefRegPeriod
java.lang.Object
com.verisign.epp.codec.defReg.EPPDefRegPeriod
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
Represents a defReg Period. A defReg name object MAY have a specified
validity period. If server policy supports defReg object validity periods,
the validity period is defined when a defReg object is created, and it MAY
be extended by the EPP <renew> or <transfer> commands. As a
matter of server policy, this specification does not define actions to be
taken upon expiration of a defReg object's validity period.
Validity periods are measured in years or months with the appropriate units specified using the
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.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEPPDefRegPerioddefault constructor.EPPDefRegPeriod(int aPeriod) EPPDefRegPeriodconstructor that takes the defReg period (in unit of year) as an argumentEPPDefRegPeriod(String aPUnit, int aPeriod) EPPDefRegPeriodconstructor that takes the defReg period and period unit as an arguments -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPDefRegPeriod.voidDecode the EPPDefRegPeriod attributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of the EPPDefRegPeriod instance.booleanimplements a deepEPPDefRegPeriodcompare.Returns the XML namespace associated with theEPPCodecComponent.intGet defReg period.getPUnit()Get defReg period unit.booleanTest whether the period has been specfied:trueis unspecified andfalseis specified.voidsetPeriod(int newPeriod) Set defReg period.voidSet defReg period of un.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
PERIOD_UNIT_MONTH
Period in Unit Month- See Also:
-
PERIOD_UNIT_YEAR
Period in Unit Year- See Also:
-
-
Constructor Details
-
EPPDefRegPeriod
public EPPDefRegPeriod()EPPDefRegPerioddefault constructor. The period is initialized tounspecified. The period must be set before invokingencode. -
EPPDefRegPeriod
public EPPDefRegPeriod(int aPeriod) EPPDefRegPeriodconstructor that takes the defReg period (in unit of year) as an argument- Parameters:
aPeriod- int
-
EPPDefRegPeriod
EPPDefRegPeriodconstructor that takes the defReg period and period unit as an arguments- Parameters:
aPUnit- StringaPeriod- int
-
-
Method Details
-
clone
CloneEPPDefRegPeriod.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPDefRegPeriod - Throws:
CloneNotSupportedException- standard Object.clone exception
-
decode
Decode the EPPDefRegPeriod attributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- - Root DOM Element to decode EPPDefRegPeriod from.- Throws:
EPPDecodeException- Unable to decode aElement
-
encode
Encode a DOM Element tree from the attributes of the EPPDefRegPeriod instance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- - DOM Document that is being built. Used as an Element factory.- Returns:
- Element - Root DOM Element representing the EPPDefRegPeriod instance.
- Throws:
EPPEncodeException- - Unable to encode EPPDefRegPeriod instance.
-
equals
implements a deepEPPDefRegPeriodcompare. -
getPeriod
public int getPeriod()Get defReg period.- Returns:
- int
-
getPUnit
Get defReg period unit.- Returns:
- String
-
isPeriodUnspec
public boolean isPeriodUnspec()Test whether the period has been specfied:trueis unspecified andfalseis specified.- Returns:
- boolean
-
setPeriod
Set defReg period.- Parameters:
newPeriod- int- Throws:
EPPCodecException- DOCUMENT ME!
-
setPUnit
Set defReg period of un. Creation date: (5/30/01 11:36:52 AM)- Parameters:
newPUnit- java.lang.String
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-