Class EPPContactAddChange

java.lang.Object
com.verisign.epp.codec.contact.EPPContactAddChange
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPContactAddChange extends Object implements EPPCodecComponent
Represents attributes to add, remove or change with a EPPContactUpdateCmd. In EPPContactUpdateCmd, an instance of EPPContactAddRemove is used to specify the attributes to add, an instance of EPPContactAddRemove is used to specify the attributes to remove and an instance of EPPContactAddRemove is used o specify the attributes to change.


The <contact:add> and <contact:rem> elements SHALL contain the following child elements:
  • One or more <contact:status> elements that contain status values to be associated with or removed from the object. When specifying a value to be removed, only the attribute value is significant; element text is not required to match a value for removal.


A <contact:chg> element SHALL contain the following OPTIONAL child elements:

  • A <contact:postalInfo> element that contains the postal contacts. Use getPostalInfo, addPostalInfo and setPostalInfo to get, add and set the elements.
  • An <contact:voice> element that contains the contact's voice telephone number. Use getVoice and setVoice to get and set the elements.
  • An <contact:fax> element that contains the contact's facsimile telephone number. Use getFax and setFax to get and set the elements.
  • A <contact:email> element that contains the contact's e-mail address. Use getEmail and setEmail to get and set the elements.
See Also:
  • Constructor Details

    • EPPContactAddChange

      public EPPContactAddChange()
      Default constructor for EPPContactAddChange.
    • EPPContactAddChange

      public EPPContactAddChange(Vector newStatuses)
      Constructor for EPPContactAddChange.
      Parameters:
      newStatuses - Vector of statuses for contact add.
    • EPPContactAddChange

      public EPPContactAddChange(EPPContactPostalDefinition aPostalInfo, String aVoice, EPPAuthInfo aAuthInfo)
      Constructor for EPPContactAddChange.
      Parameters:
      aPostalInfo - EPPContactPostalDefinition, defining a series objects for contact changes.
      aVoice - Voice number
      aAuthInfo - Authorization information for contact change.
    • EPPContactAddChange

      public EPPContactAddChange(EPPContactPostalDefinition aPostalInfo, String aVoice, String aFax, String aEmail, EPPAuthInfo aAuthInfo)
      Constructor for EPPContactAddChange.
      Parameters:
      aPostalInfo - EPPContactPostalDefinition, defining a series objects for contact changes.
      aVoice - Voice number
      aFax - Fax number
      aEmail - Email
      aAuthInfo - Authorization information for contact change.
    • EPPContactAddChange

      public EPPContactAddChange(Vector aPostalInfo, String aVoice, String aFax, String aEmail, EPPAuthInfo aAuthInfo)
      Constructor for EPPContactAddChange.
      Parameters:
      aPostalInfo - Vector, defining a series objects for contact changes.
      aVoice - Voice number
      aFax - Fax number
      aEmail - Email
      aAuthInfo - Authorization information for contact change.
  • Method Details

    • encode

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

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

      public boolean equals(Object aObject)
      implements a deep EPPContactAddChange compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPContactAddChange instance to compare with
      Returns:
      true if the objects are equal; false otherwise
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPContactAddChange.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPContactAddChange
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • 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.
    • getPostalInfo

      public Vector getPostalInfo()
      Gets the postalInfo elements of contact change.
      Returns:
      Vector of EPPContactPostalDefinition instances
    • setPostalInfo

      public void setPostalInfo(Vector aPostalContacts)
      Sets list of contact postal information.
      Parameters:
      aPostalContacts - java.util.Vector of EPPContactPostalDefinition instances. If null, the list will be reset.
    • addPostalInfo

      public void addPostalInfo(EPPContactPostalDefinition aPostalInfo)
      Adds contact postalInfo.
      Parameters:
      aPostalInfo - Postal information to add
    • hasAuthInfo

      public boolean hasAuthInfo()
      Returns true if auth info exists.
      Returns:
      true if auth info exists; otherwise false.
    • getAuthInfo

      public EPPAuthInfo getAuthInfo()
      Get authorization information for contact change.
      Returns:
      The authorization information is set; null otherwise
    • setAuthInfo

      public void setAuthInfo(EPPAuthInfo aAuthInfo)
      Set authorization information for contact change.
      Parameters:
      aAuthInfo - Authorization information to set. The
    • hasDisclose

      public boolean hasDisclose()
      Returns true if disclose exists.
      Returns:
      true if disclose exists; otherwise false.
    • getDisclose

      public EPPContactDisclose getDisclose()
      Get disclose information.
      Returns:
      Disclose information if defined; null otherwise;
    • setDisclose

      public void setDisclose(EPPContactDisclose aDisclose)
      Sets the disclose information.
      Parameters:
      aDisclose - Disclose information to set.
    • hasEmail

      public boolean hasEmail()
      Returns true if email exists.
      Returns:
      true if email exists; otherwise false.
    • getEmail

      public String getEmail()
      Gets email.
      Returns:
      Email if set; null otherwise
    • setEmail

      public void setEmail(String aEmail)
      Sets the email.
      Parameters:
      aEmail - Email to set
    • hasFax

      public boolean hasFax()
      Returns true if fax exists.
      Returns:
      true if fax exists; otherwise false.
    • getFax

      public String getFax()
      Get fax number.
      Returns:
      String fax number
    • setFax

      public void setFax(String aFax)
      Sets the fax number.
      Parameters:
      aFax - Fax number to set
    • hasFaxExt

      public boolean hasFaxExt()
      Returns true if fax extension exists.
      Returns:
      true if fax extension exists; otherwise false.
    • getFaxExt

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

      public void setFaxExt(String aFaxExt)
      Sets the fax extension.
      Parameters:
      aFaxExt - Fax extension
    • hasStatuses

      public boolean hasStatuses()
      Returns true if statuses exist.
      Returns:
      true if statuses exist; otherwise false.
    • getStatuses

      public Vector getStatuses()
      Get a list of contact statuses.
      Returns:
      Contact statuses if defined; null otherwise
    • setStatuses

      public void setStatuses(Vector aStatuses)
      Sets the list of contact statuses.
      Parameters:
      aStatuses - List of contact statuses
    • hasVoice

      public boolean hasVoice()
      Returns true if voice exists.
      Returns:
      true if voice exists; otherwise false.
    • getVoice

      public String getVoice()
      Get voice number.
      Returns:
      String fax number
    • setVoice

      public void setVoice(String aVoice)
      Sets the voice number.
      Parameters:
      aVoice - The voice number to set
    • hasVoiceExt

      public boolean hasVoiceExt()
      Returns true if voice extension exists.
      Returns:
      true if voice extension exists; otherwise false.
    • getVoiceExt

      public String getVoiceExt()
      Get voice number extension.
      Returns:
      Voice number extension if defined; null otherwise.
    • setVoiceExt

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

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.