Class EPPOrgContact

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

public class EPPOrgContact extends Object implements EPPCodecComponent
Represents an org contact. The valid contact types are defined by the EPPOrgContact.Type enumeration.
See Also:
  • Field Details

  • Constructor Details

    • EPPOrgContact

      public EPPOrgContact()
      Default constructor for EPPOrgContact.
    • EPPOrgContact

      public EPPOrgContact(String aContactId, EPPOrgContact.Type aType)
      EPPOrgContact that takes all attributes as arguments (contactId and type).
      Parameters:
      aContactId - Contact Identifier
      aType - Contact Type using EPPOrgContact.Type enumeration.
    • EPPOrgContact

      public EPPOrgContact(String aContactId, EPPOrgContact.Type aType, String aTypeName)
      EPPOrgContact that takes all attributes as arguments (contactId and type).
      Parameters:
      aContactId - Contact Identifier
      aType - Contact Type using EPPOrgContact.Type enumeration.
      aTypeName - Name of a "custom" type
  • Method Details

    • getType

      public EPPOrgContact.Type getType()
      Gets the contact type using the EPPOrgContact.Type enumeration.
      Returns:
      Contact type if defined; null otherwise.
    • setType

      public void setType(EPPOrgContact.Type aType)
      Sets the contact type using the EPPOrgContact.Type enumeration.
      Parameters:
      aType - Contact type
    • getContactId

      public String getContactId()
      Gets the contact identifier of the contact.
      Returns:
      Contact identifier if defined; null otherwise.
    • setContactId

      public void setContactId(String aContactId)
      Sets the contact identifier of the contact.
      Parameters:
      aContactId - Contact identifier of the contact
    • hasTypeName

      public boolean hasTypeName()
      Is the type name defined?
      Returns:
      true if the type name is defined; false otherwise.
    • getTypeName

      public String getTypeName()
      Gets the optional type name for the CUSTOM type.
      Returns:
      the parentId
    • setTypeName

      public void setTypeName(String aTypeName)
      Gets the optional type name for the CUSTOM type.
      Parameters:
      aTypeName - the parentId to set
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPOrgContact 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 EPPOrgContact instance.
      Throws:
      EPPEncodeException - Unable to encode EPPOrgContact instance.
    • decode

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

      public boolean equals(Object aObject)
      implements a deep EPPOrgContact compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPOrgContact instance to compare with
      Returns:
      DOCUMENT ME!
    • clone

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

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