Class EPPRegistryPeriodType
- java.lang.Object
-
- com.verisign.epp.codec.registry.v02.EPPRegistryPeriodType
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
EPPRegistryDefaultPeriodType,EPPRegistryGracePeriod,EPPRegistryMaxPeriodType,EPPRegistryMinPeriodType,EPPRegistryPendingDeletePeriodType,EPPRegistryPendingRestorePeriodType,EPPRegistryRedemptionPeriodType,EPPRegistryTransferHoldPeriodType
public abstract class EPPRegistryPeriodType extends java.lang.Object implements EPPCodecComponent
Abstract class for defining a period with a number and unit. The root element is defined by the sub-class.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEPPRegistryPeriodType.UnitPossible values for theunitattribute.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_UNITAttribute name for theunitattribute.static java.lang.StringELM_LOCALNAMEDefault root element local nameprotected java.lang.IntegernumberNumber of the periodprotected EPPRegistryPeriodType.UnitunitUnit of the period
-
Constructor Summary
Constructors Constructor Description EPPRegistryPeriodType()Default constructor forEPPRegistryPeriodType.EPPRegistryPeriodType(int aNumber, EPPRegistryPeriodType.Unit aUnit)EPPRegistryPeriodTypeconstructor that takes both the period number as anintand unit.EPPRegistryPeriodType(java.lang.Integer aNumber, EPPRegistryPeriodType.Unit aUnit)EPPRegistryPeriodTypeconstructor that takes both the period number as anIntegerand unit.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPRegistryPeriodType.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryPeriodTypeattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryPeriodTypeinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryPeriodTypecompare.java.lang.IntegergetNumber()Gets the period number.protected java.lang.StringgetRootName()Gets the root element local name.EPPRegistryPeriodType.UnitgetUnit()Gets the period unit.voidsetNumber(java.lang.Integer aNumber)Sets the period number.voidsetUnit(EPPRegistryPeriodType.Unit aUnit)Sets the period unit.java.lang.StringtoString()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, wait
-
Methods inherited from interface com.verisign.epp.codec.gen.EPPCodecComponent
getNamespace
-
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Default root element local name- See Also:
- Constant Field Values
-
ATTR_UNIT
public static final java.lang.String ATTR_UNIT
Attribute name for theunitattribute.- See Also:
- Constant Field Values
-
number
protected java.lang.Integer number
Number of the period
-
unit
protected EPPRegistryPeriodType.Unit unit
Unit of the period
-
-
Constructor Detail
-
EPPRegistryPeriodType
public EPPRegistryPeriodType()
Default constructor forEPPRegistryPeriodType. Thenumberandunitattributes must be set.
-
EPPRegistryPeriodType
public EPPRegistryPeriodType(java.lang.Integer aNumber, EPPRegistryPeriodType.Unit aUnit)EPPRegistryPeriodTypeconstructor that takes both the period number as anIntegerand unit.- Parameters:
aNumber- Period numberaUnit- Period unit
-
EPPRegistryPeriodType
public EPPRegistryPeriodType(int aNumber, EPPRegistryPeriodType.Unit aUnit)EPPRegistryPeriodTypeconstructor that takes both the period number as anintand unit.- Parameters:
aNumber- Period numberaUnit- Period unit
-
-
Method Detail
-
getRootName
protected java.lang.String getRootName()
Gets the root element local name.- Returns:
- Root element local name.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode 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
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode 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
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryPeriodTypecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPRegistryPeriodTypeinstance to compare with- Returns:
trueif this object is the same as the aObject argument;falseotherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryPeriodType.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPRegistryPeriodType - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getNumber
public java.lang.Integer getNumber()
Gets the period number.- Returns:
- Period number if defined;
nullotherwise.
-
setNumber
public void setNumber(java.lang.Integer aNumber)
Sets the period number.- Parameters:
aNumber- Period number
-
getUnit
public EPPRegistryPeriodType.Unit getUnit()
Gets the period unit.- Returns:
- Period unit if defined;
nullotherwise.
-
setUnit
public void setUnit(EPPRegistryPeriodType.Unit aUnit)
Sets the period unit.- Parameters:
aUnit- Period unit
-
-