Package com.verisign.epp.codec.domain
Class EPPDomainRenewCmd
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPCommand
-
- com.verisign.epp.codec.gen.EPPRenewCmd
-
- com.verisign.epp.codec.domain.EPPDomainRenewCmd
-
- All Implemented Interfaces:
EPPCodecComponent
,EPPMessage
,java.io.Serializable
,java.lang.Cloneable
public class EPPDomainRenewCmd extends EPPRenewCmd
Represents an EPP Domain <renew> command, which provides a transform operation that allows a client to extend the validity period of a domain object. The EPP <renew> command provides a transform operation that allows a client to extend the validity period of a domain object. In addition to the standard EPP command elements, the <renew> command MUST contain a <domain:renew> element that identifies the domain namespace and the location of the domain schema. The <domain:renew> element SHALL contain the following child elements:
- A <domain:name> element that contains the fully qualified domain
name of the object whose validity period is to be extended. Use
getName
andsetName
to get and set the element. - A <domain: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
getCurExpDate
andsetCurExpDate
to get and set the element. - An OPTIONAL <domain:period> element that contains the initial
registration period of the domain object. Use
getPeriod
andsetPeriod
to get and set the element. If returnnull
, period has not been specified yet.
- See Also:
EPPDomainRenewResp
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
XML local name forEPPDomainRenewCmd
.static java.lang.String
ELM_NAME
XML Element Name ofEPPDomainRenewCmd
root element.-
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 EPPDomainRenewCmd()
Allocates a newEPPDomainRenewCmd
with default attribute values.EPPDomainRenewCmd(java.lang.String aTransId, java.lang.String aName, java.util.Date aCurExpDate)
EPPDomainRenewCmd
constructor that takes the domain name and the current expiration year as arguments.EPPDomainRenewCmd(java.lang.String aTransId, java.lang.String aName, java.util.Date aCurExpDate, EPPDomainPeriod aPeriod)
EPPDomainRenewCmd
constructor 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.Object
clone()
CloneEPPDomainRenewCmd
.protected void
doDecode(org.w3c.dom.Element aElement)
Decode theEPPDomainRenewCmd
attributes from the aElement DOM Element tree.protected org.w3c.dom.Element
doEncode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPDomainRenewCmd
instance.boolean
equals(java.lang.Object aObject)
Compare an instance ofEPPDomainRenewCmd
with this instance.java.util.Date
getCurExpDate()
Get current expiration date.java.lang.String
getName()
Gets the domain name to renew.java.lang.String
getNamespace()
Gets the EPP command Namespace associated withEPPDomainRenewCmd
.EPPDomainPeriod
getPeriod()
Gets the registration period of the renew command in years.void
setCurExpDate(java.util.Date newCurExpDate)
Set current expiration date.void
setName(java.lang.String aName)
Sets the domain name to renew.void
setPeriod(EPPDomainPeriod aPeriod)
Sets the registration period of the renew command in years.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation 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
-
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPDomainRenewCmd
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML Element Name ofEPPDomainRenewCmd
root element.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPDomainRenewCmd
public EPPDomainRenewCmd()
Allocates a newEPPDomainRenewCmd
with default attribute values. the defaults include the following:
- name is set to
null
- period is set to
1 year
- current expiration date to
null
The name and current expiration year must be set before invokingencode
. - name is set to
-
EPPDomainRenewCmd
public EPPDomainRenewCmd(java.lang.String aTransId, java.lang.String aName, java.util.Date aCurExpDate)
EPPDomainRenewCmd
constructor that takes the domain name and the current expiration year as arguments. The period will default to 1 year.- Parameters:
aTransId
- Transaction Id associated with command.aName
- Domain name to renew.aCurExpDate
- The current expiration date of the domain
-
EPPDomainRenewCmd
public EPPDomainRenewCmd(java.lang.String aTransId, java.lang.String aName, java.util.Date aCurExpDate, EPPDomainPeriod aPeriod)
EPPDomainRenewCmd
constructor that takes all of the attributes of the renew command as arguments.- Parameters:
aTransId
- Transaction Id associated with command.aName
- Domain name to renew.aCurExpDate
- The current expiration date of the domain.aPeriod
- Registration period in years.
-
-
Method Detail
-
getNamespace
public java.lang.String getNamespace()
Gets the EPP command Namespace associated withEPPDomainRenewCmd
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Specified by:
getNamespace
in interfaceEPPMessage
- Specified by:
getNamespace
in classEPPCommand
- Returns:
EPPDomainMapFactory.NS
-
getName
public java.lang.String getName()
Gets the domain name to renew.- Returns:
- Domain Name if defined;
null
otherwise.
-
setName
public void setName(java.lang.String aName)
Sets the domain name to renew.- Parameters:
aName
- Domain Name
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPDomainRenewCmd
with this instance.- Overrides:
equals
in classEPPRenewCmd
- Parameters:
aObject
- Object to compare with.- Returns:
- DOCUMENT ME!
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPDomainRenewCmd
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classEPPCommand
- Returns:
- clone of
EPPDomainRenewCmd
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classEPPCommand
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getCurExpDate
public java.util.Date getCurExpDate()
Get current expiration date.- Returns:
- java.util.Date
-
getPeriod
public EPPDomainPeriod 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
- java.util.Date
-
setPeriod
public void setPeriod(EPPDomainPeriod 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 EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPDomainRenewCmd
instance.- Specified by:
doEncode
in classEPPRenewCmd
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPDomainRenewCmd
instance. - Throws:
EPPEncodeException
- Unable to encodeEPPDomainRenewCmd
instance.
-
doDecode
protected void doDecode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPDomainRenewCmd
attributes from the aElement DOM Element tree.- Specified by:
doDecode
in classEPPRenewCmd
- Parameters:
aElement
- Root DOM Element to decodeEPPDomainRenewCmd
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
-