Class EPPMark

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

public class EPPMark extends Object implements EPPCodecComponent
Class for a Mark that can contain a list of trademarks, treaty or statutes, and courts. The Mark includes a set of attributes that are used to verify the eligibility for the registration of a domain name.
See Also:
  • Field Details

  • Constructor Details

    • EPPMark

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

      public EPPMark(List<EPPTrademark> aTrademarks, List<EPPTreatyOrStatute> aTreatyOrStatutes, List<EPPCourt> aCourts)
      Create an EPPMark instance with each of the supported lists including trademarks, treaty and statutes, and courts.
      Parameters:
      aTrademarks - List of trademarks if defined; null otherwise.
      aTreatyOrStatutes - List of treaty or statutes if defined; null otherwise.
      aCourts - List of courts if defined; null otherwise.
  • 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 byte[] encode() throws EPPEncodeException
      Encode the mark to a byte[].
      Returns:
      Encoded mark
      Throws:
      EPPEncodeException - Error encoding the mark
    • 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 EPPMark 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 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 EPPMark compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPMark instance to compare with
      Returns:
      true if equal false otherwise
    • hasTrademarks

      public boolean hasTrademarks()
      Are trademarks defined?
      Returns:
      true if trademarks are defined; false otherwise.
    • getTrademarks

      public List<EPPTrademark> getTrademarks()
      Gets the list of trademarks.
      Returns:
      List of trademarks if set; null otherwise.
    • setTrademarks

      public void setTrademarks(List<EPPTrademark> aTrademarks)
      Sets the list of trademarks.
      Parameters:
      aTrademarks - List of trademarks
    • addTrademark

      public void addTrademark(EPPTrademark aTrademark)
      Adds a trademark to the list of trademarks.
      Parameters:
      aTrademark - Trademark to add to the list of trademarks.
    • hasTreatyOrStatutes

      public boolean hasTreatyOrStatutes()
      Are treaty or statutes defined?
      Returns:
      true if treaty or statutes are defined; false otherwise.
    • getTreatyOrStatutes

      public List<EPPTreatyOrStatute> getTreatyOrStatutes()
      Gets the list of treaty or statutes.
      Returns:
      List of treaty or statutes if set; null otherwise.
    • setTreatyOrStatutes

      public void setTreatyOrStatutes(List<EPPTreatyOrStatute> aTreatyOrStatutes)
      Sets the list of treaty or statutes.
      Parameters:
      aTreatyOrStatutes - List of trademarks
    • addTreatyOrStatute

      public void addTreatyOrStatute(EPPTreatyOrStatute aTreatyOrStatute)
      Adds a treaty or statute to the list of treaty or statutes.
      Parameters:
      aTreatyOrStatute - Treaty or statute to add to the list of treaty or statutes.
    • hasCourts

      public boolean hasCourts()
      Are courts defined?
      Returns:
      true if courts are defined; false otherwise.
    • getCourts

      public List<EPPCourt> getCourts()
      Gets the list of courts.
      Returns:
      List of courts if set; null otherwise.
    • setCourts

      public void setCourts(List<EPPCourt> aCourts)
      Sets the list of courts.
      Parameters:
      aCourts - List of courts
    • addCourt

      public void addCourt(EPPCourt aCourt)
      Adds a court to the list of courts.
      Parameters:
      aCourt - Court to add to the list of courts.
    • 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.