Class EPPValidateContact

java.lang.Object
com.verisign.epp.codec.validate.v02.EPPValidateContact
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPValidateContact extends Object implements EPPCodecComponent
Represents a <validate:contact> element in the Validate Check Command.
See Also:
  • Field Details

  • Constructor Details

    • EPPValidateContact

      public EPPValidateContact()
      EPPValidateContact default constructor.
    • EPPValidateContact

      public EPPValidateContact(String aId, String aContactType, String aTld)
      EPPValidateContact default constructor that takes the required attributes.
      Parameters:
      aId - Contact identifier
      aContactType - Contact type
      aTld - TLD
  • Method Details

    • getId

      public String getId()
      Gets the contact identifier.
      Returns:
      The contact identifier if defined;null otherwise.
    • setId

      public void setId(String aId)
      Sets the contact identifier.
      Parameters:
      aId - The contact identifier
    • getContactType

      public String getContactType()
      Gets the contact type.
      Returns:
      The contact type if defined;null otherwise.
    • setContactType

      public void setContactType(String aType)
      Sets the contact type.
      Parameters:
      aType - The contact type
    • getTld

      public String getTld()
      Gets the TLD.
      Returns:
      The TLD if defined;null otherwise.
    • setTld

      public void setTld(String aTld)
      Sets the TLD.
      Parameters:
      aTld - The TLD
    • hasPostalInfo

      public boolean hasPostalInfo()
      Is there any postal information set?
      Returns:
      true if there is at least one EPPValidatePostalDefinition set in the postal information; false otherwise.
    • addPostalInfo

      public void addPostalInfo(EPPValidatePostalDefinition aPostalInfo)
      Adds a postal definition to the postal information for the contact.
      Parameters:
      aPostalInfo - Postal definition to add to the postal information.
    • getPostalInfo

      public List<EPPValidatePostalDefinition> getPostalInfo()
      Gets the postal information for the contact. There can be one or two EPPValidatePostalDefinition objects in the postal information list.
      Returns:
      Postal information for the contact
    • setPostalInfo

      public void setPostalInfo(List<EPPValidatePostalDefinition> aPostalInfo)
      Sets the postal information for the contact. There can be one or two EPPValidatePostalDefinition objects in the postal information list.
      Parameters:
      aPostalInfo - Postal information for the contact.
    • hasVoice

      public boolean hasVoice()
      Is the contact voice value been defined?
      Returns:
      true if the contact voice value is defined; false otherwise.
    • getVoice

      public String getVoice()
      Gets the contact voice value.
      Returns:
      the contact voice value if defined; null otherwise.
    • setVoice

      public void setVoice(String aVoice)
      Sets the contact voice value.
      Parameters:
      aVoice - the contact voice value.
    • hasVoiceExt

      public boolean hasVoiceExt()
      Is the contact voice extension value defined?
      Returns:
      true if the contact voice extension value is defined; false otherwise.
    • getVoiceExt

      public String getVoiceExt()
      Gets the contact voice extension value.
      Returns:
      the contact voice extension value if defined; null otherwise.
    • setVoiceExt

      public void setVoiceExt(String aVoiceExt)
      Sets the contact voice extension value.
      Parameters:
      aVoiceExt - the contact voice extension value
    • hasFax

      public boolean hasFax()
      Is the contact fax value been defined?
      Returns:
      true if the contact fax value is defined; false otherwise.
    • getFax

      public String getFax()
      Gets the contact fax value.
      Returns:
      the contact fax value if defined; null otherwise.
    • setFax

      public void setFax(String aFax)
      Sets the contact fax value.
      Parameters:
      aFax - the contact fax value.
    • hasFaxExt

      public boolean hasFaxExt()
      Is the contact fax extension value defined?
      Returns:
      true if the contact fax extension value is defined; false otherwise.
    • getFaxExt

      public String getFaxExt()
      Gets the contact fax extension value.
      Returns:
      the contact fax extension value if defined; null otherwise.
    • setFaxExt

      public void setFaxExt(String aFaxExt)
      Sets the contact fax extension value.
      Parameters:
      aFaxExt - the contact fax extension value
    • hasEmail

      public boolean hasEmail()
      Is the email defined?
      Returns:
      true if the email is defined; false otherwise.
    • getEmail

      public String getEmail()
      Gets the contact email value.
      Returns:
      the email if defined; null otherwise.
    • setEmail

      public void setEmail(String aEmail)
      Sets the contact email value.
      Parameters:
      aEmail - the email to set
    • hasAuthInfo

      public boolean hasAuthInfo()
      Is the authorization info defined?
      Returns:
      true if the authorization info is defined; false otherwise.
    • getAuthInfo

      public EPPValidateAuthInfo getAuthInfo()
      Gets the authorization info value.
      Returns:
      the authorization info value if defined; null otherwise.
    • setAuthInfo

      public void setAuthInfo(EPPValidateAuthInfo aAuthInfo)
      Sets the authorization info value.
      Parameters:
      aAuthInfo - The authorization info value
    • addKeyValue

      public void addKeyValue(EPPValidateKeyValue aKeyValue)
      Adds a key value pair to the list of key value pairs. The key value pair is used to defined additional contact attributes. The key value pair should not include the contactType attribute.
      Parameters:
      aKeyValue - Key value pair to add to the list
    • setKeyValues

      public void setKeyValues(List<EPPValidateKeyValue> aKeyValues)
      Sets the full list of key value pairs. A key value pair is used to define additional contact attributes.
      Parameters:
      aKeyValues - List of EPPValidateKeyValue instances.
    • getKeyValues

      public List<EPPValidateKeyValue> getKeyValues()
      Gets the full list of key value pairs. A key value pair is used to define additional contact attributes.
      Returns:
      List of EPPValidateKeyValue instances.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPValidateContact instance.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Element Root DOM Element representing the EPPValidateCheckResult instance.
      Throws:
      EPPEncodeException - Unable to encode EPPValidateCheckResult instance.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPValidateContact attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root DOM Element to decode EPPValidateCheckResult from.
      Throws:
      EPPDecodeException - Unable to decode aElement.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPValidateContact.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPValidateContact
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • getType

      public String getType()
      Gets the EPP response type associated with EPPValidateContact.
      Returns:
      EPPValidateContact.ELM_NAME
    • getNamespace

      public String getNamespace()
      Gets the EPP command namespace associated with EPPValidateContact.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      EPPValidateMapFactory.NS
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPValidateContact with this instance.
      Overrides:
      equals in class Object
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if this object is the same as the aObject argument; false otherwise
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.