Package com.verisign.epp.interfaces
Class EPPEmailFwd
java.lang.Object
com.verisign.epp.interfaces.EPPEmailFwd
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. - 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 withaddContact(String, String)static final StringBilling contact constant used withaddContact(String, String)static final StringTechnical contact constant used withaddContact(String, String)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 withsetUpdateAttrib(int, EPPEmailFwdStatus, int).static final StringclientHoldconstantstatic final StringclientRenewProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).static final StringclientTransferProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).static final StringclientUpdateProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).static final Stringokconstantstatic final StringpendingCreateconstantstatic final StringpendingDeleteconstantstatic final StringpendingRenewconstantstatic final StringpendingTransferconstantstatic final StringpendingUpdateconstantstatic final StringserverDeleteProhibitedconstantstatic final StringserverHoldconstantstatic final StringserverRenewProhibitedconstantstatic final StringserverTransferProhibitedconstantstatic final StringserverUpdateProhibitedconstantstatic final StringTransfer approve operation constant used withsetTransferOpCode(String)static final StringTransfer cancel operation constant used withsetTransferOpCode(String)static final StringTransfer query operation constant used withsetTransferOpCode(String)static final StringTransfer reject operation constant used withsetTransferOpCode(String)static final StringTransfer request operation constant used withsetTransferOpCode(String) -
Constructor Summary
ConstructorsConstructorDescriptionEPPEmailFwd(EPPSession newSession) Constructs anEPPEmailFwdgiven an initialized EPP session. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContact(String newName, String newType) Will add a new contact which includes a name and a type.voidaddEmailFwdName(String newEmailFwd) Adds an email forward for use with asendmethod.voidaddExtension(EPPCodecComponent aExtension) Adds a command extension object.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 Email Forward expiration date.Gets the command extensions.Gets the forward to e-mail address associated withsendCreateandsendUpdate.intGets the registration period.Gets the registration period unit.Gets the Email Forward Registrant Contact Identifier.Gets the response associated with the last command.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.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.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.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.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.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.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(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 newAuthString) Sets the authorization string associated with ansendCreateandsendTransfer.voidsetExpirationDate(Date newExpirationDate) Sets the Email Forward expiration date.voidsetExtension(EPPCodecComponent aExtension) Deprecated.voidsetExtensions(Vector aExtensions) Sets the command extension objects.voidsetForwardTo(String newForwardTo) Sets the forward to e-mail address associated withsendCreateandsendUpdate.voidsetPeriodLength(int newPeriodLength) Gets the registration period.voidsetPeriodUnit(String newPeriodUnit) Sets the registration period unit to eitherPERIOD_MONTHorPERIOD_YEAR.voidsetRegistrant(String aRegistrant) Sets the Email Forward Registrant Contact Identifier.voidsetTransferOpCode(String newTransferOpCode) Sets the transfer operation for a call toencodeTransfer.voidsetTransId(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, String newVal, String newValType, int newOp) Sets an update to an email forward contact.
-
Field Details
-
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- See Also:
-
STATUS_SERVER_HOLD
serverHoldconstant- See Also:
-
STATUS_SERVER_RENEW_PROHIBITED
serverRenewProhibitedconstant- See Also:
-
STATUS_SERVER_TRANSFER_PROHIBITED
serverTransferProhibitedconstant- See Also:
-
STATUS_SERVER_UPDATE_PROHIBITED
serverUpdateProhibitedconstant- See Also:
-
STATUS_SERVER_DELETE_PROHIBITED
serverDeleteProhibitedconstant- See Also:
-
STATUS_PENDING_CREATE
pendingCreateconstant- See Also:
-
STATUS_PENDING_DELETE
pendingDeleteconstant- See Also:
-
STATUS_PENDING_RENEW
pendingRenewconstant- See Also:
-
STATUS_PENDING_TRANSFER
pendingTransferconstant- See Also:
-
STATUS_PENDING_UPDATE
pendingUpdateconstant- See Also:
-
STATUS_CLIENT_HOLD
clientHoldconstant- See Also:
-
STATUS_CLIENT_RENEW_PROHIBITED
clientRenewProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).- See Also:
-
STATUS_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).- See Also:
-
STATUS_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).- See Also:
-
STATUS_CLIENT_DELETE_PROHIBITED
clientDeleteProhibitedconstant used withsetUpdateAttrib(int, EPPEmailFwdStatus, int).- See Also:
-
TRANSFER_APPROVE
Transfer approve operation constant used withsetTransferOpCode(String)- See Also:
-
TRANSFER_CANCEL
Transfer cancel operation constant used withsetTransferOpCode(String)- See Also:
-
TRANSFER_QUERY
Transfer query operation constant used withsetTransferOpCode(String)- See Also:
-
TRANSFER_REJECT
Transfer reject operation constant used withsetTransferOpCode(String)- See Also:
-
TRANSFER_REQUEST
Transfer request operation constant used withsetTransferOpCode(String)- See Also:
-
CONTACT_ADMINISTRATIVE
Administrative contact constant used withaddContact(String, String)- See Also:
-
CONTACT_BILLING
Billing contact constant used withaddContact(String, String)- See Also:
-
CONTACT_TECHNICAL
Technical contact constant used withaddContact(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:
-
-
Constructor Details
-
EPPEmailFwd
Constructs anEPPEmailFwdgiven an initialized EPP session.- Parameters:
newSession- 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(EPPCodecComponet).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.
-
addEmailFwdName
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
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
Sets the Email Forward expiration date.- Parameters:
newExpirationDate- Email Forward expiration date
-
getExpirationDate
Gets the Email Forward expiration date.- Returns:
- Email Forward expiration date
-
setTransferOpCode
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
Sets the client transaction identifier.- Parameters:
newTransId- Client transaction identifier
-
setAuthString
Sets the authorization string associated with ansendCreateandsendTransfer.- Parameters:
newAuthString- Authorization string
-
getAuthString
Sets the authorization string associated with ansendCreateandsendTransfer.- Returns:
- Authorization string if defined;
nullotherwise.
-
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
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
Sets the forward to e-mail address associated withsendCreateandsendUpdate.- Parameters:
newForwardTo- Forward to e-mail address
-
getForwardTo
Gets the forward to e-mail address associated withsendCreateandsendUpdate.- Returns:
- Forward to e-mail address
-
getRegistrant
Gets the Email Forward Registrant Contact Identifier.- Returns:
- Email Forward Registrant Contact Identifier if defined;
nullotherwise.
-
setRegistrant
Sets the Email Forward Registrant Contact Identifier.- Parameters:
aRegistrant- Email Forward Registrant Contact Identifier.
-
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. 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
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
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
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
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
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
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 EPPCommandException Sets 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, String newVal, 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 toCONTACTnewVal- Contact IdentifiernewValType- Contact Type, which should be one of theCONTACT_constants.newOp- 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 newPeriodLength) Gets the registration period.- Parameters:
newPeriodLength- 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:
newPeriodUnit- Registration period unit
-
addExtension(EPPCodecComponent).