Package com.verisign.epp.interfaces
Class EPPContact
- java.lang.Object
-
- com.verisign.epp.interfaces.EPPContact
-
- Direct Known Subclasses:
NSContact
public class EPPContact extends java.lang.ObjectEPPContactis the primary client interface class used for contact management. An instance ofEPPContactis 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.contactpackage.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSTAT_CLIENT_DELETE_PROHIBITEDclientDeleteProhibited statusstatic java.lang.StringSTAT_CLIENT_TRANSFER_PROHIBITEDclientTransferProhibited statusstatic java.lang.StringSTAT_CLIENT_UPDATE_PROHIBITEDclientUpdateProhibited statusstatic java.lang.StringSTAT_OKStatus constantsstatic java.lang.StringSTAT_PENDING_DELETEpendingDelete statusstatic java.lang.StringSTAT_PENDING_TRANSFERpendingTransfer statusstatic java.lang.StringSTAT_SERVER_DELETE_PROHIBITEDserverDeleteProhibited statusstatic java.lang.StringSTAT_SERVER_TRANSFER_PROHIBITEDserverTransferProhibited statusstatic java.lang.StringSTAT_SERVER_UPDATE_PROHIBITEDserverUpdateProhibited statusstatic java.lang.StringSTAT_STATUS_LINKEDlinked statusstatic java.lang.StringTRANSFER_APPROVETransfer approve constantstatic java.lang.StringTRANSFER_CANCELTransfer cancel constantstatic java.lang.StringTRANSFER_QUERYTransfer query constantstatic java.lang.StringTRANSFER_REJECTTransfer reject constantstatic java.lang.StringTRANSFER_REQUESTTransfer request constant
-
Constructor Summary
Constructors Constructor Description EPPContact(EPPSession aSession)Constructs anEPPContactwith an initializedEPPSessioninstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddContactId(java.lang.String newContactId)This method set the myContactInfo attribute.voidaddExtension(EPPCodecComponent aExtension)Adds a command extension object.voidaddPostalInfo(EPPContactPostalDefinition newPostalContact)This is a Setter Method for PostalContact private Attribute This Attribute maintains This Object Contains Information about the ContactvoidaddStatus(java.lang.String aStatus)Adds a status to the host.voidaddStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)Adds a status to the host with a description.java.util.VectorgetAddStatus()This is a Getter Method for AddStatus private Attribute This Attribute maintains Vector of Add Status for Update Commandjava.lang.StringgetAuthorizationId()gets the authorization identifier for transfer operations using theencodeTransfermethod.EPPContactDisclosegetDisclose()Get disclose information.java.lang.StringgetEmail()This is a Getter Method for Email private Attribute This Attribute maintains Email Addressjava.util.VectorgetExtensions()Gets the command extensions.java.lang.StringgetFaxExt()Gets the fax extension.java.lang.StringgetFaxNumber()This is a Getter Method for FaxNumber private Attribute This Attribute maintains Fax NumberEPPContactPostalDefinitiongetFirstPostalInfo()Gets the first postal info object.java.util.VectorgetPostalInfo()This is a Getter Method for PostalContact private Attribute This Attribute maintains This Object Contains Information about the Contactjava.util.VectorgetRemoveStatus()This is a Getter Method for RemoveStatus private Attribute This Attribute maintains Vector of Remove Status for Update CommandEPPResponsegetResponse()Gets the response associated with the last command.java.lang.StringgetTransId()Getter method for TransID instance variablejava.lang.StringgetVoicePhone()This is a Getter Method for VoicePhone private Attribute This Attribute maintains Voice Phone NumbervoidremoveStatus(java.lang.String aStatus)Removes a status from the host.voidremoveStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)Removes a status from the host with a description.protected voidresetContact()Resets the contact instance to its initial state.EPPContactCheckRespsendCheck()Sends a Contact Check Command to the server.
The required attributes have been set with the following methods:
addContactName- Adds a contact to check.EPPResponsesendCreate()Sends a Contact Create Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact to update.EPPResponsesendDelete()Sends a Contact Delete Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact to delete.EPPContactInfoRespsendInfo()Sends a Contact Info Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact to get info for.EPPContactTransferRespsendTransfer()Sends a Contact Transfer Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact for transfer command.EPPResponsesendUpdate()Sends a Contact Update Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact to update.voidsetAuthorizationId(java.lang.String newAuthorizationId)Sets the authorization identifier for transfer operations using theencodeTransfermethod.voidsetDisclose(EPPContactDisclose newDisclose)Set disclose information.voidsetEmail(java.lang.String newEmail)This is a Setter Method for Email private Attribute This Attribute maintains Email AddressvoidsetExtension(EPPCodecComponent aExtension)Deprecated.Replaced byaddExtension(EPPCodecComponent).voidsetExtensions(java.util.Vector aExtensions)Sets the command extension objects.voidsetFaxExt(java.lang.String newFaxExt)Sets the fax extension number.voidsetFaxNumber(java.lang.String newFaxNumber)Sets the fax number.voidsetPostalInfo(java.util.Vector newPostalContacts)Set contact postalInfo.voidsetTransferOpCode(java.lang.String aTransferOpCode)Sets the transfer operation for a call toencodeTransfer.voidsetTransId(java.lang.String newTransId)Setter method for TransID instance variablevoidsetVoiceExt(java.lang.String newVoiceExt)Sets the voice extension number.voidsetVoicePhone(java.lang.String newVoicePhone)Sets the voice phone number.
-
-
-
Field Detail
-
STAT_OK
public static final java.lang.String STAT_OK
Status constants- See Also:
- Constant Field Values
-
STAT_PENDING_DELETE
public static final java.lang.String STAT_PENDING_DELETE
pendingDelete status- See Also:
- Constant Field Values
-
STAT_PENDING_TRANSFER
public static final java.lang.String STAT_PENDING_TRANSFER
pendingTransfer status- See Also:
- Constant Field Values
-
STAT_CLIENT_DELETE_PROHIBITED
public static final java.lang.String STAT_CLIENT_DELETE_PROHIBITED
clientDeleteProhibited status- See Also:
- Constant Field Values
-
STAT_CLIENT_UPDATE_PROHIBITED
public static final java.lang.String STAT_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibited status- See Also:
- Constant Field Values
-
STAT_STATUS_LINKED
public static final java.lang.String STAT_STATUS_LINKED
linked status- See Also:
- Constant Field Values
-
STAT_SERVER_DELETE_PROHIBITED
public static final java.lang.String STAT_SERVER_DELETE_PROHIBITED
serverDeleteProhibited status- See Also:
- Constant Field Values
-
STAT_SERVER_UPDATE_PROHIBITED
public static final java.lang.String STAT_SERVER_UPDATE_PROHIBITED
serverUpdateProhibited status- See Also:
- Constant Field Values
-
STAT_CLIENT_TRANSFER_PROHIBITED
public static final java.lang.String STAT_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibited status- See Also:
- Constant Field Values
-
STAT_SERVER_TRANSFER_PROHIBITED
public static final java.lang.String STAT_SERVER_TRANSFER_PROHIBITED
serverTransferProhibited status- See Also:
- Constant Field Values
-
TRANSFER_APPROVE
public static final java.lang.String TRANSFER_APPROVE
Transfer approve constant- See Also:
- Constant Field Values
-
TRANSFER_CANCEL
public static final java.lang.String TRANSFER_CANCEL
Transfer cancel constant- See Also:
- Constant Field Values
-
TRANSFER_QUERY
public static final java.lang.String TRANSFER_QUERY
Transfer query constant- See Also:
- Constant Field Values
-
TRANSFER_REJECT
public static final java.lang.String TRANSFER_REJECT
Transfer reject constant- See Also:
- Constant Field Values
-
TRANSFER_REQUEST
public static final java.lang.String TRANSFER_REQUEST
Transfer request constant- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPContact
public EPPContact(EPPSession aSession)
Constructs anEPPContactwith an initializedEPPSessioninstance.- Parameters:
aSession- Session to use to send contact commands
-
-
Method Detail
-
addExtension
public void addExtension(EPPCodecComponent aExtension)
Adds a command extension object.- Parameters:
aExtension- command extension object associated with the command
-
setExtension
public void setExtension(EPPCodecComponent aExtension)
Deprecated.Replaced byaddExtension(EPPCodecComponent). This method will add the extension as is done inaddExtension(EPPCodecComponent).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.
-
setTransferOpCode
public void setTransferOpCode(java.lang.String aTransferOpCode)
Sets the transfer operation for a call toencodeTransfer. The transfer code must be set to one of theEPPContact.TRANSFER_constants.- Parameters:
aTransferOpCode- One of theEPPContact.TRANSFER_constants
-
getPostalInfo
public java.util.Vector getPostalInfo()
This is a Getter Method for PostalContact private Attribute This Attribute maintains This Object Contains Information about the Contact- Returns:
- Gets the
VectorofEPPContactPostalDefinitionobjects if set;nullotherwise.
-
getFirstPostalInfo
public EPPContactPostalDefinition getFirstPostalInfo()
Gets the first postal info object.- Returns:
- First postal info object (
EPPContactPostalDefinition) if it exists;nullotherwise.
-
setPostalInfo
public void setPostalInfo(java.util.Vector newPostalContacts)
Set contact postalInfo.- Parameters:
newPostalContacts- java.util.Vector
-
addPostalInfo
public void addPostalInfo(EPPContactPostalDefinition newPostalContact)
This is a Setter Method for PostalContact private Attribute This Attribute maintains This Object Contains Information about the Contact- Parameters:
newPostalContact- DOCUMENT ME!
-
getDisclose
public EPPContactDisclose getDisclose()
Get disclose information.- Returns:
- Disclose information if defined;
nullotherwise;
-
setDisclose
public void setDisclose(EPPContactDisclose newDisclose)
Set disclose information.- Parameters:
newDisclose- com.verisign.epp.codec.gen.EPPContactDisclose
-
setVoicePhone
public void setVoicePhone(java.lang.String newVoicePhone)
Sets the voice phone number.- Parameters:
newVoicePhone- Voice phone number.
-
setVoiceExt
public void setVoiceExt(java.lang.String newVoiceExt)
Sets the voice extension number.- Parameters:
newVoiceExt- Voice extension number
-
setFaxNumber
public void setFaxNumber(java.lang.String newFaxNumber)
Sets the fax number.- Parameters:
newFaxNumber- Fax number.
-
setFaxExt
public void setFaxExt(java.lang.String newFaxExt)
Sets the fax extension number.- Parameters:
newFaxExt- Fax extension number
-
setEmail
public void setEmail(java.lang.String newEmail)
This is a Setter Method for Email private Attribute This Attribute maintains Email Address- Parameters:
newEmail- DOCUMENT ME!
-
getVoicePhone
public java.lang.String getVoicePhone()
This is a Getter Method for VoicePhone private Attribute This Attribute maintains Voice Phone Number- Returns:
- DOCUMENT ME!
-
getFaxNumber
public java.lang.String getFaxNumber()
This is a Getter Method for FaxNumber private Attribute This Attribute maintains Fax Number- Returns:
- DOCUMENT ME!
-
getFaxExt
public java.lang.String getFaxExt()
Gets the fax extension.- Returns:
- Fax extension if defined;
nullotherwise.
-
getEmail
public java.lang.String getEmail()
This is a Getter Method for Email private Attribute This Attribute maintains Email Address- Returns:
- DOCUMENT ME!
-
addStatus
public void addStatus(java.lang.String aStatus)
Adds a status to the host.- Parameters:
aStatus- One of theSTAT_constants
-
removeStatus
public void removeStatus(java.lang.String aStatus)
Removes a status from the host.- Parameters:
aStatus- One of theSTAT_constants
-
addStatus
public void addStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)Adds a status to the host with a description.- Parameters:
aStatus- One of theSTAT_constantsaDesc- Description of the rationale for the status changeaLang- Language ofaDescUseDEFAULT_LANGfor the default language ("us").
-
removeStatus
public void removeStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)Removes a status from the host with a description.- Parameters:
aStatus- One of theSTAT_constantsaDesc- Description of the rationale for the status changeaLang- Language ofaDescUseDEFAULT_LANGfor the default language ("us").
-
getAddStatus
public java.util.Vector getAddStatus()
This is a Getter Method for AddStatus private Attribute This Attribute maintains Vector of Add Status for Update Command- Returns:
- DOCUMENT ME!
-
getRemoveStatus
public java.util.Vector getRemoveStatus()
This is a Getter Method for RemoveStatus private Attribute This Attribute maintains Vector of Remove Status for Update Command- Returns:
- DOCUMENT ME!
-
addContactId
public void addContactId(java.lang.String newContactId)
This method set the myContactInfo attribute.- Parameters:
newContactId- DOCUMENT ME!
-
setAuthorizationId
public void setAuthorizationId(java.lang.String newAuthorizationId)
Sets the authorization identifier for transfer operations using theencodeTransfermethod.- Parameters:
newAuthorizationId- unique daily client codeString.
-
setTransId
public void setTransId(java.lang.String newTransId)
Setter method for TransID instance variable- Parameters:
newTransId- DOCUMENT ME!
-
getTransId
public java.lang.String getTransId()
Getter method for TransID instance variable- Returns:
- DOCUMENT ME!
-
getAuthorizationId
public java.lang.String getAuthorizationId()
gets the authorization identifier for transfer operations using theencodeTransfermethod.- Returns:
- DOCUMENT ME!
-
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
-
sendCreate
public EPPResponse sendCreate() throws EPPCommandException
Sends a Contact Create Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact to update. Only one contact is valid.setPostalContact- Set the postal informationsetEmail- Set the email addresssetAuthString- Sets the contact authorization string.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetExtension- Command extension to send with commandsetVoicePhone- Set the voice phonesetFaxNumber- Set the fax numbersetInterPostalPostalContact- Set the international postal information
- Returns:
EPPContactCreateRespcontaining the contact create result.- Throws:
EPPCommandException- Error executing the update command. UsegetResponseto get the associated server error response.
-
sendCheck
public EPPContactCheckResp sendCheck() throws EPPCommandException
Sends a Contact Check Command to the server.
The required attributes have been set with the following methods:
addContactName- Adds a contact to check. More than one contact can be checked insendCheck
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetExtension- Command extension to send with command
- Returns:
EPPContactCheckRespcontaining the contact check information.- Throws:
EPPCommandException- Error executing the check command. UsegetResponseto get the associated server error response.
-
sendInfo
public EPPContactInfoResp sendInfo() throws EPPCommandException
Sends a Contact Info Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact to get info for. Only one contact is valid.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetExtension- Command extension to send with command
- Returns:
EPPContactInfoRespcontaining the contact information.- Throws:
EPPCommandException- Error executing the info command. UsegetResponseto get the associated server error response.
-
sendUpdate
public EPPResponse sendUpdate() throws EPPCommandException
Sends a Contact Update Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact to update. Only one contact is valid.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetExtension- Command extension to send with commandaddStatus- Add statusremoveStatus- Remove statussetPostalContact- Set the postal informationsetVoicePhone- Set the voice phonesetFaxNumber- Set the fax numbersetEmail- Set the email addresssetInterPostalPostalContact- Set the international postal informationsetAuthString- Sets the contact authorization string.
- Returns:
EPPResponsecontaining the contact update result.- Throws:
EPPCommandException- Error executing the update command. UsegetResponseto get the associated server error response.
-
sendTransfer
public EPPContactTransferResp sendTransfer() throws EPPCommandException
Sends a Contact Transfer Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact for transfer command. Only one contact is valid.setTransferOpCode- Sets the contact transfer operation.setAuthString- Sets the contact authorization string.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetExtension- Command extension to send with command
- Returns:
EPPContactTransferRespcontaining the contact transfer result.- Throws:
EPPCommandException- Error executing the create command. UsegetResponseto get the associated server error response.
-
sendDelete
public EPPResponse sendDelete() throws EPPCommandException
Sends a Contact Delete Command to the server.
The required attributes have been set with the following methods:
addContactId- Sets the contact to delete. Only one contact is valid.
The optional attributes have been set with the following:
setTransId- Sets the client transaction identifiersetExtension- Command extension to send with command
- Returns:
EPPResponsecontaining the delete result information.- Throws:
EPPCommandException- Error executing the delete command. UsegetResponseto get the associated server error response.
-
resetContact
protected void resetContact()
Resets the contact instance to its initial state.
-
-