Class EPPTransId

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

public class EPPTransId extends Object implements EPPCodecComponent
Represents a <trID> element of a response, which uniquely identifies a transaction. A transaction identifier SHALL include the following child elements:
  • An optional <clTRID> element that mirrors the optional <clID> element in the command. Use getClientTransId and setClientTransId to get and set the element. hasClientTransId can be used to determine if the element exists.
  • A <svTRID> element that is generated by the EPP Server that uniquely identifies the server transaction. Use getServerTransId and setServerTransId to get and set the element.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Maximum transaction id length.
    static final int
    Minimum transaction id length.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Allocates a new EPPTransId with null default attribute values.
    EPPTransId(String aServerTransId)
    Allocates a new EPPTransId with just a server transaction id specified.
    EPPTransId(String aClientTransId, String aServerTransId)
    Allocates a new EPPTransId with both the client transaction id and the server transaction id specified.
    EPPTransId(String aRootNS, String aRootName, String aClientTransId, String aServerTransId)
    Allocates a new EPPTransId with both the client transaction id and the server transaction id specified along with a specific root tag name.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPTransId.
    void
    decode(Element aElement)
    decode EPPTransId from a DOM element tree.
    encode(Document aDocument)
    encode EPPTransId into a DOM element tree.
    boolean
    equals(Object aObject)
    implements a deep EPPTransId compare.
    Gets the client specified transaction id.
    Returns the XML namespace associated with the EPPCodecComponent.
    Gets the root tag such as domain or host specific tags.
    Gets the root element XML namespace URI.
    Gets the server generated transaction id.
    void
    setClientTransId(String aClientTransId)
    Sets the client specified transaction id.
    void
    setRootName(String aRootNS, String aRootName)
    Sets the root tag such as domain or host specific tags.
    void
    setServerTransId(String aServerTransId)
    Sets the server generated transaction id.
    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 Details

    • MIN_TRANSID_LEN

      public static final int MIN_TRANSID_LEN
      Minimum transaction id length.
      See Also:
    • MAX_TRANSID_LEN

      public static final int MAX_TRANSID_LEN
      Maximum transaction id length.
      See Also:
  • Constructor Details

    • EPPTransId

      public EPPTransId()
      Allocates a new EPPTransId with null default attribute values. The server transaction id must be set before calling encode.
    • EPPTransId

      public EPPTransId(String aServerTransId)
      Allocates a new EPPTransId with just a server transaction id specified.
      Parameters:
      aServerTransId - Server generated transaction id that uniquely identifies the transaction.
    • EPPTransId

      public EPPTransId(String aClientTransId, String aServerTransId)
      Allocates a new EPPTransId with both the client transaction id and the server transaction id specified.
      Parameters:
      aClientTransId - Client specified transaction id contained in an EPP command.
      aServerTransId - Server generated transaction id that uniquely identifies the transaction.
    • EPPTransId

      public EPPTransId(String aRootNS, String aRootName, String aClientTransId, String aServerTransId)
      Allocates a new EPPTransId with both the client transaction id and the server transaction id specified along with a specific root tag name.
      Parameters:
      aRootNS - Root element namespace URI
      aRootName - Root element of trans id.
      aClientTransId - Client specified transaction id contained in an EPP command.
      aServerTransId - Server generated transaction id that uniquely identifies the transaction.
  • Method Details

    • getRootNS

      public String getRootNS()
      Gets the root element XML namespace URI.
      Returns:
      root element XML namespace URI
    • getRootName

      public String getRootName()
      Gets the root tag such as domain or host specific tags. The default value is set to ELM_NAME.
      Returns:
      The root tag used.
    • setRootName

      public void setRootName(String aRootNS, String aRootName)
      Sets the root tag such as domain or host specific tags.
      Parameters:
      aRootNS - Namespace URI for the root tag
      aRootName - Sets the root tag
    • getClientTransId

      public String getClientTransId()
      Gets the client specified transaction id.
      Returns:
      the client specified transaction id String if defined; null otherwise.
    • setClientTransId

      public void setClientTransId(String aClientTransId)
      Sets the client specified transaction id.
      Parameters:
      aClientTransId - the client specified transaction id.
    • getServerTransId

      public String getServerTransId()
      Gets the server generated transaction id.
      Returns:
      the server generated transaction id String if defined; null otherwise.
    • setServerTransId

      public void setServerTransId(String aServerTransId)
      Sets the server generated transaction id.
      Parameters:
      aServerTransId - the server generated transaction id.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode EPPTransId into a DOM element tree. The <trID> or the element name set with setRootName is creates and the attribute nodes are appended as children.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOCUMENT ME!
      Returns:
      <trID> root element tree.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode EPPTransId from a DOM element tree. The aElement argument needs to be the "trID" element, or an element that conforms to the XML structure of "trID".
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - The "trID" XML element.
      Throws:
      EPPDecodeException - Error decoding the DOM element tree.
    • equals

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

      public Object clone() throws CloneNotSupportedException
      Clone EPPTransId.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      Deep copy clone of EPPTransId
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • 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.