Class EPPRegistryPeriodType
java.lang.Object
com.verisign.epp.codec.registry.v02.EPPRegistryPeriodType
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
- Direct Known Subclasses:
EPPRegistryDefaultPeriodType,EPPRegistryGracePeriod,EPPRegistryMaxPeriodType,EPPRegistryMinPeriodType,EPPRegistryPendingDeletePeriodType,EPPRegistryPendingRestorePeriodType,EPPRegistryRedemptionPeriodType,EPPRegistryTransferHoldPeriodType
Abstract class for defining a period with a number and unit. The root element
is defined by the sub-class.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPossible values for theunitattribute. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAttribute name for theunitattribute.static final StringDefault root element local nameprotected IntegerNumber of the periodprotected EPPRegistryPeriodType.UnitUnit of the period -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor forEPPRegistryPeriodType.EPPRegistryPeriodType(int aNumber, EPPRegistryPeriodType.Unit aUnit) EPPRegistryPeriodTypeconstructor that takes both the period number as anintand unit.EPPRegistryPeriodType(Integer aNumber, EPPRegistryPeriodType.Unit aUnit) EPPRegistryPeriodTypeconstructor that takes both the period number as anIntegerand unit. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPRegistryPeriodType.voidDecode theEPPRegistryPeriodTypeattributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPRegistryPeriodTypeinstance.booleanimplements a deepEPPRegistryPeriodTypecompare.Gets the period number.protected StringGets the root element local name.getUnit()Gets the period unit.voidSets the period number.voidSets the period unit.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.verisign.epp.codec.gen.EPPCodecComponent
getNamespace
-
Field Details
-
ELM_LOCALNAME
Default root element local name- See Also:
-
ATTR_UNIT
Attribute name for theunitattribute.- See Also:
-
number
Number of the period -
unit
Unit of the period
-
-
Constructor Details
-
EPPRegistryPeriodType
public EPPRegistryPeriodType()Default constructor forEPPRegistryPeriodType. Thenumberandunitattributes must be set. -
EPPRegistryPeriodType
EPPRegistryPeriodTypeconstructor that takes both the period number as anIntegerand unit.- Parameters:
aNumber- Period numberaUnit- Period unit
-
EPPRegistryPeriodType
EPPRegistryPeriodTypeconstructor that takes both the period number as anintand unit.- Parameters:
aNumber- Period numberaUnit- Period unit
-
-
Method Details
-
getRootName
Gets the root element local name.- Returns:
- Root element local name.
-
encode
Encode a DOM Element tree from the attributes of theEPPRegistryPeriodTypeinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryPeriodTypeinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryPeriodTypeinstance.
-
decode
Decode theEPPRegistryPeriodTypeattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPRegistryPeriodTypefrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
equals
implements a deepEPPRegistryPeriodTypecompare. -
clone
CloneEPPRegistryPeriodType.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPRegistryPeriodType - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNumber
Gets the period number.- Returns:
- Period number if defined;
nullotherwise.
-
setNumber
Sets the period number.- Parameters:
aNumber- Period number
-
getUnit
Gets the period unit.- Returns:
- Period unit if defined;
nullotherwise.
-
setUnit
Sets the period unit.- Parameters:
aUnit- Period unit
-