Class EPPMarkContact

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

public class EPPMarkContact extends Object implements EPPCodecComponent
Class for a Trademark, Mark for short, contact.
See Also:
  • Field Details

  • Constructor Details

    • EPPMarkContact

      public EPPMarkContact()
      Creates empty EPPMarkContact instance.
    • EPPMarkContact

      public EPPMarkContact(String aName, String aOrg, EPPMarkAddress aAddress, String aVoice, String aFax, 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 Details

    • clone

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

      public Element encode(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.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPMark component
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root element of the EPPMark
      Throws:
      EPPDecodeException - Error decoding the EPPMark
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPMarkContact compare.
      Overrides:
      equals in class 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(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 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 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(String aEntitlement)
      Sets the entitlement of the holder contact.
      Parameters:
      aEntitlement - Entitlement of the holder contact using one of the ENTITLEMENT constants.
    • getType

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

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

      public 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(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 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(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 String getVoice()
      Gets the contact's voice telephone number.
      Returns:
      The contact's voice telephone number if defined; null otherwise.
    • setVoice

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

      public 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(String aVoiceExt)
      Sets the contact's voice telephone extension number.
      Parameters:
      aVoiceExt - The contact's voice telephone extension number.
    • getFax

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

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

      public 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(String aFaxExt)
      Sets the contact's facsimile telephone extension number.
      Parameters:
      aFaxExt - The contact's facsimile telephone extension number.
    • getEmail

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

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