Package com.verisign.epp.interfaces
Class EPPDomain
java.lang.Object
com.verisign.epp.interfaces.EPPDomain
- Direct Known Subclasses:
EPPRelatedDomain,RZDomain
EPPDomain is the primary client interface class used for domain
management. An instance of EPPDomain is created with an
initialized EPPSession, and can be used for more than one
request within a single thread. A set of setter methods are provided to set
the attributes before a call to one of the send action methods. The responses
returned from the send action methods are either instances of
EPPResponse or instances of response classes in the
com.verisign.epp.codec.domain package.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUsed to specify the addition of an attribute withsetUpdateAttrib.static final intUsed to specify the change of an attribute withsetUpdateAttrib.static final intUsed to specify a contact update withsetUpdateAttrib.static final StringAdministrative contact constant used with @link{#addContact(String, String)}static final StringBilling contact constant used with @link{#addContact(String, String)}static final StringTechnical contact constant used with @link{#addContact(String, String)}static final intUsed to specify a host update withsetUpdateAttrib.static final StringConstant on a call tosetHoststo get information on all hosts (delegated and subordinate).static final StringConstant on a call tosetHoststo get information on just the delegated hosts.static final StringConstant on a call tosetHoststo get information on just the subordinate hosts.static final StringPeriod month unit contant.static final StringPeriod year unit constant.static final intUsed to specify the removal of an attribute withsetUpdateAttrib.static final intUsed to specify a status update withsetUpdateAttrib.static final StringclientDeleteProhibitedconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.static final StringclientHoldconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.static final StringclientRenewProhibitedconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.static final StringclientTransferProhibitedconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.static final StringclientUpdateProhibitedconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.static final Stringinactiveconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final Stringokconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringpendingCreateconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringpendingDeleteconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringpendingRenewconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringpendingTransferconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringpendingUpdateconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringserverDeleteProhibitedconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringserverHoldconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringserverRenewProhibitedconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringserverTransferProhibitedconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringserverUpdateProhibitedconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.static final StringTransfer approve operation constant used with @link{#setTransferOpCode(String)}static final StringTransfer cancel operation constant used with @link{#setTransferOpCode(String)}static final StringTransfer query operation constant used with @link{#setTransferOpCode(String)}static final StringTransfer reject operation constant used with @link{#setTransferOpCode(String)}static final StringTransfer request operation constant used with @link{#setTransferOpCode(String)} -
Constructor Summary
ConstructorsConstructorDescriptionEPPDomain(EPPSession aSession) Constructs anEPPDomaingiven an initialized EPP session. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContact(String aName, String aType) Will add a new contact which includes a name and a type.voidaddDomainName(String aDomain) Adds a domain name for use with asendmethod.voidaddExtension(EPPCodecComponent aExtension) Adds a command extension object.voidaddHostAttr(EPPHostAttr aHostAttr) Adds a host attribute name for use as a Domain delegating host.voidaddHostName(String aHost) Adds a host name for use as a Domain delegating host.Gets the set authorization information if defined.Sets the authorization roid that is used to identify the registrant or contact object if and only if the value of authInfo, set bysetAuthString(String), is associated with the registrant or contact object.Sets the authorization string associated with ansendCreateandsendTransfer.Gets the Domain expiration date.Gets the command extensions.getHosts()Sets the desired level of host information.intGets the registration period.Gets the registration period unit.Gets the Domain Registrant Contact Identifier.Gets the response associated with the last command.protected voidResets the domain instance to its initial state.Sends a Domain Name Check Command to the server.
The required attributes have been set with the following methods:
addDomainName- Adds a domain name to check.Sends a Domain Name Create Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to create.Sends a Domain Name Delete Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to delete.sendInfo()Sends a Domain Name Info Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to get info for.Sends a Domain Name Renew Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to renew.Sends a Domain Name Transfer Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name for transfer command.Sends a Domain Name Update Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to update.voidsetAuthInfo(EPPAuthInfo aAuthInfo) Sets the authorization information using theEPPAuthInfoobject.voidsetAuthRoid(String aAuthRoid) Gets the authorization roid that is used to identify the registrant or contact object if and only if the value of authInfo, set bysetAuthString(String), is associated with the registrant or contact object.voidsetAuthString(String aAuthString) Sets the authorization string associated with ansendCreateandsendTransferand optionallysendInfo.voidsetExpirationDate(Date aExpirationDate) Sets the Domain expiration date.voidsetExtension(EPPCodecComponent aExtension) Deprecated.voidsetExtensions(Vector aExtensions) Sets the command extension objects.voidSets the desired level of host information.voidsetPeriodLength(int aPeriodLength) Sets the registration period.voidsetPeriodUnit(String aPeriodUnit) Sets the registration period unit to eitherPERIOD_MONTHorPERIOD_YEAR.voidsetRegistrant(String aRegistrant) Sets the Domain Registrant Contact Identifier.voidsetTransferOpCode(String aTransferOpCode) Sets the transfer operation for a call toencodeTransfer.voidsetTransId(String aTransId) Sets the client transaction identifier.voidsetUpdateAttrib(int aType, EPPDomainStatus aName, int aOp) Sets an update to a domain status.voidsetUpdateAttrib(int aType, String aName, int aOp) Sets an update to a string list value, which currently can only be used for domain hosts.voidsetUpdateAttrib(int aType, String aVal, String aValType, int aOp) Sets an update to a domain contact.
-
Field Details
-
HOST
public static final int HOSTUsed to specify a host update withsetUpdateAttrib.- See Also:
-
CONTACT
public static final int CONTACTUsed to specify a contact update withsetUpdateAttrib.- See Also:
-
STATUS
public static final int STATUSUsed to specify a status update withsetUpdateAttrib.- See Also:
-
ADD
public static final int ADDUsed to specify the addition of an attribute withsetUpdateAttrib.- See Also:
-
REMOVE
public static final int REMOVEUsed to specify the removal of an attribute withsetUpdateAttrib.- See Also:
-
CHANGE
public static final int CHANGEUsed to specify the change of an attribute withsetUpdateAttrib.- See Also:
-
STATUS_OK
okconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_SERVER_HOLD
serverHoldconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibitedconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibitedconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibitedconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibitedconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_INACTIVE
inactiveconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_PENDING_CREATE
pendingCreateconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_PENDING_DELETE
pendingDeleteconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_PENDING_RENEW
pendingRenewconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_PENDING_TRANSFER
pendingTransferconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_PENDING_UPDATE
pendingUpdateconstant used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.- See Also:
-
STATUS_CLIENT_HOLD
clientHoldconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.- See Also:
-
STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibitedconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.- See Also:
-
STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibitedconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.- See Also:
-
STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibitedconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.- See Also:
-
STATUS_CLIENT_DELETE_PROHIBITED
clientDeleteProhibitedconstant used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.- See Also:
-
TRANSFER_APPROVE
Transfer approve operation constant used with @link{#setTransferOpCode(String)}- See Also:
-
TRANSFER_CANCEL
Transfer cancel operation constant used with @link{#setTransferOpCode(String)}- See Also:
-
TRANSFER_QUERY
Transfer query operation constant used with @link{#setTransferOpCode(String)}- See Also:
-
TRANSFER_REJECT
Transfer reject operation constant used with @link{#setTransferOpCode(String)}- See Also:
-
TRANSFER_REQUEST
Transfer request operation constant used with @link{#setTransferOpCode(String)}- See Also:
-
CONTACT_ADMINISTRATIVE
Administrative contact constant used with @link{#addContact(String, String)}- See Also:
-
CONTACT_BILLING
Billing contact constant used with @link{#addContact(String, String)}- See Also:
-
CONTACT_TECHNICAL
Technical contact constant used with @link{#addContact(String, String)}- See Also:
-
PERIOD_MONTH
Period month unit contant.- See Also:
-
PERIOD_YEAR
Period year unit constant. This is the default unit.- See Also:
-
HOSTS_ALL
Constant on a call tosetHoststo get information on all hosts (delegated and subordinate). This is the default settings.- See Also:
-
HOSTS_DELEGATED
Constant on a call tosetHoststo get information on just the delegated hosts.- See Also:
-
HOSTS_SUBORDINATE
Constant on a call tosetHoststo get information on just the subordinate hosts.- See Also:
-
-
Constructor Details
-
EPPDomain
Constructs anEPPDomaingiven an initialized EPP session.- Parameters:
aSession- Server session to use.
-
-
Method Details
-
addExtension
Adds a command extension object.- Parameters:
aExtension- command extension object associated with the command
-
setExtension
Deprecated.Replaced byaddExtension(EPPCodecComponent). This method will add the extension as is done inaddExtension(EPPCodecComponent).Sets a command extension object.- Parameters:
aExtension- command extension object associated with the command
-
setExtensions
Sets the command extension objects.- Parameters:
aExtensions- command extension objects associated with the command
-
getExtensions
Gets the command extensions.- Returns:
Vectorof concreteEPPCodecComponentassociated with the command if exists;nullotherwise.
-
addDomainName
Adds a domain name for use with asendmethod. Adding more than one domain name is only supported bysendCheck.- Parameters:
aDomain- Domain name to add
-
addHostName
Adds a host name for use as a Domain delegating host.- Parameters:
aHost- Host name to add
-
addHostAttr
Adds a host attribute name for use as a Domain delegating host. Calls toaddHostAttrcan not be mixed with calls toaddHostName.- Parameters:
aHostAttr- aHostAttr Host attribute
-
addContact
Will add a new contact which includes a name and a type.- Parameters:
aName- Contact NameaType- Contact Type, which should be aEPPDomain.CONTACT_constant.
-
setExpirationDate
Sets the Domain expiration date.- Parameters:
aExpirationDate- Domain expiration date
-
getExpirationDate
Gets the Domain expiration date.- Returns:
- Domain expiration date
-
setTransferOpCode
Sets the transfer operation for a call toencodeTransfer. The transfer code must be set to one of theEPPDomain.TRANSFER_constants.- Parameters:
aTransferOpCode- One of theEPPDomain.TRANSFER_constants
-
setTransId
Sets the client transaction identifier.- Parameters:
aTransId- Client transaction identifier
-
setAuthString
Sets the authorization string associated with ansendCreateandsendTransferand optionallysendInfo.- Parameters:
aAuthString- Authorization string
-
getAuthRoid
Sets the authorization roid that is used to identify the registrant or contact object if and only if the value of authInfo, set bysetAuthString(String), is associated with the registrant or contact object. This can be used withsendTransferandsendInfoalong with setting the authInfo with thesetAuthString(String)method.- Returns:
- Roid of registrant or contact object if defined;
nullotherwise.
-
setAuthRoid
Gets the authorization roid that is used to identify the registrant or contact object if and only if the value of authInfo, set bysetAuthString(String), is associated with the registrant or contact object. This can be used withsendTransferandsendInfoalong with setting the authInfo with thesetAuthString(String)method.- Parameters:
aAuthRoid- Roid of registrant or contact object
-
getAuthString
Sets the authorization string associated with ansendCreateandsendTransfer.- Returns:
- Authorization string if defined;
nullotherwise.
-
getAuthInfo
Gets the set authorization information if defined.- Returns:
- The authorization information if defined;
nullotherwise.
-
setAuthInfo
Sets the authorization information using theEPPAuthInfoobject.- Parameters:
aAuthInfo- The authorization information to set.
-
setHosts
Sets the desired level of host information. The default isHOSTS_ALL.- Parameters:
aHosts- Should be one of theHOSTS_constants.
-
getHosts
Sets the desired level of host information.- Returns:
- Should be one of the
HOSTS_constants.
-
getRegistrant
Gets the Domain Registrant Contact Identifier.- Returns:
- Domain Registrant Contact Identifier if defined;
nullotherwise.
-
setRegistrant
Sets the Domain Registrant Contact Identifier.- Parameters:
aRegistrant- Domain Registrant Contact Identifier.
-
sendCreate
Sends a Domain Name Create Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to create. Only one domain name is valid.setAuthString- Sets the domain name authorization string.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetPeriodLength- Sets the registration period (default = 1)setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)setRegistrant- Sets the Registrant for the domain. This is required for thick registries.addContact- Add domain contactaddHostName- Add domain delegation host
- Returns:
EPPDomainCreateRespcontaining the Domain create result.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto get the associated server error response.
-
sendUpdate
Sends a Domain Name Update Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to update. Only one domain name is valid.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetUpdateAttrib(int,String,int)- Adds/removes hostssetUpdateAttrib(int,DomainStatus,int)- Adds/removes statusessetUpdateAttrib(int,String,String,int)- Adds/removes contactssetRegistrant- Sets the Registrant for the domain.setAuthString- Sets the domain name authorization string.
- Returns:
EPPResponsecontaining the Domain update result.- Throws:
EPPCommandException- Error executing the update command. UsegetResponseto get the associated server error response.
-
sendTransfer
Sends a Domain Name Transfer Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name for transfer command. Only one domain name is valid.setTransferOpCode- Sets the domain transfer operation.setAuthString- Sets the domain name authorization string.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetPeriodLength- Sets the registration period (default = 1)setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)
- Returns:
EPPDomainTransferRespcontaining the Domain transfer result.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto get the associated server error response.
-
sendRenew
Sends a Domain Name Renew Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to renew. Only one domain name is valid.setExpirationDate- Sets current expiration date.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetPeriodLength- Sets the registration period (default = 1)setPeriodUnit- Sets the registration period unit (default =PERIOD_YEAR)
- Returns:
EPPDomainRenewRespcontaining the Domain renew result.- Throws:
EPPCommandException- Error executing the renew command. UsegetResponseto get the associated server error response.
-
sendInfo
Sends a Domain Name Info Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to get info for. Only one domain name is valid.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetAuthString- Sets the Authorization stringsetHosts- Sets the desired hosts to one of theHOSTS_constantsHOSTS_ALL,HOSTS_DELEGATED, orHOSTS_SUBORDINATE.HOSTS_ALLis the default.
- Returns:
EPPDomainInfoRespcontaining the Domain information.- Throws:
EPPCommandException- Error executing the info command. UsegetResponseto get the associated server error response.
-
sendCheck
Sends a Domain Name Check Command to the server.
The required attributes have been set with the following methods:
addDomainName- Adds a domain name to check. More than one domain name can be checked insendCheck
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifier
- Returns:
EPPDomainCheckRespcontaining the Domain check information.- Throws:
EPPCommandException- Error executing the check command. UsegetResponseto get the associated server error response.
-
sendDelete
Sends a Domain Name Delete Command to the server.
The required attributes have been set with the following methods:
addDomainName- Sets the domain name to delete. Only one domain name is valid.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifier
- Returns:
EPPResponsecontaining the delete result information.- Throws:
EPPCommandException- Error executing the delete command. UsegetResponseto get the associated server error response.
-
resetDomain
protected void resetDomain()Resets the domain instance to its initial state. -
setUpdateAttrib
Sets an update to a string list value, which currently can only be used for domain hosts. Domain hosts can only be added or removed.- Parameters:
aType- Must be set toHOSTaName- Name of hostaOp- EitherADDorREMOVE- Throws:
EPPCommandException- Invalid type or operation
-
setUpdateAttrib
Sets an update to a domain status. Domain statuses can be either added or removed.- Parameters:
aType- Must be set toSTATUSaName- Name of status, which can use one of theSTATUS_constantsaOp- EitherADDorREMOVE- Throws:
EPPCommandException- Invalid type or operation
-
setUpdateAttrib
public void setUpdateAttrib(int aType, String aVal, String aValType, int aOp) throws EPPCommandException Sets an update to a domain contact. Domain contacts can be either added or removed.- Parameters:
aType- Must be set toCONTACTaVal- Contact IdentifieraValType- Contact Type, which should be one of theCONTACT_constants.aOp- EitherADDorREMOVE- Throws:
EPPCommandException- Invalid type or operation
-
getResponse
Gets the response associated with the last command. This method can be used to retrieve the server error response in the catch block of EPPCommandException.- Returns:
- Response associated with the last command
-
getPeriodLength
public int getPeriodLength()Gets the registration period.- Returns:
- Registration period;
nullotherwise.
-
setPeriodLength
public void setPeriodLength(int aPeriodLength) Sets the registration period.- Parameters:
aPeriodLength- Registration period
-
getPeriodUnit
Gets the registration period unit.- Returns:
- Registration period unit if defined;
nullotherwise.
-
setPeriodUnit
Sets the registration period unit to eitherPERIOD_MONTHorPERIOD_YEAR.- Parameters:
aPeriodUnit- Registration period unit
-
addExtension(EPPCodecComponent).