Class EPPDomainContact

  • All Implemented Interfaces:
    EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

    public class EPPDomainContact
    extends java.lang.Object
    implements EPPCodecComponent
    Represents a domain contact. The valid contact types are defined by the EPPDomainContact.TYPE_ constants. A contact has a type and a name that must be known to the EPP Server.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELM_LOCALNAME
      XML local name for EPPDomainContact.
      static java.lang.String ELM_NAME
      XML Element Name of EPPDomainContact root element.
      static java.lang.String TYPE_ADMINISTRATIVE
      Administrative Domain Contact
      static java.lang.String TYPE_BILLING
      Billing Domain Contact
      static java.lang.String TYPE_TECHNICAL
      Technical Domain Contact
    • Constructor Summary

      Constructors 
      Constructor Description
      EPPDomainContact()
      Default constructor for EPPDomainContact.
      EPPDomainContact​(java.lang.String aName, java.lang.String aType)
      EPPDomainContact which takes all attributes as arguments (name, type).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Clone EPPDomainContact.
      void decode​(org.w3c.dom.Element aElement)
      Decode the EPPDomainContact attributes from the aElement DOM Element tree.
      org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
      Encode a DOM Element tree from the attributes of the EPPDomainContact instance.
      boolean equals​(java.lang.Object aObject)
      implements a deep EPPDomainContact compare.
      java.lang.String getName()
      Gets the contact name
      java.lang.String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      java.lang.String getType()
      Gets the contact type.
      void setName​(java.lang.String aName)
      Sets the contact name.
      void setType​(java.lang.String aType)
      Sets the contact type to one of the EPPDomainContact.TYPE_ constants.
      java.lang.String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      • Methods inherited from class java.lang.Object

        finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ELM_LOCALNAME

        public static final java.lang.String ELM_LOCALNAME
        XML local name for EPPDomainContact.
        See Also:
        Constant Field Values
      • ELM_NAME

        public static final java.lang.String ELM_NAME
        XML Element Name of EPPDomainContact root element.
        See Also:
        Constant Field Values
      • TYPE_ADMINISTRATIVE

        public static final java.lang.String TYPE_ADMINISTRATIVE
        Administrative Domain Contact
        See Also:
        Constant Field Values
      • TYPE_BILLING

        public static final java.lang.String TYPE_BILLING
        Billing Domain Contact
        See Also:
        Constant Field Values
      • TYPE_TECHNICAL

        public static final java.lang.String TYPE_TECHNICAL
        Technical Domain Contact
        See Also:
        Constant Field Values
    • Constructor Detail

      • EPPDomainContact

        public EPPDomainContact()
        Default constructor for EPPDomainContact. The attribute default to null and must be set before invoking encode.
      • EPPDomainContact

        public EPPDomainContact​(java.lang.String aName,
                                java.lang.String aType)
        EPPDomainContact which takes all attributes as arguments (name, type).
        Parameters:
        aName - Contact Name
        aType - Contact Type, which should be a EPPDomainContact.TYPE_ constant.
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the contact name
        Returns:
        Contact Name
      • setName

        public void setName​(java.lang.String aName)
        Sets the contact name.
        Parameters:
        aName - Contact Name
      • getType

        public java.lang.String getType()
        Gets the contact type.
        Returns:
        contact type using one of the TYPE constants.
      • setType

        public void setType​(java.lang.String aType)
        Sets the contact type to one of the EPPDomainContact.TYPE_ constants.
        Parameters:
        aType - EPPDomainContact.TYPE_ constant.
      • encode

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

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

        public boolean equals​(java.lang.Object aObject)
        implements a deep EPPDomainContact compare.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        aObject - EPPDomainContact instance to compare with
        Returns:
        true if equal; false otherwise.
      • clone

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

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

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