Package com.verisign.epp.codec.gen

## Class EPPTransId

- java.lang.Object
- - com.verisign.epp.codec.gen.EPPTransId

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

      public class EPPTransId
      extends java.lang.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:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `MAX_TRANSID_LEN` | Maximum transaction id length.
    `static int` | `MIN_TRANSID_LEN` | Minimum transaction id length.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPTransId()` | Allocates a new `EPPTransId` with `null` default attribute values.
    `EPPTransId​(java.lang.String aServerTransId)` | Allocates a new `EPPTransId` with just a server transaction id specified.
    `EPPTransId​(java.lang.String aClientTransId, java.lang.String aServerTransId)` | Allocates a new `EPPTransId` with both the client transaction id and the server transaction id specified.
    `EPPTransId​(java.lang.String aRootNS, java.lang.String aRootName, java.lang.String aClientTransId, java.lang.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

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

    - #### MIN_TRANSID_LEN

          public static final int MIN_TRANSID_LEN

      Minimum transaction id length.
      See Also:
        Constant Field Values

    - #### MAX_TRANSID_LEN

          public static final int MAX_TRANSID_LEN

      Maximum transaction id length.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### 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​(java.lang.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​(java.lang.String aClientTransId,
                            java.lang.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​(java.lang.String aRootNS,
                            java.lang.String aRootName,
                            java.lang.String aClientTransId,
                            java.lang.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 Detail

    - #### getRootNS

          public java.lang.String getRootNS()

      Gets the root element XML namespace URI.
      Returns:
        root element XML namespace URI

    - #### getRootName

          public java.lang.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​(java.lang.String aRootNS,
                                  java.lang.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 java.lang.String getClientTransId()

      Gets the client specified transaction id.
      Returns:
        the client specified transaction id `String` if defined; `null` otherwise.

    - #### setClientTransId

          public void setClientTransId​(java.lang.String aClientTransId)

      Sets the client specified transaction id.
      Parameters:
        `aClientTransId` - the client specified transaction id.

    - #### getServerTransId

          public java.lang.String getServerTransId()

      Gets the server generated transaction id.
      Returns:
        the server generated transaction id `String` if defined; `null` otherwise.

    - #### setServerTransId

          public void setServerTransId​(java.lang.String aServerTransId)

      Sets the server generated transaction id.
      Parameters:
        `aServerTransId` - the server generated transaction id.

    - #### encode

          public org.w3c.dom.Element encode​(org.w3c.dom.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​(org.w3c.dom.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​(java.lang.Object aObject)

      implements a deep `EPPTransId` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPTransId` instance to compare with
      Returns:
        `true` if equal; `false` otherwise

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Clone `EPPTransId`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        Deep copy clone of `EPPTransId`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### 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`.