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
andsetClientTransId
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
andsetServerTransId
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 newEPPTransId
withnull
default attribute values.EPPTransId(java.lang.String aServerTransId)
Allocates a newEPPTransId
with just a server transaction id specified.EPPTransId(java.lang.String aClientTransId, java.lang.String aServerTransId)
Allocates a newEPPTransId
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 newEPPTransId
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()
CloneEPPTransId
.void
decode(org.w3c.dom.Element aElement)
decodeEPPTransId
from a DOM element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encodeEPPTransId
into a DOM element tree.boolean
equals(java.lang.Object aObject)
implements a deepEPPTransId
compare.java.lang.String
getClientTransId()
Gets the client specified transaction id.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.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 ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
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 newEPPTransId
withnull
default attribute values. The server transaction id must be set before callingencode
.
-
EPPTransId
public EPPTransId(java.lang.String aServerTransId)
Allocates a newEPPTransId
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 newEPPTransId
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 newEPPTransId
with both the client transaction id and the server transaction id specified along with a specific root tag name.- Parameters:
aRootNS
- Root element namespace URIaRootName
- 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 toELM_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 tagaRootName
- 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
encodeEPPTransId
into a DOM element tree. The <trID> or the element name set withsetRootName
is creates and the attribute nodes are appended as children.- Specified by:
encode
in interfaceEPPCodecComponent
- 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
decodeEPPTransId
from a DOM element tree. TheaElement
argument needs to be the "trID" element, or an element that conforms to the XML structure of "trID".- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- The "trID" XML element.- Throws:
EPPDecodeException
- Error decoding the DOM element tree.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPTransId
compare.- Overrides:
equals
in classjava.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
CloneEPPTransId
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- Deep copy clone of
EPPTransId
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-