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,Serializable,Cloneable
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
getNameandsetNameto 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
getCurExpDateandsetCurExpDateto get and set the element. - An OPTIONAL <domain:period> element that contains the initial
registration period of the domain object. Use
getPeriodandsetPeriodto get and set the element. If returnnull, period has not been specified yet.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML local name forEPPDomainRenewCmd.static final StringXML Element Name ofEPPDomainRenewCmdroot 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
ConstructorsConstructorDescriptionAllocates a newEPPDomainRenewCmdwith default attribute values.EPPDomainRenewCmd(String aTransId, String aName, Date aCurExpDate) EPPDomainRenewCmdconstructor that takes the domain name and the current expiration year as arguments.EPPDomainRenewCmd(String aTransId, String aName, Date aCurExpDate, EPPDomainPeriod aPeriod) EPPDomainRenewCmdconstructor that takes all of the attributes of the renew command as arguments. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPDomainRenewCmd.protected voidDecode theEPPDomainRenewCmdattributes from the aElement DOM Element tree.protected ElementEncode a DOM Element tree from the attributes of theEPPDomainRenewCmdinstance.booleanCompare an instance ofEPPDomainRenewCmdwith this instance.Get current expiration date.getKey()Gets the key for the domain name object, which is the domain name.getName()Gets the domain name to renew.Gets the EPP command Namespace associated withEPPDomainRenewCmd.Gets the registration period of the renew command in years.voidsetCurExpDate(Date newCurExpDate) Set current expiration date.voidSets the domain name to renew.voidsetPeriod(EPPDomainPeriod aPeriod) Sets the registration period of the renew command in years.toString()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, getTypeMethods inherited from class com.verisign.epp.codec.gen.EPPCommand
addExtension, decode, encode, findDuplicateExtNamespaces, findExtNamespaces, findExtNamespaceSuffixes, findUnsupportedExtNamespaces, findUnsupportedExtNamespaceSuffixes, getExtension, getExtension, getExtensions, getOp, getTransId, hasExtension, hasExtensions, hasKey, hasTransId, setExtension, setExtensions, setTransId
-
Field Details
-
ELM_LOCALNAME
XML local name forEPPDomainRenewCmd.- See Also:
-
ELM_NAME
XML Element Name ofEPPDomainRenewCmdroot element.- See Also:
-
-
Constructor Details
-
EPPDomainRenewCmd
public EPPDomainRenewCmd()Allocates a newEPPDomainRenewCmdwith 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
EPPDomainRenewCmdconstructor 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
EPPDomainRenewCmdconstructor 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 Details
-
getNamespace
Gets the EPP command Namespace associated withEPPDomainRenewCmd.- Specified by:
getNamespacein interfaceEPPCodecComponent- Specified by:
getNamespacein interfaceEPPMessage- Specified by:
getNamespacein classEPPCommand- Returns:
EPPDomainMapFactory.NS
-
getKey
Gets the key for the domain name object, which is the domain name.- Overrides:
getKeyin classEPPCommand- Returns:
- The domain name if set;
nullotherwise.
-
getName
Gets the domain name to renew.- Returns:
- Domain Name if defined;
nullotherwise.
-
setName
Sets the domain name to renew.- Parameters:
aName- Domain Name
-
equals
Compare an instance ofEPPDomainRenewCmdwith this instance.- Overrides:
equalsin classEPPRenewCmd- Parameters:
aObject- Object to compare with.- Returns:
- DOCUMENT ME!
-
clone
CloneEPPDomainRenewCmd.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPCommand- Returns:
- clone of
EPPDomainRenewCmd - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classEPPCommand- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getCurExpDate
Get current expiration date.- Returns:
- java.util.Date
-
getPeriod
Gets the registration period of the renew command in years.- Returns:
- Registration Period in years.
-
setCurExpDate
Set current expiration date.- Parameters:
newCurExpDate- java.util.Date
-
setPeriod
Sets the registration period of the renew command in years.- Parameters:
aPeriod- Registration Period in years.
-
doEncode
Encode a DOM Element tree from the attributes of theEPPDomainRenewCmdinstance.- Specified by:
doEncodein classEPPRenewCmd- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPDomainRenewCmdinstance. - Throws:
EPPEncodeException- Unable to encodeEPPDomainRenewCmdinstance.
-
doDecode
Decode theEPPDomainRenewCmdattributes from the aElement DOM Element tree.- Specified by:
doDecodein classEPPRenewCmd- Parameters:
aElement- Root DOM Element to decodeEPPDomainRenewCmdfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-