Package com.verisign.epp.codec.nameWatch
Class EPPNameWatchRenewCmd
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPCommand
-
- com.verisign.epp.codec.gen.EPPRenewCmd
-
- com.verisign.epp.codec.nameWatch.EPPNameWatchRenewCmd
-
- All Implemented Interfaces:
EPPCodecComponent,EPPMessage,java.io.Serializable,java.lang.Cloneable
public class EPPNameWatchRenewCmd extends EPPRenewCmd
Represents an EPP NameWatch <renew> command, which provides a transform operation that allows a client to extend the validity period of a nameWatch object. The EPP <renew> command provides a transform operation that allows a client to extend the validity period of a nameWatch object. In addition to the standard EPP command elements, the <renew> command MUST contain a <nameWatch:renew> element that identifies the nameWatch namespace and the location of the nameWatch schema. The <nameWatch:renew> element SHALL contain the following child elements:
-
A <nameWatch:roid> element that contains the fully qualified nameWatch
roid of the object whose validity period is to be extended. Use
getRoidandsetRoidto get and set the element. -
A <nameWatch:curExpDate> element that contains the date on which the
current validity period ends. This value ensures that repeated
<renew> commands do not result in multiple unanticipated successful
renewals. Use
getCurExpDateandsetCurExpDateto get and set the element. -
An OPTIONAL <nameWatch:period> element that contains the initial
registration period of the nameWatch object. Use
getPeriodandsetPeriodto get and set the element. If returnnull, period has not been specified yet.
- See Also:
EPPNameWatchRenewResp, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.verisign.epp.codec.gen.EPPCommand
extensions, OP_APPROVE, OP_CANCEL, OP_QUERY, OP_REJECT, OP_REQUEST, transId, TYPE_CHECK, TYPE_CREATE, TYPE_DELETE, TYPE_INFO, TYPE_LOGIN, TYPE_LOGOUT, TYPE_POLL, TYPE_RENEW, TYPE_TRANSFER, TYPE_UPDATE
-
-
Constructor Summary
Constructors Constructor Description EPPNameWatchRenewCmd()Allocates a newEPPNameWatchRenewCmdwith default attribute values.EPPNameWatchRenewCmd(java.lang.String aTransId, java.lang.String aRoid, java.util.Date aCurExpDate)EPPNameWatchRenewCmdconstructor that takes the nameWatch roid and the current expiration year as arguments.EPPNameWatchRenewCmd(java.lang.String aTransId, java.lang.String aRoid, java.util.Date aCurExpDate, EPPNameWatchPeriod aPeriod)EPPNameWatchRenewCmdconstructor that takes all of the attributes of the renew command as arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPNameWatchRenewCmd.protected voiddoDecode(org.w3c.dom.Element aElement)Decode theEPPNameWatchRenewCmdattributes from the aElement DOM Element tree.protected org.w3c.dom.ElementdoEncode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPNameWatchRenewCmdinstance.booleanequals(java.lang.Object aObject)Compare an instance ofEPPNameWatchRenewCmdwith this instance.java.util.DategetCurExpDate()Get current expiration date.java.lang.StringgetNamespace()Gets the EPP command Namespace associated withEPPNameWatchRenewCmd.EPPNameWatchPeriodgetPeriod()Gets the registration period of the renew command in years.java.lang.StringgetRoid()Gets the nameWatch roid to renew.voidsetCurExpDate(java.util.Date newCurExpDate)Set current expiration date.voidsetPeriod(EPPNameWatchPeriod aPeriod)Sets the registration period of the renew command in years.voidsetRoid(java.lang.String aRoid)Sets the nameWatch roid to renew.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.-
Methods inherited from class com.verisign.epp.codec.gen.EPPRenewCmd
doGenDecode, doGenEncode, getType
-
Methods inherited from class com.verisign.epp.codec.gen.EPPCommand
addExtension, decode, encode, findDuplicateExtNamespaces, findExtNamespaces, findExtNamespaceSuffixes, findUnsupportedExtNamespaces, findUnsupportedExtNamespaceSuffixes, getExtension, getExtension, getExtensions, getOp, getTransId, hasExtension, hasExtensions, hasTransId, setExtension, setExtensions, setTransId
-
-
-
-
Constructor Detail
-
EPPNameWatchRenewCmd
public EPPNameWatchRenewCmd()
Allocates a newEPPNameWatchRenewCmdwith default attribute values. the defaults include the following:
-
roid is set to
null -
period is set to
1 year -
current expiration date to
null
The roid and current expiration year must be set before invokingencode. -
roid is set to
-
EPPNameWatchRenewCmd
public EPPNameWatchRenewCmd(java.lang.String aTransId, java.lang.String aRoid, java.util.Date aCurExpDate)EPPNameWatchRenewCmdconstructor that takes the nameWatch roid and the current expiration year as arguments. The period will default to 1 year.- Parameters:
aTransId- Transaction Id associated with command.aRoid- NameWatch roid to renew.aCurExpDate- The current expiration date of the nameWatch
-
EPPNameWatchRenewCmd
public EPPNameWatchRenewCmd(java.lang.String aTransId, java.lang.String aRoid, java.util.Date aCurExpDate, EPPNameWatchPeriod aPeriod)EPPNameWatchRenewCmdconstructor that takes all of the attributes of the renew command as arguments.- Parameters:
aTransId- Transaction Id associated with command.aRoid- NameWatch roid to renew.aCurExpDate- The current expiration date of the nameWatch.aPeriod- Registration period in years.
-
-
Method Detail
-
getNamespace
public java.lang.String getNamespace()
Gets the EPP command Namespace associated withEPPNameWatchRenewCmd.- Specified by:
getNamespacein interfaceEPPCodecComponent- Specified by:
getNamespacein interfaceEPPMessage- Specified by:
getNamespacein classEPPCommand- Returns:
EPPNameWatchMapFactory.NS
-
getRoid
public java.lang.String getRoid()
Gets the nameWatch roid to renew.- Returns:
- NameWatch Roid
-
setRoid
public void setRoid(java.lang.String aRoid)
Sets the nameWatch roid to renew.- Parameters:
aRoid- NameWatch Roid
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPNameWatchRenewCmdwith this instance.- Overrides:
equalsin classEPPRenewCmd- Parameters:
aObject- Object to compare with.- Returns:
- DOCUMENT ME!
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPNameWatchRenewCmd.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPCommand- Returns:
- clone of
EPPNameWatchRenewCmd - 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 classEPPCommand- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getCurExpDate
public java.util.Date getCurExpDate()
Get current expiration date.- Returns:
- curExpDate
-
getPeriod
public EPPNameWatchPeriod getPeriod()
Gets the registration period of the renew command in years.- Returns:
- Registration Period in years.
-
setCurExpDate
public void setCurExpDate(java.util.Date newCurExpDate)
Set current expiration date.- Parameters:
newCurExpDate- Current Expiration Date
-
setPeriod
public void setPeriod(EPPNameWatchPeriod aPeriod)
Sets the registration period of the renew command in years.- Parameters:
aPeriod- Registration Period in years.
-
doEncode
protected org.w3c.dom.Element doEncode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPNameWatchRenewCmdinstance.- Specified by:
doEncodein classEPPRenewCmd- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPNameWatchRenewCmdinstance. - Throws:
EPPEncodeException- Unable to encodeEPPNameWatchRenewCmdinstance.
-
doDecode
protected void doDecode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPNameWatchRenewCmdattributes from the aElement DOM Element tree.- Specified by:
doDecodein classEPPRenewCmd- Parameters:
aElement- Root DOM Element to decodeEPPNameWatchRenewCmdfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
-