public class EPPEmailFwd
extends java.lang.Object
EPPEmailFwd
is the primary client interface class used for email
forward management. An instance of EPPEmailFwd
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.emailFwd
package. 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
addContact(String, String) |
static java.lang.String |
CONTACT_BILLING
Billing contact constant used with
addContact(String, String) |
static java.lang.String |
CONTACT_TECHNICAL
Technical contact constant used with
addContact(String, String) |
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
setUpdateAttrib(int, EPPEmailFwdStatus, int) . |
static java.lang.String |
STATUS_CLIENT_HOLD
clientHold constant |
static java.lang.String |
STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibited constant used with
setUpdateAttrib(int, EPPEmailFwdStatus, int) . |
static java.lang.String |
STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibited constant used with
setUpdateAttrib(int, EPPEmailFwdStatus, int) . |
static java.lang.String |
STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibited constant used with
setUpdateAttrib(int, EPPEmailFwdStatus, int) . |
static java.lang.String |
STATUS_OK
ok constant |
static java.lang.String |
STATUS_PENDING_CREATE
pendingCreate constant |
static java.lang.String |
STATUS_PENDING_DELETE
pendingDelete constant |
static java.lang.String |
STATUS_PENDING_RENEW
pendingRenew constant |
static java.lang.String |
STATUS_PENDING_TRANSFER
pendingTransfer constant |
static java.lang.String |
STATUS_PENDING_UPDATE
pendingUpdate constant |
static java.lang.String |
STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibited constant |
static java.lang.String |
STATUS_SERVER_HOLD
serverHold constant |
static java.lang.String |
STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibited constant |
static java.lang.String |
STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibited constant |
static java.lang.String |
STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibited constant |
static java.lang.String |
TRANSFER_APPROVE
Transfer approve operation constant used with
setTransferOpCode(String) |
static java.lang.String |
TRANSFER_CANCEL
Transfer cancel operation constant used with
setTransferOpCode(String) |
static java.lang.String |
TRANSFER_QUERY
Transfer query operation constant used with
setTransferOpCode(String) |
static java.lang.String |
TRANSFER_REJECT
Transfer reject operation constant used with
setTransferOpCode(String) |
static java.lang.String |
TRANSFER_REQUEST
Transfer request operation constant used with
setTransferOpCode(String) |
Constructor and Description |
---|
EPPEmailFwd(EPPSession newSession)
Constructs an
EPPEmailFwd given an initialized EPP session. |
Modifier and Type | Method and Description |
---|---|
void |
addContact(java.lang.String newName,
java.lang.String newType)
Will add a new contact which includes a name and a type.
|
void |
addEmailFwdName(java.lang.String newEmailFwd)
Adds an email forward for use with a
send method. |
void |
addExtension(EPPCodecComponent aExtension)
Adds a command extension object.
|
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 Email Forward expiration date.
|
java.util.Vector |
getExtensions()
Gets the command extensions.
|
java.lang.String |
getForwardTo()
Gets the forward to e-mail address associated with
sendCreate
and sendUpdate . |
int |
getPeriodLength()
Gets the registration period.
|
java.lang.String |
getPeriodUnit()
Gets the registration period unit.
|
java.lang.String |
getRegistrant()
Gets the Email Forward Registrant Contact Identifier.
|
EPPResponse |
getResponse()
Gets the response associated with the last command.
|
EPPEmailFwdCheckResp |
sendCheck()
Sends an Email Forward Check Command to the server.
The required attributes have been set with the following methods: addEmailFwdName - Adds an email forward to check. |
EPPEmailFwdCreateResp |
sendCreate()
Sends an Email Forward Create Command to the server.
The required attributes have been set with the following methods: addEmailFwdName - Sets the email forward to create. |
EPPResponse |
sendDelete()
Sends an Email Forward Delete Command to the server.
The required attributes have been set with the following methods: addEmailFwdName - Sets the email forward to delete. |
EPPEmailFwdInfoResp |
sendInfo()
Sends an Email Forward Info Command to the server.
The required attributes have been set with the following methods: addEmailFwdName - Sets the email forward to get info for. |
EPPEmailFwdRenewResp |
sendRenew()
Sends an Email Forward Renew Command to the server.
The required attributes have been set with the following methods: addEmailFwdName - Sets the email forward to renew. |
EPPEmailFwdTransferResp |
sendTransfer()
Sends an Email Forward Transfer Command to the server.
The required attributes have been set with the following methods: addEmailFwdName - Sets the email forward for transfer
command. |
EPPResponse |
sendUpdate()
Sends an Email Forward Update Command to the server.
The required attributes have been set with the following methods: addEmailFwdName - Sets the email forward to update. |
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 newAuthString)
Sets the authorization string associated with an
sendCreate
and sendTransfer . |
void |
setExpirationDate(java.util.Date newExpirationDate)
Sets the Email Forward expiration date.
|
void |
setExtension(EPPCodecComponent aExtension)
Deprecated.
Replaced by
addExtension(EPPCodecComponent) . This
method will add the extension as is done in
addExtension(EPPCodecComponet) . |
void |
setExtensions(java.util.Vector aExtensions)
Sets the command extension objects.
|
void |
setForwardTo(java.lang.String newForwardTo)
Sets the forward to e-mail address associated with
sendCreate
and sendUpdate . |
void |
setPeriodLength(int newPeriodLength)
Gets the registration period.
|
void |
setPeriodUnit(java.lang.String newPeriodUnit)
Sets the registration period unit to either
PERIOD_MONTH or
PERIOD_YEAR . |
void |
setRegistrant(java.lang.String aRegistrant)
Sets the Email Forward Registrant Contact Identifier.
|
void |
setTransferOpCode(java.lang.String newTransferOpCode)
Sets the transfer operation for a call to
encodeTransfer . |
void |
setTransId(java.lang.String newTransId)
Sets the client transaction identifier.
|
void |
setUpdateAttrib(int newType,
EPPEmailFwdStatus newName,
int newOp)
Sets an update to an email forward status.
|
void |
setUpdateAttrib(int newType,
java.lang.String newVal,
java.lang.String newValType,
int newOp)
Sets an update to an email forward contact.
|
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
constantpublic static final java.lang.String STATUS_SERVER_HOLD
serverHold
constantpublic static final java.lang.String STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibited
constantpublic static final java.lang.String STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibited
constantpublic static final java.lang.String STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibited
constantpublic static final java.lang.String STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibited
constantpublic static final java.lang.String STATUS_PENDING_CREATE
pendingCreate
constantpublic static final java.lang.String STATUS_PENDING_DELETE
pendingDelete
constantpublic static final java.lang.String STATUS_PENDING_RENEW
pendingRenew
constantpublic static final java.lang.String STATUS_PENDING_TRANSFER
pendingTransfer
constantpublic static final java.lang.String STATUS_PENDING_UPDATE
pendingUpdate
constantpublic static final java.lang.String STATUS_CLIENT_HOLD
clientHold
constantpublic static final java.lang.String STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibited
constant used with
setUpdateAttrib(int, EPPEmailFwdStatus, int)
.public static final java.lang.String STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibited
constant used with
setUpdateAttrib(int, EPPEmailFwdStatus, int)
.public static final java.lang.String STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibited
constant used with
setUpdateAttrib(int, EPPEmailFwdStatus, int)
.public static final java.lang.String STATUS_CLIENT_DELETE_PROHIBITED
clientDeleteProhibited
constant used with
setUpdateAttrib(int, EPPEmailFwdStatus, int)
.public static final java.lang.String TRANSFER_APPROVE
setTransferOpCode(String)
public static final java.lang.String TRANSFER_CANCEL
setTransferOpCode(String)
public static final java.lang.String TRANSFER_QUERY
setTransferOpCode(String)
public static final java.lang.String TRANSFER_REJECT
setTransferOpCode(String)
public static final java.lang.String TRANSFER_REQUEST
setTransferOpCode(String)
public static final java.lang.String CONTACT_ADMINISTRATIVE
addContact(String, String)
public static final java.lang.String CONTACT_BILLING
addContact(String, String)
public static final java.lang.String CONTACT_TECHNICAL
addContact(String, String)
public static final java.lang.String PERIOD_MONTH
public static final java.lang.String PERIOD_YEAR
public EPPEmailFwd(EPPSession newSession)
EPPEmailFwd
given an initialized EPP session.newSession
- Server session to use.public void addExtension(EPPCodecComponent aExtension)
aExtension
- command extension object associated with the command@Deprecated public void setExtension(EPPCodecComponent aExtension)
addExtension(EPPCodecComponent)
. This
method will add the extension as is done in
addExtension(EPPCodecComponet)
.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 addEmailFwdName(java.lang.String newEmailFwd)
send
method. Adding more
than one email forward is only supported by sendCheck
.newEmailFwd
- Email Forward name to addpublic void addContact(java.lang.String newName, java.lang.String newType)
newName
- Contact NamenewType
- Contact Type, which should be a
EPPEmailFwd.CONTACT_
constant.public void setExpirationDate(java.util.Date newExpirationDate)
newExpirationDate
- Email Forward expiration datepublic java.util.Date getExpirationDate()
public void setTransferOpCode(java.lang.String newTransferOpCode)
encodeTransfer
. The
transfer code must be set to one of the EPPEmailFwd.TRANSFER_
constants.newTransferOpCode
- One of the EPPEmailFwd.TRANSFER_
constantspublic void setTransId(java.lang.String newTransId)
newTransId
- Client transaction identifierpublic void setAuthString(java.lang.String newAuthString)
sendCreate
and sendTransfer
.newAuthString
- Authorization stringpublic java.lang.String getAuthString()
sendCreate
and sendTransfer
.null
otherwise.public java.lang.String getAuthRoid()
setAuthString(String)
, is associated with the registrant or
contact object. This can be used with sendTransfer
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
along with
setting the authInfo with the setAuthString(String)
method.aAuthRoid
- Roid of registrant or contact objectpublic void setForwardTo(java.lang.String newForwardTo)
sendCreate
and sendUpdate
.newForwardTo
- Forward to e-mail addresspublic java.lang.String getForwardTo()
sendCreate
and sendUpdate
.public java.lang.String getRegistrant()
null
otherwise.public void setRegistrant(java.lang.String aRegistrant)
aRegistrant
- Email Forward Registrant Contact Identifier.public EPPEmailFwdCreateResp sendCreate() throws EPPCommandException
addEmailFwdName
- Sets the email forward to create. Only
one email forward is valid.setForwardTo
- Sets the forward to e-mail addresssetAuthString
- Sets the email forward authorization
string.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 email
forward. This is required for thick registries.addContact
- Add email forward contactEPPEmailFwdCreateResp
containing the Email Forward
create result.EPPCommandException
- Error executing the create command. Use
getResponse
to get the associated server error
response.public EPPResponse sendUpdate() throws EPPCommandException
addEmailFwdName
- Sets the email forward to update. Only
one email forward is valid.setTransId
- Sets the client transaction identifiersetForwardTo
- Sets the forward to e-mail addresssetUpdateAttrib(int,EmailFwdStatus,int)
- Adds/removes
statusessetUpdateAttrib(int,String,String,int)
- Adds/removes
contactssetRegistrant
- Sets the Registrant for the email
forward.setAuthString
- Sets the email forward authorization
string.EPPResponse
containing the Email Forward update
result.EPPCommandException
- Error executing the update command. Use
getResponse
to get the associated server error
response.public EPPEmailFwdTransferResp sendTransfer() throws EPPCommandException
addEmailFwdName
- Sets the email forward for transfer
command. Only one email forward is valid.setTransferOpCode
- Sets the email forward transfer
operation.setAuthString
- Sets the email forward authorization
string.setTransId
- Sets the client transaction identifiersetPeriodLength
- Sets the registration period (default =
1)setPeriodUnit
- Sets the registration period unit
(default = PERIOD_YEAR
)EPPEmailFwdTransferResp
containing the Email Forward
transfer result.EPPCommandException
- Error executing the create command. Use
getResponse
to get the associated server error
response.public EPPEmailFwdRenewResp sendRenew() throws EPPCommandException
addEmailFwdName
- Sets the email forward to renew. Only
one email forward is valid.setExpirationDate
- Sets current expiration date.setTransId
- Sets the client transaction identifiersetPeriodLength
- Sets the registration period (default =
1)setPeriodUnit
- Sets the registration period unit
(default = PERIOD_YEAR
)EPPEmailFwdRenewResp
containing the Email Forward
renew result.EPPCommandException
- Error executing the renew command. Use
getResponse
to get the associated server error
response.public EPPEmailFwdInfoResp sendInfo() throws EPPCommandException
addEmailFwdName
- Sets the email forward to get info for.
Only one email forward is valid.setTransId
- Sets the client transaction identifierEPPEmailFwdInfoResp
containing the Email Forward
information.EPPCommandException
- Error executing the info command. Use
getResponse
to get the associated server error
response.public EPPEmailFwdCheckResp sendCheck() throws EPPCommandException
addEmailFwdName
- Adds an email forward to check. More
than one email forward can be checked in sendCheck
setTransId
- Sets the client transaction identifierEPPEmailFwdCheckResp
containing the Email Forward
check information.EPPCommandException
- Error executing the check command. Use
getResponse
to get the associated server error
response.public EPPResponse sendDelete() throws EPPCommandException
addEmailFwdName
- Sets the email forward to delete. Only
one email forward is valid.setTransId
- Sets the client transaction identifierEPPResponse
containing the delete result information.EPPCommandException
- Error executing the delete command. Use
getResponse
to get the associated server error
response.public void setUpdateAttrib(int newType, EPPEmailFwdStatus newName, int newOp) throws EPPCommandException
newType
- Must be set to STATUS
newName
- Name of status, which can use one of the STATUS_
constantsnewOp
- Either ADD
or REMOVE
EPPCommandException
- Invalid type or operationpublic void setUpdateAttrib(int newType, java.lang.String newVal, java.lang.String newValType, int newOp) throws EPPCommandException
newType
- Must be set to CONTACT
newVal
- Contact IdentifiernewValType
- Contact Type, which should be one of the CONTACT_
constants.newOp
- Either ADD
or REMOVE
EPPCommandException
- Invalid type or operationpublic EPPResponse getResponse()
public int getPeriodLength()
null
otherwise.public void setPeriodLength(int newPeriodLength)
newPeriodLength
- Registration periodpublic java.lang.String getPeriodUnit()
null
otherwise.public void setPeriodUnit(java.lang.String newPeriodUnit)
PERIOD_MONTH
or
PERIOD_YEAR
.newPeriodUnit
- Registration period unit