Package com.verisign.epp.codec.emailFwd
Class EPPEmailFwdPeriod
- java.lang.Object
-
- com.verisign.epp.codec.emailFwd.EPPEmailFwdPeriod
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPEmailFwdPeriod extends java.lang.Object implements EPPCodecComponent
Represents a emailFwd Period. A emailFwd name object MAY have a specified validity period. If server policy supports emailFwd object validity periods, the validity period is defined when a emailFwd 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 emailFwd object's validity period.
Validity periods are measured in years or months with the appropriate units specified using theunitattribute. Valid values for theunitattribute areyfor years andmfor months.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPERIOD_UNIT_MONTHPeriod in Unit Monthstatic java.lang.StringPERIOD_UNIT_YEARPeriod in Unit Year
-
Constructor Summary
Constructors Constructor Description EPPEmailFwdPeriod()EPPEmailFwdPerioddefault constructor.EPPEmailFwdPeriod(int aPeriod)EPPEmailFwdPeriodconstructor that takes the emailFwd period (in unit of year) as an argumentEPPEmailFwdPeriod(java.lang.String aPUnit, int aPeriod)EPPEmailFwdPeriodconstructor that takes the emailFwd period and period unit as an arguments
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPEmailFwdPeriod.voiddecode(org.w3c.dom.Element aElement)Decode the EPPEmailFwdPeriod attributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of the EPPEmailFwdPeriod instance.booleanequals(java.lang.Object aObject)implements a deepEPPEmailFwdPeriodcompare.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.intgetPeriod()Get emailFwd period.java.lang.StringgetPUnit()Get emailFwd period unit.booleanisPeriodUnspec()Test whether the period has been specfied:trueis unspecified andfalseis specified.voidsetPeriod(int newPeriod)Set emailFwd period.voidsetPUnit(java.lang.String newPUnit)Set emailFwd period of un.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
PERIOD_UNIT_MONTH
public static final java.lang.String PERIOD_UNIT_MONTH
Period in Unit Month- See Also:
- Constant Field Values
-
PERIOD_UNIT_YEAR
public static final java.lang.String PERIOD_UNIT_YEAR
Period in Unit Year- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPEmailFwdPeriod
public EPPEmailFwdPeriod()
EPPEmailFwdPerioddefault constructor. The period is initialized tounspecified. The period must be set before invokingencode.
-
EPPEmailFwdPeriod
public EPPEmailFwdPeriod(int aPeriod)
EPPEmailFwdPeriodconstructor that takes the emailFwd period (in unit of year) as an argument- Parameters:
aPeriod- int
-
EPPEmailFwdPeriod
public EPPEmailFwdPeriod(java.lang.String aPUnit, int aPeriod)EPPEmailFwdPeriodconstructor that takes the emailFwd period and period unit as an arguments- Parameters:
aPUnit- StringaPeriod- int
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPEmailFwdPeriod.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPEmailFwdPeriod - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode the EPPEmailFwdPeriod attributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- - Root DOM Element to decode EPPEmailFwdPeriod from.- Throws:
EPPDecodeException- Unable to decode aElement
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of the EPPEmailFwdPeriod 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 EPPEmailFwdPeriod instance.
- Throws:
EPPEncodeException- - Unable to encode EPPEmailFwdPeriod instance.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPEmailFwdPeriodcompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPEmailFwdPeriodinstance to compare with- Returns:
- DOCUMENT ME!
-
getPeriod
public int getPeriod()
Get emailFwd period.- Returns:
- int
-
getPUnit
public java.lang.String getPUnit()
Get emailFwd period unit.- Returns:
- String
-
isPeriodUnspec
public boolean isPeriodUnspec()
Test whether the period has been specfied:trueis unspecified andfalseis specified.- Returns:
- boolean
-
setPeriod
public void setPeriod(int newPeriod) throws EPPCodecExceptionSet emailFwd period.- Parameters:
newPeriod- int- Throws:
EPPCodecException- DOCUMENT ME!
-
setPUnit
public void setPUnit(java.lang.String newPUnit)
Set emailFwd period of un. Creation date: (5/30/01 11:36:52 AM)- Parameters:
newPUnit- java.lang.String
-
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.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-