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.Object
EPPContact
is the primary client interface class used for contact management. An instance ofEPPContact
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.contact
package.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STAT_CLIENT_DELETE_PROHIBITED
clientDeleteProhibited statusstatic java.lang.String
STAT_CLIENT_TRANSFER_PROHIBITED
clientTransferProhibited statusstatic java.lang.String
STAT_CLIENT_UPDATE_PROHIBITED
clientUpdateProhibited statusstatic java.lang.String
STAT_OK
Status constantsstatic java.lang.String
STAT_PENDING_DELETE
pendingDelete statusstatic java.lang.String
STAT_PENDING_TRANSFER
pendingTransfer statusstatic java.lang.String
STAT_SERVER_DELETE_PROHIBITED
serverDeleteProhibited statusstatic java.lang.String
STAT_SERVER_TRANSFER_PROHIBITED
serverTransferProhibited statusstatic java.lang.String
STAT_SERVER_UPDATE_PROHIBITED
serverUpdateProhibited statusstatic java.lang.String
STAT_STATUS_LINKED
linked statusstatic java.lang.String
TRANSFER_APPROVE
Transfer approve constantstatic java.lang.String
TRANSFER_CANCEL
Transfer cancel constantstatic java.lang.String
TRANSFER_QUERY
Transfer query constantstatic java.lang.String
TRANSFER_REJECT
Transfer reject constantstatic java.lang.String
TRANSFER_REQUEST
Transfer request constant
-
Constructor Summary
Constructors Constructor Description EPPContact(EPPSession aSession)
Constructs anEPPContact
with an initializedEPPSession
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addContactId(java.lang.String newContactId)
This method set the myContactInfo attribute.void
addExtension(EPPCodecComponent aExtension)
Adds a command extension object.void
addPostalInfo(EPPContactPostalDefinition newPostalContact)
This is a Setter Method for PostalContact private Attribute This Attribute maintains This Object Contains Information about the Contactvoid
addStatus(java.lang.String aStatus)
Adds a status to the host.void
addStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)
Adds a status to the host with a description.java.util.Vector
getAddStatus()
This is a Getter Method for AddStatus private Attribute This Attribute maintains Vector of Add Status for Update Commandjava.lang.String
getAuthorizationId()
gets the authorization identifier for transfer operations using theencodeTransfer
method.EPPContactDisclose
getDisclose()
Get disclose information.java.lang.String
getEmail()
This is a Getter Method for Email private Attribute This Attribute maintains Email Addressjava.util.Vector
getExtensions()
Gets the command extensions.java.lang.String
getFaxExt()
Gets the fax extension.java.lang.String
getFaxNumber()
This is a Getter Method for FaxNumber private Attribute This Attribute maintains Fax NumberEPPContactPostalDefinition
getFirstPostalInfo()
Gets the first postal info object.java.util.Vector
getPostalInfo()
This is a Getter Method for PostalContact private Attribute This Attribute maintains This Object Contains Information about the Contactjava.util.Vector
getRemoveStatus()
This is a Getter Method for RemoveStatus private Attribute This Attribute maintains Vector of Remove Status for Update CommandEPPResponse
getResponse()
Gets the response associated with the last command.java.lang.String
getTransId()
Getter method for TransID instance variablejava.lang.String
getVoicePhone()
This is a Getter Method for VoicePhone private Attribute This Attribute maintains Voice Phone Numbervoid
removeStatus(java.lang.String aStatus)
Removes a status from the host.void
removeStatus(java.lang.String aStatus, java.lang.String aDesc, java.lang.String aLang)
Removes a status from the host with a description.protected void
resetContact()
Resets the contact instance to its initial state.EPPContactCheckResp
sendCheck()
Sends a Contact Check Command to the server.
The required attributes have been set with the following methods:
addContactName
- Adds a contact to check.EPPResponse
sendCreate()
Sends a Contact Create Command to the server.
The required attributes have been set with the following methods:
addContactId
- Sets the contact to update.EPPResponse
sendDelete()
Sends a Contact Delete Command to the server.
The required attributes have been set with the following methods:
addContactId
- Sets the contact to delete.EPPContactInfoResp
sendInfo()
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.EPPContactTransferResp
sendTransfer()
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.EPPResponse
sendUpdate()
Sends a Contact Update Command to the server.
The required attributes have been set with the following methods:
addContactId
- Sets the contact to update.void
setAuthorizationId(java.lang.String newAuthorizationId)
Sets the authorization identifier for transfer operations using theencodeTransfer
method.void
setDisclose(EPPContactDisclose newDisclose)
Set disclose information.void
setEmail(java.lang.String newEmail)
This is a Setter Method for Email private Attribute This Attribute maintains Email Addressvoid
setExtension(EPPCodecComponent aExtension)
Deprecated.Replaced byaddExtension(EPPCodecComponent)
.void
setExtensions(java.util.Vector aExtensions)
Sets the command extension objects.void
setFaxExt(java.lang.String newFaxExt)
Sets the fax extension number.void
setFaxNumber(java.lang.String newFaxNumber)
Sets the fax number.void
setPostalInfo(java.util.Vector newPostalContacts)
Set contact postalInfo.void
setTransferOpCode(java.lang.String aTransferOpCode)
Sets the transfer operation for a call toencodeTransfer
.void
setTransId(java.lang.String newTransId)
Setter method for TransID instance variablevoid
setVoiceExt(java.lang.String newVoiceExt)
Sets the voice extension number.void
setVoicePhone(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 anEPPContact
with an initializedEPPSession
instance.- 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
@Deprecated 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:
Vector
of concreteEPPCodecComponent
associated with the command if exists;null
otherwise.
-
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
Vector
ofEPPContactPostalDefinition
objects if set;null
otherwise.
-
getFirstPostalInfo
public EPPContactPostalDefinition getFirstPostalInfo()
Gets the first postal info object.- Returns:
- First postal info object (
EPPContactPostalDefinition
) if it exists;null
otherwise.
-
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;
null
otherwise;
-
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;
null
otherwise.
-
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 ofaDesc
UseDEFAULT_LANG
for 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 ofaDesc
UseDEFAULT_LANG
for 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 theencodeTransfer
method.- 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 theencodeTransfer
method.- 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:
EPPContactCreateResp
containing the contact create result.- Throws:
EPPCommandException
- Error executing the update command. UsegetResponse
to 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:
EPPContactCheckResp
containing the contact check information.- Throws:
EPPCommandException
- Error executing the check command. UsegetResponse
to 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:
EPPContactInfoResp
containing the contact information.- Throws:
EPPCommandException
- Error executing the info command. UsegetResponse
to 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:
EPPResponse
containing the contact update result.- Throws:
EPPCommandException
- Error executing the update command. UsegetResponse
to 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:
EPPContactTransferResp
containing the contact transfer result.- Throws:
EPPCommandException
- Error executing the create command. UsegetResponse
to 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:
EPPResponse
containing the delete result information.- Throws:
EPPCommandException
- Error executing the delete command. UsegetResponse
to get the associated server error response.
-
resetContact
protected void resetContact()
Resets the contact instance to its initial state.
-
-