Package com.verisign.epp.interfaces
Class EPPEmailFwd
- java.lang.Object
-
- com.verisign.epp.interfaces.EPPEmailFwd
-
public class EPPEmailFwd extends java.lang.Object
EPPEmailFwd
is the primary client interface class used for email forward management. An instance ofEPPEmailFwd
is created with an initializedEPPSession
, 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 ofEPPResponse
or instances of response classes in thecom.verisign.epp.codec.emailFwd
package.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADD
Used to specify the addition of an attribute withsetUpdateAttrib
.static int
CHANGE
Used to specify the change of an attribute withsetUpdateAttrib
.static int
CONTACT
Used to specify a contact update withsetUpdateAttrib
.static java.lang.String
CONTACT_ADMINISTRATIVE
Administrative contact constant used withaddContact(String, String)
static java.lang.String
CONTACT_BILLING
Billing contact constant used withaddContact(String, String)
static java.lang.String
CONTACT_TECHNICAL
Technical contact constant used withaddContact(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 withsetUpdateAttrib
.static int
STATUS
Used to specify a status update withsetUpdateAttrib
.static java.lang.String
STATUS_CLIENT_DELETE_PROHIBITED
clientDeleteProhibited
constant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int)
.static java.lang.String
STATUS_CLIENT_HOLD
clientHold
constantstatic java.lang.String
STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibited
constant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int)
.static java.lang.String
STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibited
constant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int)
.static java.lang.String
STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibited
constant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int)
.static java.lang.String
STATUS_OK
ok
constantstatic java.lang.String
STATUS_PENDING_CREATE
pendingCreate
constantstatic java.lang.String
STATUS_PENDING_DELETE
pendingDelete
constantstatic java.lang.String
STATUS_PENDING_RENEW
pendingRenew
constantstatic java.lang.String
STATUS_PENDING_TRANSFER
pendingTransfer
constantstatic java.lang.String
STATUS_PENDING_UPDATE
pendingUpdate
constantstatic java.lang.String
STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibited
constantstatic java.lang.String
STATUS_SERVER_HOLD
serverHold
constantstatic java.lang.String
STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibited
constantstatic java.lang.String
STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibited
constantstatic java.lang.String
STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibited
constantstatic java.lang.String
TRANSFER_APPROVE
Transfer approve operation constant used withsetTransferOpCode(String)
static java.lang.String
TRANSFER_CANCEL
Transfer cancel operation constant used withsetTransferOpCode(String)
static java.lang.String
TRANSFER_QUERY
Transfer query operation constant used withsetTransferOpCode(String)
static java.lang.String
TRANSFER_REJECT
Transfer reject operation constant used withsetTransferOpCode(String)
static java.lang.String
TRANSFER_REQUEST
Transfer request operation constant used withsetTransferOpCode(String)
-
Constructor Summary
Constructors Constructor Description EPPEmailFwd(EPPSession newSession)
Constructs anEPPEmailFwd
given an initialized EPP session.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 asend
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 bysetAuthString(String)
, is associated with the registrant or contact object.java.lang.String
getAuthString()
Sets the authorization string associated with ansendCreate
andsendTransfer
.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 withsendCreate
andsendUpdate
.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 bysetAuthString(String)
, is associated with the registrant or contact object.void
setAuthString(java.lang.String newAuthString)
Sets the authorization string associated with ansendCreate
andsendTransfer
.void
setExpirationDate(java.util.Date newExpirationDate)
Sets the Email Forward expiration date.void
setExtension(EPPCodecComponent aExtension)
Deprecated.Replaced byaddExtension(EPPCodecComponent)
.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 withsendCreate
andsendUpdate
.void
setPeriodLength(int newPeriodLength)
Gets the registration period.void
setPeriodUnit(java.lang.String newPeriodUnit)
Sets the registration period unit to eitherPERIOD_MONTH
orPERIOD_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 toencodeTransfer
.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.
-
-
-
Field Detail
-
CONTACT
public static final int CONTACT
Used to specify a contact update withsetUpdateAttrib
.- See Also:
- Constant Field Values
-
STATUS
public static final int STATUS
Used to specify a status update withsetUpdateAttrib
.- See Also:
- Constant Field Values
-
ADD
public static final int ADD
Used to specify the addition of an attribute withsetUpdateAttrib
.- See Also:
- Constant Field Values
-
REMOVE
public static final int REMOVE
Used to specify the removal of an attribute withsetUpdateAttrib
.- See Also:
- Constant Field Values
-
CHANGE
public static final int CHANGE
Used to specify the change of an attribute withsetUpdateAttrib
.- See Also:
- Constant Field Values
-
STATUS_OK
public static final java.lang.String STATUS_OK
ok
constant- See Also:
- Constant Field Values
-
STATUS_SERVER_HOLD
public static final java.lang.String STATUS_SERVER_HOLD
serverHold
constant- See Also:
- Constant Field Values
-
STATUS_SERVER_RENEW_PROHIBITED
public static final java.lang.String STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibited
constant- See Also:
- Constant Field Values
-
STATUS_SERVER_TRANSFER_PROHIBITED
public static final java.lang.String STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibited
constant- See Also:
- Constant Field Values
-
STATUS_SERVER_UPDATE_PROHIBITED
public static final java.lang.String STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibited
constant- See Also:
- Constant Field Values
-
STATUS_SERVER_DELETE_PROHIBITED
public static final java.lang.String STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibited
constant- See Also:
- Constant Field Values
-
STATUS_PENDING_CREATE
public static final java.lang.String STATUS_PENDING_CREATE
pendingCreate
constant- See Also:
- Constant Field Values
-
STATUS_PENDING_DELETE
public static final java.lang.String STATUS_PENDING_DELETE
pendingDelete
constant- See Also:
- Constant Field Values
-
STATUS_PENDING_RENEW
public static final java.lang.String STATUS_PENDING_RENEW
pendingRenew
constant- See Also:
- Constant Field Values
-
STATUS_PENDING_TRANSFER
public static final java.lang.String STATUS_PENDING_TRANSFER
pendingTransfer
constant- See Also:
- Constant Field Values
-
STATUS_PENDING_UPDATE
public static final java.lang.String STATUS_PENDING_UPDATE
pendingUpdate
constant- See Also:
- Constant Field Values
-
STATUS_CLIENT_HOLD
public static final java.lang.String STATUS_CLIENT_HOLD
clientHold
constant- See Also:
- Constant Field Values
-
STATUS_CLIENT_RENEW_PROHIBITED
public static final java.lang.String STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibited
constant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int)
.- See Also:
- Constant Field Values
-
STATUS_CLIENT_TRANSFER_PROHIBITED
public static final java.lang.String STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibited
constant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int)
.- See Also:
- Constant Field Values
-
STATUS_CLIENT_UPDATE_PROHIBITED
public static final java.lang.String STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibited
constant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int)
.- See Also:
- Constant Field Values
-
STATUS_CLIENT_DELETE_PROHIBITED
public static final java.lang.String STATUS_CLIENT_DELETE_PROHIBITED
clientDeleteProhibited
constant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int)
.- See Also:
- Constant Field Values
-
TRANSFER_APPROVE
public static final java.lang.String TRANSFER_APPROVE
Transfer approve operation constant used withsetTransferOpCode(String)
- See Also:
- Constant Field Values
-
TRANSFER_CANCEL
public static final java.lang.String TRANSFER_CANCEL
Transfer cancel operation constant used withsetTransferOpCode(String)
- See Also:
- Constant Field Values
-
TRANSFER_QUERY
public static final java.lang.String TRANSFER_QUERY
Transfer query operation constant used withsetTransferOpCode(String)
- See Also:
- Constant Field Values
-
TRANSFER_REJECT
public static final java.lang.String TRANSFER_REJECT
Transfer reject operation constant used withsetTransferOpCode(String)
- See Also:
- Constant Field Values
-
TRANSFER_REQUEST
public static final java.lang.String TRANSFER_REQUEST
Transfer request operation constant used withsetTransferOpCode(String)
- See Also:
- Constant Field Values
-
CONTACT_ADMINISTRATIVE
public static final java.lang.String CONTACT_ADMINISTRATIVE
Administrative contact constant used withaddContact(String, String)
- See Also:
- Constant Field Values
-
CONTACT_BILLING
public static final java.lang.String CONTACT_BILLING
Billing contact constant used withaddContact(String, String)
- See Also:
- Constant Field Values
-
CONTACT_TECHNICAL
public static final java.lang.String CONTACT_TECHNICAL
Technical contact constant used withaddContact(String, String)
- See Also:
- Constant Field Values
-
PERIOD_MONTH
public static final java.lang.String PERIOD_MONTH
Period month unit contant.- See Also:
- Constant Field Values
-
PERIOD_YEAR
public static final java.lang.String PERIOD_YEAR
Period year unit constant. This is the default unit.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPEmailFwd
public EPPEmailFwd(EPPSession newSession)
Constructs anEPPEmailFwd
given an initialized EPP session.- Parameters:
newSession
- Server session to use.
-
-
Method Detail
-
addExtension
public void addExtension(EPPCodecComponent aExtension)
Adds a command extension object.- Parameters:
aExtension
- command extension object associated with the command
-
setExtension
@Deprecated public void setExtension(EPPCodecComponent aExtension)
Deprecated.Replaced byaddExtension(EPPCodecComponent)
. This method will add the extension as is done inaddExtension(EPPCodecComponet)
.Sets a command extension object.- Parameters:
aExtension
- command extension object associated with the command
-
setExtensions
public void setExtensions(java.util.Vector aExtensions)
Sets the command extension objects.- Parameters:
aExtensions
- command extension objects associated with the command
-
getExtensions
public java.util.Vector getExtensions()
Gets the command extensions.- Returns:
Vector
of concreteEPPCodecComponent
associated with the command if exists;null
otherwise.
-
addEmailFwdName
public void addEmailFwdName(java.lang.String newEmailFwd)
Adds an email forward for use with asend
method. Adding more than one email forward is only supported bysendCheck
.- Parameters:
newEmailFwd
- Email Forward name to add
-
addContact
public void addContact(java.lang.String newName, java.lang.String newType)
Will add a new contact which includes a name and a type.- Parameters:
newName
- Contact NamenewType
- Contact Type, which should be aEPPEmailFwd.CONTACT_
constant.
-
setExpirationDate
public void setExpirationDate(java.util.Date newExpirationDate)
Sets the Email Forward expiration date.- Parameters:
newExpirationDate
- Email Forward expiration date
-
getExpirationDate
public java.util.Date getExpirationDate()
Gets the Email Forward expiration date.- Returns:
- Email Forward expiration date
-
setTransferOpCode
public void setTransferOpCode(java.lang.String newTransferOpCode)
Sets the transfer operation for a call toencodeTransfer
. The transfer code must be set to one of theEPPEmailFwd.TRANSFER_
constants.- Parameters:
newTransferOpCode
- One of theEPPEmailFwd.TRANSFER_
constants
-
setTransId
public void setTransId(java.lang.String newTransId)
Sets the client transaction identifier.- Parameters:
newTransId
- Client transaction identifier
-
setAuthString
public void setAuthString(java.lang.String newAuthString)
Sets the authorization string associated with ansendCreate
andsendTransfer
.- Parameters:
newAuthString
- Authorization string
-
getAuthString
public java.lang.String getAuthString()
Sets the authorization string associated with ansendCreate
andsendTransfer
.- Returns:
- Authorization string if defined;
null
otherwise.
-
getAuthRoid
public 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 bysetAuthString(String)
, is associated with the registrant or contact object. This can be used withsendTransfer
along with setting the authInfo with thesetAuthString(String)
method.- Returns:
- Roid of registrant or contact object if defined;
null
otherwise.
-
setAuthRoid
public 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 bysetAuthString(String)
, is associated with the registrant or contact object. This can be used withsendTransfer
along with setting the authInfo with thesetAuthString(String)
method.- Parameters:
aAuthRoid
- Roid of registrant or contact object
-
setForwardTo
public void setForwardTo(java.lang.String newForwardTo)
Sets the forward to e-mail address associated withsendCreate
andsendUpdate
.- Parameters:
newForwardTo
- Forward to e-mail address
-
getForwardTo
public java.lang.String getForwardTo()
Gets the forward to e-mail address associated withsendCreate
andsendUpdate
.- Returns:
- Forward to e-mail address
-
getRegistrant
public java.lang.String getRegistrant()
Gets the Email Forward Registrant Contact Identifier.- Returns:
- Email Forward Registrant Contact Identifier if defined;
null
otherwise.
-
setRegistrant
public void setRegistrant(java.lang.String aRegistrant)
Sets the Email Forward Registrant Contact Identifier.- Parameters:
aRegistrant
- Email Forward Registrant Contact Identifier.
-
sendCreate
public EPPEmailFwdCreateResp sendCreate() throws EPPCommandException
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. Only one email forward is valid.setForwardTo
- Sets the forward to e-mail addresssetAuthString
- Sets the email forward 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 email forward. This is required for thick registries.addContact
- Add email forward contact
- Returns:
EPPEmailFwdCreateResp
containing the Email Forward create result.- Throws:
EPPCommandException
- Error executing the create command. UsegetResponse
to get the associated server error response.
-
sendUpdate
public EPPResponse sendUpdate() throws EPPCommandException
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. Only one email forward is valid.
The optional attributes have been set with the following:
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.
- Returns:
EPPResponse
containing the Email Forward update result.- Throws:
EPPCommandException
- Error executing the update command. UsegetResponse
to get the associated server error response.
-
sendTransfer
public EPPEmailFwdTransferResp sendTransfer() throws EPPCommandException
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. Only one email forward is valid.setTransferOpCode
- Sets the email forward transfer operation.
setAuthString
- Sets the email forward 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:
EPPEmailFwdTransferResp
containing the Email Forward transfer result.- Throws:
EPPCommandException
- Error executing the create command. UsegetResponse
to get the associated server error response.
-
sendRenew
public EPPEmailFwdRenewResp sendRenew() throws EPPCommandException
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. Only one email forward 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:
EPPEmailFwdRenewResp
containing the Email Forward renew result.- Throws:
EPPCommandException
- Error executing the renew command. UsegetResponse
to get the associated server error response.
-
sendInfo
public EPPEmailFwdInfoResp sendInfo() throws EPPCommandException
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. Only one email forward is valid.
The optional attributes have been set with the following:
setTransId
- Sets the client transaction identifier
- Returns:
EPPEmailFwdInfoResp
containing the Email Forward information.- Throws:
EPPCommandException
- Error executing the info command. UsegetResponse
to get the associated server error response.
-
sendCheck
public EPPEmailFwdCheckResp sendCheck() throws EPPCommandException
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. More than one email forward can be checked insendCheck
The optional attributes have been set with the following:
setTransId
- Sets the client transaction identifier
- Returns:
EPPEmailFwdCheckResp
containing the Email Forward check information.- Throws:
EPPCommandException
- Error executing the check command. UsegetResponse
to get the associated server error response.
-
sendDelete
public EPPResponse sendDelete() throws EPPCommandException
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. Only one email forward is valid.
The optional attributes have been set with the following:
setTransId
- Sets the client transaction identifier
- Returns:
EPPResponse
containing the delete result information.- Throws:
EPPCommandException
- Error executing the delete command. UsegetResponse
to get the associated server error response.
-
setUpdateAttrib
public void setUpdateAttrib(int newType, EPPEmailFwdStatus newName, int newOp) throws EPPCommandException
Sets an update to an email forward status. Email Forward statuses can be either added or removed.- Parameters:
newType
- Must be set toSTATUS
newName
- Name of status, which can use one of theSTATUS_
constantsnewOp
- EitherADD
orREMOVE
- Throws:
EPPCommandException
- Invalid type or operation
-
setUpdateAttrib
public void setUpdateAttrib(int newType, java.lang.String newVal, java.lang.String newValType, int newOp) throws EPPCommandException
Sets an update to an email forward contact. Email Forward contacts can be either added or removed.- Parameters:
newType
- Must be set toCONTACT
newVal
- Contact IdentifiernewValType
- Contact Type, which should be one of theCONTACT_
constants.newOp
- EitherADD
orREMOVE
- Throws:
EPPCommandException
- Invalid type or operation
-
getResponse
public EPPResponse 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;
null
otherwise.
-
setPeriodLength
public void setPeriodLength(int newPeriodLength)
Gets the registration period.- Parameters:
newPeriodLength
- Registration period
-
getPeriodUnit
public java.lang.String getPeriodUnit()
Gets the registration period unit.- Returns:
- Registration period unit if defined;
null
otherwise.
-
setPeriodUnit
public void setPeriodUnit(java.lang.String newPeriodUnit)
Sets the registration period unit to eitherPERIOD_MONTH
orPERIOD_YEAR
.- Parameters:
newPeriodUnit
- Registration period unit
-
-