Class EPPContact

java.lang.Object
com.verisign.epp.interfaces.EPPContact
Direct Known Subclasses:
NSContact

public class EPPContact extends Object
EPPContact is the primary client interface class used for contact management. An instance of EPPContact 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.contact package.

See Also:
  • Field Details

  • Constructor Details

    • EPPContact

      public EPPContact(EPPSession aSession)
      Constructs an EPPContact with an initialized EPPSession instance.
      Parameters:
      aSession - Session to use to send contact commands
  • Method Details

    • 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 by addExtension(EPPCodecComponent). This method will add the extension as is done in addExtension(EPPCodecComponent).
      Sets a command extension object.
      Parameters:
      aExtension - command extension object associated with the command
    • setExtensions

      public void setExtensions(Vector aExtensions)
      Sets the command extension objects.
      Parameters:
      aExtensions - command extension objects associated with the command
    • getExtensions

      public Vector getExtensions()
      Gets the command extensions.
      Returns:
      Vector of concrete EPPCodecComponent associated with the command if exists; null otherwise.
    • setTransferOpCode

      public void setTransferOpCode(String aTransferOpCode)
      Sets the transfer operation for a call to encodeTransfer. The transfer code must be set to one of the EPPContact.TRANSFER_ constants.
      Parameters:
      aTransferOpCode - One of the EPPContact.TRANSFER_ constants
    • getPostalInfo

      public 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 of EPPContactPostalDefinition 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(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(String newVoicePhone)
      Sets the voice phone number.
      Parameters:
      newVoicePhone - Voice phone number.
    • setVoiceExt

      public void setVoiceExt(String newVoiceExt)
      Sets the voice extension number.
      Parameters:
      newVoiceExt - Voice extension number
    • setFaxNumber

      public void setFaxNumber(String newFaxNumber)
      Sets the fax number.
      Parameters:
      newFaxNumber - Fax number.
    • setFaxExt

      public void setFaxExt(String newFaxExt)
      Sets the fax extension number.
      Parameters:
      newFaxExt - Fax extension number
    • setEmail

      public void setEmail(String newEmail)
      This is a Setter Method for Email private Attribute This Attribute maintains Email Address
      Parameters:
      newEmail - DOCUMENT ME!
    • getVoicePhone

      public String getVoicePhone()
      This is a Getter Method for VoicePhone private Attribute This Attribute maintains Voice Phone Number
      Returns:
      DOCUMENT ME!
    • getFaxNumber

      public String getFaxNumber()
      This is a Getter Method for FaxNumber private Attribute This Attribute maintains Fax Number
      Returns:
      DOCUMENT ME!
    • getFaxExt

      public String getFaxExt()
      Gets the fax extension.
      Returns:
      Fax extension if defined; null otherwise.
    • getEmail

      public String getEmail()
      This is a Getter Method for Email private Attribute This Attribute maintains Email Address
      Returns:
      DOCUMENT ME!
    • addStatus

      public void addStatus(String aStatus)
      Adds a status to the host.
      Parameters:
      aStatus - One of the STAT_ constants
    • removeStatus

      public void removeStatus(String aStatus)
      Removes a status from the host.
      Parameters:
      aStatus - One of the STAT_ constants
    • addStatus

      public void addStatus(String aStatus, String aDesc, String aLang)
      Adds a status to the host with a description.
      Parameters:
      aStatus - One of the STAT_ constants
      aDesc - Description of the rationale for the status change
      aLang - Language of aDesc Use DEFAULT_LANG for the default language ("us").
    • removeStatus

      public void removeStatus(String aStatus, String aDesc, String aLang)
      Removes a status from the host with a description.
      Parameters:
      aStatus - One of the STAT_ constants
      aDesc - Description of the rationale for the status change
      aLang - Language of aDesc Use DEFAULT_LANG for the default language ("us").
    • getAddStatus

      public 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 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(String newContactId)
      This method set the myContactInfo attribute.
      Parameters:
      newContactId - DOCUMENT ME!
    • setAuthorizationId

      public void setAuthorizationId(String newAuthorizationId)
      Sets the authorization identifier for transfer operations using the encodeTransfer method.
      Parameters:
      newAuthorizationId - unique daily client codeString.
    • setTransId

      public void setTransId(String newTransId)
      Setter method for TransID instance variable
      Parameters:
      newTransId - DOCUMENT ME!
    • getTransId

      public String getTransId()
      Getter method for TransID instance variable
      Returns:
      DOCUMENT ME!
    • getAuthorizationId

      public String getAuthorizationId()
      gets the authorization identifier for transfer operations using the encodeTransfer 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 information
      • setEmail - Set the email address
      • setAuthString - Sets the contact authorization string.


      The optional attributes have been set with the following:

      • setTransId - Sets the client transaction identifier
      • setExtension - Command extension to send with command
      • setVoicePhone - Set the voice phone
      • setFaxNumber - Set the fax number
      • setInterPostalPostalContact - Set the international postal information
      Returns:
      EPPContactCreateResp containing the contact create result.
      Throws:
      EPPCommandException - Error executing the update command. Use getResponse 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 in sendCheck


      The optional attributes have been set with the following:

      • setTransId - Sets the client transaction identifier
      • setExtension - Command extension to send with command
      Returns:
      EPPContactCheckResp containing the contact check information.
      Throws:
      EPPCommandException - Error executing the check command. Use getResponse 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 identifier
      • setExtension - Command extension to send with command
      Returns:
      EPPContactInfoResp containing the contact information.
      Throws:
      EPPCommandException - Error executing the info command. Use getResponse 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 identifier
      • setExtension - Command extension to send with command
      • addStatus - Add status
      • removeStatus - Remove status
      • setPostalContact - Set the postal information
      • setVoicePhone - Set the voice phone
      • setFaxNumber - Set the fax number
      • setEmail - Set the email address
      • setInterPostalPostalContact - Set the international postal information
      • setAuthString - Sets the contact authorization string.
      At least one update attribute needs to be set.
      Returns:
      EPPResponse containing the contact update result.
      Throws:
      EPPCommandException - Error executing the update command. Use getResponse 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 identifier
      • setExtension - Command extension to send with command
      Returns:
      EPPContactTransferResp containing the contact transfer result.
      Throws:
      EPPCommandException - Error executing the create command. Use getResponse 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 identifier
      • setExtension - Command extension to send with command
      Returns:
      EPPResponse containing the delete result information.
      Throws:
      EPPCommandException - Error executing the delete command. Use getResponse to get the associated server error response.
    • resetContact

      protected void resetContact()
      Resets the contact instance to its initial state.