Class EPPMarkContact

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

    public class EPPMarkContact
    extends java.lang.Object
    implements EPPCodecComponent
    Class for a Trademark, Mark for short, contact.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELM_CONTACT_LOCALNAME
      Constant for the contact local name
      static java.lang.String ELM_CONTACT_NAME
      Constant for the contact tag name
      static java.lang.String ELM_HOLDER_LOCALNAME
      Constant for the owner local name
      static java.lang.String ELM_HOLDER_NAME
      Constant for the owner tag name
      static java.lang.String ENTITLEMENT_ASSIGNEE
      Assignee entitlement for a holder contact.
      static java.lang.String ENTITLEMENT_LICENSEE
      Licensee entitlement for a holder contact.
      static java.lang.String ENTITLEMENT_OWNER
      Owner entitlement for a holder contact.
      static java.lang.String TYPE_AGENT
      Agent type for a (non-holder) contact.
      static java.lang.String TYPE_OWNER
      Owner type for a (non-holder) contact.
      static java.lang.String TYPE_THIRD_PARTY
      Third party type for a (non-holder) contact.
    • Constructor Summary

      Constructors 
      Constructor Description
      EPPMarkContact()
      Creates empty EPPMarkContact instance.
      EPPMarkContact​(java.lang.String aName, java.lang.String aOrg, EPPMarkAddress aAddress, java.lang.String aVoice, java.lang.String aFax, java.lang.String aEmail)
      Creates a mark contact with the name, organization, address, voice, fax, and email attributes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Clone EPPMark.
      void decode​(org.w3c.dom.Element aElement)
      Decode the EPPMark component
      org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
      Sets all this instance's data in the given XML document
      boolean equals​(java.lang.Object aObject)
      implements a deep EPPMarkContact compare.
      EPPMarkAddress getAddress()
      Gets the address information associated with the contact.
      java.lang.String getEmail()
      Gets the contact's email address.
      java.lang.String getEntitlement()
      Gets the entitlement of the holder contact.
      java.lang.String getFax()
      Gets the contact's facsimile telephone number.
      java.lang.String getFaxExt()
      Gets the contact's facsimile telephone number extension.
      java.lang.String getLocalName()
      Gets the XML local name of the mark contact.
      java.lang.String getName()
      Gets name of the individual or role represented by the contact.
      java.lang.String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      java.lang.String getOrg()
      Gets the name of the organization with which the contact is affiliated.
      java.lang.String getType()
      Gets the type of the (non-holder) contact.
      java.lang.String getVoice()
      Gets the contact's voice telephone number.
      java.lang.String getVoiceExt()
      Gets the contact's voice telephone number extension.
      boolean isContact()
      Is the EPPMarkContact a (non-holder) contact?
      boolean isHolderContact()
      Is the EPPMarkContact a holder contact?
      void setAddress​(EPPMarkAddress aAddress)
      Sets the address information associated with the contact.
      void setEmail​(java.lang.String aEmail)
      Sets the contact's email address.
      void setEntitlement​(java.lang.String aEntitlement)
      Sets the entitlement of the holder contact.
      void setFax​(java.lang.String aFax)
      Sets the contact's facsimile telephone number.
      void setFaxExt​(java.lang.String aFaxExt)
      Sets the contact's facsimile telephone extension number.
      void setLocalName​(java.lang.String aLocalName)
      Sets the XML local name of the mark contact.
      void setName​(java.lang.String aName)
      Sets name of the individual or role represented by the contact.
      void setOrg​(java.lang.String aOrg)
      Sets the name of the organization with which the contact is affiliated.
      void setType​(java.lang.String aType)
      Sets the type of the (non-holder) contact.
      void setVoice​(java.lang.String aVoice)
      Sets the contact's voice telephone number.
      void setVoiceExt​(java.lang.String aVoiceExt)
      Sets the contact's voice telephone extension number.
      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

      • ENTITLEMENT_OWNER

        public static final java.lang.String ENTITLEMENT_OWNER
        Owner entitlement for a holder contact.
        See Also:
        Constant Field Values
      • ENTITLEMENT_ASSIGNEE

        public static final java.lang.String ENTITLEMENT_ASSIGNEE
        Assignee entitlement for a holder contact.
        See Also:
        Constant Field Values
      • ENTITLEMENT_LICENSEE

        public static final java.lang.String ENTITLEMENT_LICENSEE
        Licensee entitlement for a holder contact.
        See Also:
        Constant Field Values
      • TYPE_OWNER

        public static final java.lang.String TYPE_OWNER
        Owner type for a (non-holder) contact.
        See Also:
        Constant Field Values
      • TYPE_AGENT

        public static final java.lang.String TYPE_AGENT
        Agent type for a (non-holder) contact.
        See Also:
        Constant Field Values
      • TYPE_THIRD_PARTY

        public static final java.lang.String TYPE_THIRD_PARTY
        Third party type for a (non-holder) contact.
        See Also:
        Constant Field Values
      • ELM_HOLDER_LOCALNAME

        public static final java.lang.String ELM_HOLDER_LOCALNAME
        Constant for the owner local name
        See Also:
        Constant Field Values
      • ELM_CONTACT_LOCALNAME

        public static final java.lang.String ELM_CONTACT_LOCALNAME
        Constant for the contact local name
        See Also:
        Constant Field Values
      • ELM_HOLDER_NAME

        public static final java.lang.String ELM_HOLDER_NAME
        Constant for the owner tag name
        See Also:
        Constant Field Values
      • ELM_CONTACT_NAME

        public static final java.lang.String ELM_CONTACT_NAME
        Constant for the contact tag name
        See Also:
        Constant Field Values
    • Constructor Detail

      • EPPMarkContact

        public EPPMarkContact()
        Creates empty EPPMarkContact instance.
      • EPPMarkContact

        public EPPMarkContact​(java.lang.String aName,
                              java.lang.String aOrg,
                              EPPMarkAddress aAddress,
                              java.lang.String aVoice,
                              java.lang.String aFax,
                              java.lang.String aEmail)
        Creates a mark contact with the name, organization, address, voice, fax, and email attributes.
        Parameters:
        aName - name of the individual or role represented by the contact.
        aOrg - name of the organization with which the contact is affiliated.
        aAddress - address information associated with the contact.
        aVoice - contact's voice telephone number
        aFax - contact's facsimile telephone number
        aEmail - contact's email address
    • Method Detail

      • clone

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

        public org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
                                   throws EPPEncodeException
        Sets all this instance's data in the given XML document
        Specified by:
        encode in interface EPPCodecComponent
        Parameters:
        aDocument - a DOM Document to attach data to.
        Returns:
        The root element of this component.
        Throws:
        EPPEncodeException - Thrown if any errors prevent encoding.
      • equals

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

        public boolean isHolderContact()
        Is the EPPMarkContact a holder contact?
        Returns:
        true if the EPPMarkContact is a holder contact; false otherwise.
      • isContact

        public boolean isContact()
        Is the EPPMarkContact a (non-holder) contact?
        Returns:
        true if the EPPMarkContact is a (non-holder) contact; false otherwise.
      • setLocalName

        public void setLocalName​(java.lang.String aLocalName)
        Sets the XML local name of the mark contact. This should be set to either ELM_HOLDER_LOCALNAME or ELM_CONTACT_LOCALNAME.
        Parameters:
        aLocalName - XML local name of the mark contact
      • getLocalName

        public java.lang.String getLocalName()
        Gets the XML local name of the mark contact.
        Returns:
        The XML local name of the mark contact, which should be either ELM_HOLDER_LOCALNAME or ELM_CONTACT_LOCALNAME.
      • getEntitlement

        public java.lang.String getEntitlement()
        Gets the entitlement of the holder contact.
        Returns:
        Entitlement using one of the ENTITLEMENT constants if defined; null otherwise.
      • setEntitlement

        public void setEntitlement​(java.lang.String aEntitlement)
        Sets the entitlement of the holder contact.
        Parameters:
        aEntitlement - Entitlement of the holder contact using one of the ENTITLEMENT constants.
      • getType

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

        public void setType​(java.lang.String aType)
        Sets the type of the (non-holder) contact.
        Parameters:
        aType - Type of the contact using one of the TYPE constants.
      • getName

        public java.lang.String getName()
        Gets name of the individual or role represented by the contact.
        Returns:
        Name of the individual or role represented by the contact if defined; null otherwise.
      • setName

        public void setName​(java.lang.String aName)
        Sets name of the individual or role represented by the contact.
        Parameters:
        aName - Name of the individual or role represented by the contact.
      • getOrg

        public java.lang.String getOrg()
        Gets the name of the organization with which the contact is affiliated.
        Returns:
        The name of the organization with which the contact is affiliated if defined; null otherwise.
      • setOrg

        public void setOrg​(java.lang.String aOrg)
        Sets the name of the organization with which the contact is affiliated.
        Parameters:
        aOrg - The name of the organization with which the contact is affiliated.
      • getAddress

        public EPPMarkAddress getAddress()
        Gets the address information associated with the contact.
        Returns:
        address information associated with the contact if defined; null otherwise.
      • setAddress

        public void setAddress​(EPPMarkAddress aAddress)
        Sets the address information associated with the contact.
        Parameters:
        aAddress - address information associated with the contact.
      • getVoice

        public java.lang.String getVoice()
        Gets the contact's voice telephone number.
        Returns:
        The contact's voice telephone number if defined; null otherwise.
      • setVoice

        public void setVoice​(java.lang.String aVoice)
        Sets the contact's voice telephone number.
        Parameters:
        aVoice - The contact's voice telephone number.
      • getVoiceExt

        public java.lang.String getVoiceExt()
        Gets the contact's voice telephone number extension.
        Returns:
        The contact's voice telephone number extension if defined; null otherwise.
      • setVoiceExt

        public void setVoiceExt​(java.lang.String aVoiceExt)
        Sets the contact's voice telephone extension number.
        Parameters:
        aVoiceExt - The contact's voice telephone extension number.
      • getFax

        public java.lang.String getFax()
        Gets the contact's facsimile telephone number.
        Returns:
        The contact's facsimile telephone number if defined; null otherwise.
      • setFax

        public void setFax​(java.lang.String aFax)
        Sets the contact's facsimile telephone number.
        Parameters:
        aFax - The contact's facsimile telephone number.
      • getFaxExt

        public java.lang.String getFaxExt()
        Gets the contact's facsimile telephone number extension.
        Returns:
        The contact's facsimile telephone number extension if defined; null otherwise.
      • setFaxExt

        public void setFaxExt​(java.lang.String aFaxExt)
        Sets the contact's facsimile telephone extension number.
        Parameters:
        aFaxExt - The contact's facsimile telephone extension number.
      • getEmail

        public java.lang.String getEmail()
        Gets the contact's email address.
        Returns:
        The contact's email address if defined; null otherwise.
      • setEmail

        public void setEmail​(java.lang.String aEmail)
        Sets the contact's email address.
        Parameters:
        aEmail - The contact's email address.
      • 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.