public class EPPDomain
extends java.lang.Object
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.EPPResponse
,
EPPDomainCreateResp
,
EPPDomainInfoResp
,
EPPDomainCheckResp
,
EPPDomainTransferResp
Modifier and Type | Field and Description |
---|---|
static int |
ADD
Used to specify the addition of an attribute with
setUpdateAttrib . |
static int |
CHANGE
Used to specify the change of an attribute with
setUpdateAttrib . |
static int |
CONTACT
Used to specify a contact update with
setUpdateAttrib . |
static java.lang.String |
CONTACT_ADMINISTRATIVE
Administrative contact constant used with @link{#addContact(String, String)}
|
static java.lang.String |
CONTACT_BILLING
Billing contact constant used with @link{#addContact(String, String)}
|
static java.lang.String |
CONTACT_TECHNICAL
Technical contact constant used with @link{#addContact(String, String)}
|
static int |
HOST
Used to specify a host update with
setUpdateAttrib . |
static java.lang.String |
HOSTS_ALL
Constant on a call to
setHosts to get information on all
hosts (delegated and subordinate). |
static java.lang.String |
HOSTS_DELEGATED
Constant on a call to
setHosts to get information on just
the delegated hosts. |
static java.lang.String |
HOSTS_SUBORDINATE
Constant on a call to
setHosts to get information on just
the subordinate hosts. |
static java.lang.String |
PERIOD_MONTH
Period month unit contant.
|
static java.lang.String |
PERIOD_YEAR
Period year unit constant.
|
static int |
REMOVE
Used to specify the removal of an attribute with
setUpdateAttrib . |
static int |
STATUS
Used to specify a status update with
setUpdateAttrib . |
static java.lang.String |
STATUS_CLIENT_DELETE_PROHIBITED
clientDeleteProhibited constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}. |
static java.lang.String |
STATUS_CLIENT_HOLD
clientHold constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}. |
static java.lang.String |
STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibited constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}. |
static java.lang.String |
STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibited constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}. |
static java.lang.String |
STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibited constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}. |
static java.lang.String |
STATUS_INACTIVE
inactive constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_OK
ok constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_PENDING_CREATE
pendingCreate constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_PENDING_DELETE
pendingDelete constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_PENDING_RENEW
pendingRenew constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_PENDING_TRANSFER
pendingTransfer constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_PENDING_UPDATE
pendingUpdate constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibited constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_SERVER_HOLD
serverHold constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibited constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibited constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibited constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}. |
static java.lang.String |
TRANSFER_APPROVE
Transfer approve operation constant used with @link{#setTransferOpCode(String)}
|
static java.lang.String |
TRANSFER_CANCEL
Transfer cancel operation constant used with @link{#setTransferOpCode(String)}
|
static java.lang.String |
TRANSFER_QUERY
Transfer query operation constant used with @link{#setTransferOpCode(String)}
|
static java.lang.String |
TRANSFER_REJECT
Transfer reject operation constant used with @link{#setTransferOpCode(String)}
|
static java.lang.String |
TRANSFER_REQUEST
Transfer request operation constant used with @link{#setTransferOpCode(String)}
|
Constructor and Description |
---|
EPPDomain(EPPSession aSession)
Constructs an
EPPDomain given an initialized EPP session. |
Modifier and Type | Method and Description |
---|---|
void |
addContact(java.lang.String aName,
java.lang.String aType)
Will add a new contact which includes a name and a type.
|
void |
addDomainName(java.lang.String aDomain)
Adds a domain name for use with a
send method. |
void |
addExtension(EPPCodecComponent aExtension)
Adds a command extension object.
|
void |
addHostAttr(EPPHostAttr aHostAttr)
Adds a host attribute name for use as a Domain delegating host.
|
void |
addHostName(java.lang.String aHost)
Adds a host name for use as a Domain delegating host.
|
java.lang.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 by
setAuthString(String) ,
is associated with the registrant or contact object. |
java.lang.String |
getAuthString()
Sets the authorization string associated with an
sendCreate
and sendTransfer . |
java.util.Date |
getExpirationDate()
Gets the Domain expiration date.
|
java.util.Vector |
getExtensions()
Gets the command extensions.
|
java.lang.String |
getHosts()
Sets the desired level of host information.
|
int |
getPeriodLength()
Gets the registration period.
|
java.lang.String |
getPeriodUnit()
Gets the registration period unit.
|
java.lang.String |
getRegistrant()
Gets the Domain Registrant Contact Identifier.
|
EPPResponse |
getResponse()
Gets the response associated with the last command.
|
protected void |
resetDomain()
Resets the domain instance to its initial state.
|
EPPDomainCheckResp |
sendCheck()
Sends a Domain Name Check Command to the server.
|
EPPDomainCreateResp |
sendCreate()
Sends a Domain Name Create Command to the server.
|
EPPResponse |
sendDelete()
Sends a Domain Name Delete Command to the server.
|
EPPDomainInfoResp |
sendInfo()
Sends a Domain Name Info Command to the server.
|
EPPDomainRenewResp |
sendRenew()
Sends a Domain Name Renew Command to the server.
|
EPPDomainTransferResp |
sendTransfer()
Sends a Domain Name Transfer Command to the server.
|
EPPResponse |
sendUpdate()
Sends a Domain Name Update Command to the server.
|
void |
setAuthRoid(java.lang.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 by
setAuthString(String) ,
is associated with the registrant or contact object. |
void |
setAuthString(java.lang.String aAuthString)
Sets the authorization string associated with an
sendCreate
and sendTransfer and optionally sendInfo . |
void |
setExpirationDate(java.util.Date aExpirationDate)
Sets the Domain expiration date.
|
void |
setExtension(EPPCodecComponent aExtension)
Deprecated.
Replaced by
addExtension(EPPCodecComponent) . This
method will add the extension as is done in addExtension(EPPCodecComponent) . |
void |
setExtensions(java.util.Vector aExtensions)
Sets the command extension objects.
|
void |
setHosts(java.lang.String aHosts)
Sets the desired level of host information.
|
void |
setPeriodLength(int aPeriodLength)
Sets the registration period.
|
void |
setPeriodUnit(java.lang.String aPeriodUnit)
Sets the registration period unit to either
PERIOD_MONTH or
PERIOD_YEAR . |
void |
setRegistrant(java.lang.String aRegistrant)
Sets the Domain Registrant Contact Identifier.
|
void |
setTransferOpCode(java.lang.String aTransferOpCode)
Sets the transfer operation for a call to
encodeTransfer . |
void |
setTransId(java.lang.String aTransId)
Sets the client transaction identifier.
|
void |
setUpdateAttrib(int aType,
EPPDomainStatus aName,
int aOp)
Sets an update to a domain status.
|
void |
setUpdateAttrib(int aType,
java.lang.String aName,
int aOp)
Sets an update to a string list value, which currently can only be used
for domain hosts.
|
void |
setUpdateAttrib(int aType,
java.lang.String aVal,
java.lang.String aValType,
int aOp)
Sets an update to a domain contact.
|
public static final int HOST
setUpdateAttrib
.public static final int CONTACT
setUpdateAttrib
.public static final int STATUS
setUpdateAttrib
.public static final int ADD
setUpdateAttrib
.public static final int REMOVE
setUpdateAttrib
.public static final int CHANGE
setUpdateAttrib
.public static final java.lang.String STATUS_OK
ok
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_SERVER_HOLD
serverHold
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibited
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibited
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibited
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibited
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_INACTIVE
inactive
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_PENDING_CREATE
pendingCreate
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_PENDING_DELETE
pendingDelete
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_PENDING_RENEW
pendingRenew
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_PENDING_TRANSFER
pendingTransfer
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_PENDING_UPDATE
pendingUpdate
constant
used with @link{com.verisign.epp.codec.domain.EPPDomainInfoResp.getStatuses()}.public static final java.lang.String STATUS_CLIENT_HOLD
clientHold
constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.public static final java.lang.String STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibited
constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.public static final java.lang.String STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibited
constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.public static final java.lang.String STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibited
constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.public static final java.lang.String STATUS_CLIENT_DELETE_PROHIBITED
clientDeleteProhibited
constant
used with @link{#setUpdateAttrib(int, EPPDomainStatus, int)}.public static final java.lang.String TRANSFER_APPROVE
public static final java.lang.String TRANSFER_CANCEL
public static final java.lang.String TRANSFER_QUERY
public static final java.lang.String TRANSFER_REJECT
public static final java.lang.String TRANSFER_REQUEST
public static final java.lang.String CONTACT_ADMINISTRATIVE
public static final java.lang.String CONTACT_BILLING
public static final java.lang.String CONTACT_TECHNICAL
public static final java.lang.String PERIOD_MONTH
public static final java.lang.String PERIOD_YEAR
public static final java.lang.String HOSTS_ALL
setHosts
to get information on all
hosts (delegated and subordinate). This is the default settings.public static final java.lang.String HOSTS_DELEGATED
setHosts
to get information on just
the delegated hosts.public static final java.lang.String HOSTS_SUBORDINATE
setHosts
to get information on just
the subordinate hosts.public EPPDomain(EPPSession aSession)
EPPDomain
given an initialized EPP session.aSession
- Server session to use.public void addExtension(EPPCodecComponent aExtension)
aExtension
- command extension object associated with the commandpublic void setExtension(EPPCodecComponent aExtension)
addExtension(EPPCodecComponent)
. This
method will add the extension as is done in addExtension(EPPCodecComponent)
.aExtension
- command extension object associated with the commandpublic void setExtensions(java.util.Vector aExtensions)
aExtensions
- command extension objects associated with the commandpublic java.util.Vector getExtensions()
Vector
of concrete EPPCodecComponent
associated with the command if exists; null
otherwise.public void addDomainName(java.lang.String aDomain)
send
method. Adding more
than one domain name is only supported by sendCheck
.aDomain
- Domain name to addpublic void addHostName(java.lang.String aHost)
aHost
- Host name to addpublic void addHostAttr(EPPHostAttr aHostAttr)
addHostAttr
can not be mixed with calls
to addHostName
.aHostAttr
- aHostAttr Host attributepublic void addContact(java.lang.String aName, java.lang.String aType)
aName
- Contact NameaType
- Contact Type, which should be a
EPPDomain.CONTACT_
constant.public void setExpirationDate(java.util.Date aExpirationDate)
aExpirationDate
- Domain expiration datepublic java.util.Date getExpirationDate()
public void setTransferOpCode(java.lang.String aTransferOpCode)
encodeTransfer
.
The transfer code must be set to one of the
EPPDomain.TRANSFER_
constants.aTransferOpCode
- One of the EPPDomain.TRANSFER_
constantspublic void setTransId(java.lang.String aTransId)
aTransId
- Client transaction identifierpublic void setAuthString(java.lang.String aAuthString)
sendCreate
and sendTransfer
and optionally sendInfo
.aAuthString
- Authorization stringpublic java.lang.String getAuthRoid()
setAuthString(String)
,
is associated with the registrant or contact object. This can be used
with sendTransfer
and sendInfo
along with setting
the authInfo with the setAuthString(String)
method.null
otherwise.public void setAuthRoid(java.lang.String aAuthRoid)
setAuthString(String)
,
is associated with the registrant or contact object. This can be used
with sendTransfer
and sendInfo
along with setting
the authInfo with the setAuthString(String)
method.aAuthRoid
- Roid of registrant or contact objectpublic java.lang.String getAuthString()
sendCreate
and sendTransfer
.null
otherwise.public void setHosts(java.lang.String aHosts)
HOSTS_ALL
.aHosts
- Should be one of the HOSTS_
constants.public java.lang.String getHosts()
HOSTS_
constants.public java.lang.String getRegistrant()
null
otherwise.public void setRegistrant(java.lang.String aRegistrant)
aRegistrant
- Domain Registrant Contact Identifier.public EPPDomainCreateResp sendCreate() throws EPPCommandException
addDomainName
- Sets the domain name to create. Only one
domain name is valid.
setAuthString
- Sets the domain name authorization string.
setTransId
- Sets the client transaction identifier
setPeriodLength
- 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 contact
addHostName
- Add domain delegation host
EPPDomainCreateResp
containing the Domain create
result.EPPCommandException
- Error executing the create command. Use
getResponse
to get the associated server error
response.public EPPResponse sendUpdate() throws EPPCommandException
addDomainName
- Sets the domain name to update. Only one
domain name is valid.
setTransId
- Sets the client transaction identifier
setUpdateAttrib(int,String,int)
- Adds/removes hosts
setUpdateAttrib(int,DomainStatus,int)
- Adds/removes
statuses
setUpdateAttrib(int,String,String,int)
- Adds/removes
contacts
setRegistrant
- Sets the Registrant for the domain.
setAuthString
- Sets the domain name authorization string.
EPPResponse
containing the Domain update result.EPPCommandException
- Error executing the update command. Use
getResponse
to get the associated server error
response.public EPPDomainTransferResp sendTransfer() throws EPPCommandException
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.
setTransId
- Sets the client transaction identifier
setPeriodLength
- Sets the registration period (default =
1)
setPeriodUnit
- Sets the registration period unit (default
= PERIOD_YEAR
)
EPPDomainTransferResp
containing the Domain
transfer result.EPPCommandException
- Error executing the create command. Use
getResponse
to get the associated server error
response.public EPPDomainRenewResp sendRenew() throws EPPCommandException
addDomainName
- Sets the domain name to renew. Only one
domain name is valid.
setExpirationDate
- Sets current expiration date.
setTransId
- Sets the client transaction identifier
setPeriodLength
- Sets the registration period (default =
1)
setPeriodUnit
- Sets the registration period unit (default
= PERIOD_YEAR
)
EPPDomainRenewResp
containing the Domain renew
result.EPPCommandException
- Error executing the renew command. Use
getResponse
to get the associated server error
response.public EPPDomainInfoResp sendInfo() throws EPPCommandException
addDomainName
- Sets the domain name to get info for. Only
one domain name is valid.
setTransId
- Sets the client transaction identifier
setAuthString
- Sets the Authorization string
setHosts
- Sets the desired hosts to one of
the HOSTS_
constants HOSTS_ALL
,
HOSTS_DELEGATED
, or HOSTS_SUBORDINATE
.
HOSTS_ALL
is the default.
EPPDomainInfoResp
containing the Domain
information.EPPCommandException
- Error executing the info command. Use
getResponse
to get the associated server error
response.public EPPDomainCheckResp sendCheck() throws EPPCommandException
addDomainName
- Adds a domain name to check. More than one
domain name can be checked in sendCheck
setTransId
- Sets the client transaction identifier
EPPDomainCheckResp
containing the Domain check
information.EPPCommandException
- Error executing the check command. Use
getResponse
to get the associated server error
response.public EPPResponse sendDelete() throws EPPCommandException
addDomainName
- Sets the domain name to delete. Only one
domain name is valid.
setTransId
- Sets the client transaction identifier
EPPResponse
containing the delete result
information.EPPCommandException
- Error executing the delete command. Use
getResponse
to get the associated server error
response.protected void resetDomain()
public void setUpdateAttrib(int aType, java.lang.String aName, int aOp) throws EPPCommandException
aType
- Must be set to HOST
aName
- Name of hostaOp
- Either ADD
or REMOVE
EPPCommandException
- Invalid type or operationpublic void setUpdateAttrib(int aType, EPPDomainStatus aName, int aOp) throws EPPCommandException
aType
- Must be set to STATUS
aName
- Name of status, which can use one of the
STATUS_
constantsaOp
- Either ADD
or REMOVE
EPPCommandException
- Invalid type or operationpublic void setUpdateAttrib(int aType, java.lang.String aVal, java.lang.String aValType, int aOp) throws EPPCommandException
aType
- Must be set to CONTACT
aVal
- Contact IdentifieraValType
- Contact Type, which should be one of the
CONTACT_
constants.aOp
- Either ADD
or REMOVE
EPPCommandException
- Invalid type or operationpublic EPPResponse getResponse()
public int getPeriodLength()
null
otherwise.public void setPeriodLength(int aPeriodLength)
aPeriodLength
- Registration periodpublic java.lang.String getPeriodUnit()
null
otherwise.public void setPeriodUnit(java.lang.String aPeriodUnit)
PERIOD_MONTH
or
PERIOD_YEAR
.aPeriodUnit
- Registration period unitCopyright © VeriSign Inc. All Rights Reserved.