Package com.verisign.epp.interfaces
Class EPPEmailFwd
- java.lang.Object
-
- com.verisign.epp.interfaces.EPPEmailFwd
-
public class EPPEmailFwd extends java.lang.ObjectEPPEmailFwdis the primary client interface class used for email forward management. An instance ofEPPEmailFwdis 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 ofEPPResponseor instances of response classes in thecom.verisign.epp.codec.emailFwdpackage.
-
-
Field Summary
Fields Modifier and Type Field Description static intADDUsed to specify the addition of an attribute withsetUpdateAttrib.static intCHANGEUsed to specify the change of an attribute withsetUpdateAttrib.static intCONTACTUsed to specify a contact update withsetUpdateAttrib.static java.lang.StringCONTACT_ADMINISTRATIVEAdministrative contact constant used withaddContact(String, String)static java.lang.StringCONTACT_BILLINGBilling contact constant used withaddContact(String, String)static java.lang.StringCONTACT_TECHNICALTechnical contact constant used withaddContact(String, String)static java.lang.StringPERIOD_MONTHPeriod month unit contant.static java.lang.StringPERIOD_YEARPeriod year unit constant.static intREMOVEUsed to specify the removal of an attribute withsetUpdateAttrib.static intSTATUSUsed to specify a status update withsetUpdateAttrib.static java.lang.StringSTATUS_CLIENT_DELETE_PROHIBITEDclientDeleteProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).static java.lang.StringSTATUS_CLIENT_HOLDclientHoldconstantstatic java.lang.StringSTATUS_CLIENT_RENEW_PROHIBITEDclientRenewProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).static java.lang.StringSTATUS_CLIENT_TRANSFER_PROHIBITEDclientTransferProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).static java.lang.StringSTATUS_CLIENT_UPDATE_PROHIBITEDclientUpdateProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).static java.lang.StringSTATUS_OKokconstantstatic java.lang.StringSTATUS_PENDING_CREATEpendingCreateconstantstatic java.lang.StringSTATUS_PENDING_DELETEpendingDeleteconstantstatic java.lang.StringSTATUS_PENDING_RENEWpendingRenewconstantstatic java.lang.StringSTATUS_PENDING_TRANSFERpendingTransferconstantstatic java.lang.StringSTATUS_PENDING_UPDATEpendingUpdateconstantstatic java.lang.StringSTATUS_SERVER_DELETE_PROHIBITEDserverDeleteProhibitedconstantstatic java.lang.StringSTATUS_SERVER_HOLDserverHoldconstantstatic java.lang.StringSTATUS_SERVER_RENEW_PROHIBITEDserverRenewProhibitedconstantstatic java.lang.StringSTATUS_SERVER_TRANSFER_PROHIBITEDserverTransferProhibitedconstantstatic java.lang.StringSTATUS_SERVER_UPDATE_PROHIBITEDserverUpdateProhibitedconstantstatic java.lang.StringTRANSFER_APPROVETransfer approve operation constant used withsetTransferOpCode(String)static java.lang.StringTRANSFER_CANCELTransfer cancel operation constant used withsetTransferOpCode(String)static java.lang.StringTRANSFER_QUERYTransfer query operation constant used withsetTransferOpCode(String)static java.lang.StringTRANSFER_REJECTTransfer reject operation constant used withsetTransferOpCode(String)static java.lang.StringTRANSFER_REQUESTTransfer request operation constant used withsetTransferOpCode(String)
-
Constructor Summary
Constructors Constructor Description EPPEmailFwd(EPPSession newSession)Constructs anEPPEmailFwdgiven an initialized EPP session.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddContact(java.lang.String newName, java.lang.String newType)Will add a new contact which includes a name and a type.voidaddEmailFwdName(java.lang.String newEmailFwd)Adds an email forward for use with asendmethod.voidaddExtension(EPPCodecComponent aExtension)Adds a command extension object.java.lang.StringgetAuthRoid()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.StringgetAuthString()Sets the authorization string associated with ansendCreateandsendTransfer.java.util.DategetExpirationDate()Gets the Email Forward expiration date.java.util.VectorgetExtensions()Gets the command extensions.java.lang.StringgetForwardTo()Gets the forward to e-mail address associated withsendCreateandsendUpdate.intgetPeriodLength()Gets the registration period.java.lang.StringgetPeriodUnit()Gets the registration period unit.java.lang.StringgetRegistrant()Gets the Email Forward Registrant Contact Identifier.EPPResponsegetResponse()Gets the response associated with the last command.EPPEmailFwdCheckRespsendCheck()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.EPPEmailFwdCreateRespsendCreate()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.EPPResponsesendDelete()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.EPPEmailFwdInfoRespsendInfo()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.EPPEmailFwdRenewRespsendRenew()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.EPPEmailFwdTransferRespsendTransfer()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.EPPResponsesendUpdate()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.voidsetAuthRoid(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.voidsetAuthString(java.lang.String newAuthString)Sets the authorization string associated with ansendCreateandsendTransfer.voidsetExpirationDate(java.util.Date newExpirationDate)Sets the Email Forward expiration date.voidsetExtension(EPPCodecComponent aExtension)Deprecated.Replaced byaddExtension(EPPCodecComponent).voidsetExtensions(java.util.Vector aExtensions)Sets the command extension objects.voidsetForwardTo(java.lang.String newForwardTo)Sets the forward to e-mail address associated withsendCreateandsendUpdate.voidsetPeriodLength(int newPeriodLength)Gets the registration period.voidsetPeriodUnit(java.lang.String newPeriodUnit)Sets the registration period unit to eitherPERIOD_MONTHorPERIOD_YEAR.voidsetRegistrant(java.lang.String aRegistrant)Sets the Email Forward Registrant Contact Identifier.voidsetTransferOpCode(java.lang.String newTransferOpCode)Sets the transfer operation for a call toencodeTransfer.voidsetTransId(java.lang.String newTransId)Sets the client transaction identifier.voidsetUpdateAttrib(int newType, EPPEmailFwdStatus newName, int newOp)Sets an update to an email forward status.voidsetUpdateAttrib(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
okconstant- See Also:
- Constant Field Values
-
STATUS_SERVER_HOLD
public static final java.lang.String STATUS_SERVER_HOLD
serverHoldconstant- See Also:
- Constant Field Values
-
STATUS_SERVER_RENEW_PROHIBITED
public static final java.lang.String STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibitedconstant- See Also:
- Constant Field Values
-
STATUS_SERVER_TRANSFER_PROHIBITED
public static final java.lang.String STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibitedconstant- See Also:
- Constant Field Values
-
STATUS_SERVER_UPDATE_PROHIBITED
public static final java.lang.String STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibitedconstant- See Also:
- Constant Field Values
-
STATUS_SERVER_DELETE_PROHIBITED
public static final java.lang.String STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibitedconstant- See Also:
- Constant Field Values
-
STATUS_PENDING_CREATE
public static final java.lang.String STATUS_PENDING_CREATE
pendingCreateconstant- See Also:
- Constant Field Values
-
STATUS_PENDING_DELETE
public static final java.lang.String STATUS_PENDING_DELETE
pendingDeleteconstant- See Also:
- Constant Field Values
-
STATUS_PENDING_RENEW
public static final java.lang.String STATUS_PENDING_RENEW
pendingRenewconstant- See Also:
- Constant Field Values
-
STATUS_PENDING_TRANSFER
public static final java.lang.String STATUS_PENDING_TRANSFER
pendingTransferconstant- See Also:
- Constant Field Values
-
STATUS_PENDING_UPDATE
public static final java.lang.String STATUS_PENDING_UPDATE
pendingUpdateconstant- See Also:
- Constant Field Values
-
STATUS_CLIENT_HOLD
public static final java.lang.String STATUS_CLIENT_HOLD
clientHoldconstant- See Also:
- Constant Field Values
-
STATUS_CLIENT_RENEW_PROHIBITED
public static final java.lang.String STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).- See Also:
- Constant Field Values
-
STATUS_CLIENT_TRANSFER_PROHIBITED
public static final java.lang.String STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).- See Also:
- Constant Field Values
-
STATUS_CLIENT_UPDATE_PROHIBITED
public static final java.lang.String STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).- See Also:
- Constant Field Values
-
STATUS_CLIENT_DELETE_PROHIBITED
public static final java.lang.String STATUS_CLIENT_DELETE_PROHIBITED
clientDeleteProhibitedconstant 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 anEPPEmailFwdgiven 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:
Vectorof concreteEPPCodecComponentassociated with the command if exists;nullotherwise.
-
addEmailFwdName
public void addEmailFwdName(java.lang.String newEmailFwd)
Adds an email forward for use with asendmethod. 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 ansendCreateandsendTransfer.- Parameters:
newAuthString- Authorization string
-
getAuthString
public java.lang.String getAuthString()
Sets the authorization string associated with ansendCreateandsendTransfer.- Returns:
- Authorization string if defined;
nullotherwise.
-
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 withsendTransferalong with setting the authInfo with thesetAuthString(String)method.- Returns:
- Roid of registrant or contact object if defined;
nullotherwise.
-
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 withsendTransferalong 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 withsendCreateandsendUpdate.- Parameters:
newForwardTo- Forward to e-mail address
-
getForwardTo
public java.lang.String getForwardTo()
Gets the forward to e-mail address associated withsendCreateandsendUpdate.- 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;
nullotherwise.
-
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:
EPPEmailFwdCreateRespcontaining the Email Forward create result.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto 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:
EPPResponsecontaining the Email Forward update result.- Throws:
EPPCommandException- Error executing the update command. UsegetResponseto 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:
EPPEmailFwdTransferRespcontaining the Email Forward transfer result.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto 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:
EPPEmailFwdRenewRespcontaining the Email Forward renew result.- Throws:
EPPCommandException- Error executing the renew command. UsegetResponseto 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:
EPPEmailFwdInfoRespcontaining the Email Forward information.- Throws:
EPPCommandException- Error executing the info command. UsegetResponseto 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:
EPPEmailFwdCheckRespcontaining the Email Forward check information.- Throws:
EPPCommandException- Error executing the check command. UsegetResponseto 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:
EPPResponsecontaining the delete result information.- Throws:
EPPCommandException- Error executing the delete command. UsegetResponseto get the associated server error response.
-
setUpdateAttrib
public void setUpdateAttrib(int newType, EPPEmailFwdStatus newName, int newOp) throws EPPCommandExceptionSets an update to an email forward status. Email Forward statuses can be either added or removed.- Parameters:
newType- Must be set toSTATUSnewName- Name of status, which can use one of theSTATUS_constantsnewOp- EitherADDorREMOVE- Throws:
EPPCommandException- Invalid type or operation
-
setUpdateAttrib
public void setUpdateAttrib(int newType, java.lang.String newVal, java.lang.String newValType, int newOp) throws EPPCommandExceptionSets an update to an email forward contact. Email Forward contacts can be either added or removed.- Parameters:
newType- Must be set toCONTACTnewVal- Contact IdentifiernewValType- Contact Type, which should be one of theCONTACT_constants.newOp- EitherADDorREMOVE- 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;
nullotherwise.
-
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;
nullotherwise.
-
setPeriodUnit
public void setPeriodUnit(java.lang.String newPeriodUnit)
Sets the registration period unit to eitherPERIOD_MONTHorPERIOD_YEAR.- Parameters:
newPeriodUnit- Registration period unit
-
-