Class EPPTreatyOrStatute

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

public class EPPTreatyOrStatute extends Object implements EPPCodecComponent
Class for a Treaty or Statute that can be included in the list of treaty or statutes contained in the EPPMark.
See Also:
  • Field Details

  • Constructor Details

    • EPPTreatyOrStatute

      public EPPTreatyOrStatute()
      Create an EPPTreatyOrStatute instance. Use the setter methods to set the attributes of the instance.
  • Method Details

    • clone

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

      public byte[] encode() throws EPPEncodeException
      Encode the treaty or statute to a byte[].
      Returns:
      Encoded treaty or statute
      Throws:
      EPPEncodeException - Error encoding the treaty or statute
    • 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(byte[] aMarkArray) throws EPPDecodeException
      Decode the EPPTreatyOrStatute attributes from the input byte[].
      Parameters:
      aMarkArray - byte[] to decode the attribute values
      Throws:
      EPPDecodeException - Error decoding the byte[].
    • decode

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

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

      public String getId()
      Gets the identifier for the treaty or statute.
      Returns:
      The identifier for the treaty or statute if set; null otherwise.
    • setId

      public void setId(String aId)
      Sets the identifier for the treaty or statute.
      Parameters:
      aId - Identifier for the treaty or statute
    • getName

      public String getName()
      Gets the registered treaty or statute text string.
      Returns:
      The registered treaty or statute text string if set; null otherwise.
    • setName

      public void setName(String aName)
      Sets the registered treaty or statute text string.
      Parameters:
      aName - the registered treaty or statute text string
    • getHolders

      public List<EPPMarkContact> getHolders()
      Gets holders of the treaty or statute.
      Returns:
      the holders of the treaty or statute if set; Empty List otherwise.
    • setHolders

      public void setHolders(List<EPPMarkContact> aHolders)
      Sets holders of the treaty or statute.
      Parameters:
      aHolders - the holders of the treaty or statute
    • addHolder

      public void addHolder(EPPMarkContact aHolder)
      Adds a holder to the list of holders of the treaty or statute.
      Parameters:
      aHolder - Holder to add to list of holders of the treaty or statute.
    • getContacts

      public List<EPPMarkContact> getContacts()
      Gets contacts of the treaty or statute.
      Returns:
      the contacts of the treaty or statute if set; Empty List otherwise.
    • setContacts

      public void setContacts(List<EPPMarkContact> aContacts)
      Sets contacts of the treaty or statute.
      Parameters:
      aContacts - the contacts of the treaty or statute
    • addContact

      public void addContact(EPPMarkContact aContact)
      Adds a contact to the list of contacts of the treaty or statute.
      Parameters:
      aContact - Contact to add to list of contacts of the treaty or statute.
    • getProtections

      public List<EPPProtection> getProtections()
      Gets protections of the treaty or statute.
      Returns:
      the protections of the treaty or statute if set; Empty List otherwise.
    • setProtections

      public void setProtections(List<EPPProtection> aProtections)
      Sets protections of the treaty or statute.
      Parameters:
      aProtections - the protections of the treaty or statute
    • addProtection

      public void addProtection(EPPProtection aProtection)
      Adds a protection to the list of protections of the treaty or statute.
      Parameters:
      aProtection - Protection to add to list of protections of the treaty or statute.
    • getLabels

      public List<String> getLabels()
      Gets the domain name labels that corresponds to the treaty or statute.
      Returns:
      the domain name labels that corresponds to the treaty or statute if set; Empty List otherwise.
    • setLabels

      public void setLabels(List<String> aLabels)
      Sets the domain name labels that corresponds to the treaty or statute.
      Parameters:
      aLabels - the domain name labels that corresponds to the treaty or statute
    • addLabel

      public void addLabel(String aLabel)
      Adds a domain name label to the domain name labels that corresponds to the treaty or statute.
      Parameters:
      aLabel - Domain name label to add.
    • getGoodsAndServices

      public String getGoodsAndServices()
      Gets full description of the goods and services mentioned in the treaty or statute registration document.
      Returns:
      The goods and services if set; null otherwise.
    • setGoodsAndServices

      public void setGoodsAndServices(String aGoodsAndServices)
      Sets full description of the goods and services mentioned in the treaty or statute registration document.
      Parameters:
      aGoodsAndServices - The goods and services
    • getRefNum

      public String getRefNum()
      Gets the reference number of the mark of the treaty or statute.
      Returns:
      Reference number of the mark of the treaty or statute if defined; null otherwise.
    • setRefNum

      public void setRefNum(String aRefNum)
      Sets the reference number of the mark of the treaty or statute.
      Parameters:
      aRefNum - Reference number of the mark of the treaty or statute.
    • getProDate

      public Date getProDate()
      Gets the date of protection of the mark.
      Returns:
      The date of protection of the mark if defined; null otherwise.
    • setProDate

      public void setProDate(Date aProDate)
      Sets the date of protection of the mark.
      Parameters:
      aProDate - The date of protection of the mark.
    • getTitle

      public String getTitle()
      Gets the title of the treaty or statute.
      Returns:
      The title of the treaty or statute.
    • setTitle

      public void setTitle(String aTitle)
      Sets the title of the treaty or statute.
      Parameters:
      aTitle - The title of the treaty or statute.
    • getExecDate

      public Date getExecDate()
      Gets the execution date of the treaty or statute.
      Returns:
      The execution date of the treaty or statute if set; null otherwise.
    • setExecDate

      public void setExecDate(Date aExecDate)
      Sets the execution date of the treaty or statute.
      Parameters:
      aExecDate - The execution date of the treaty or statute
    • 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.