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
getClientTransIdandsetClientTransIdto get and set the element.hasClientTransIdcan 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
getServerTransIdandsetServerTransIdto get and set the element.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_TRANSID_LENMaximum transaction id length.static intMIN_TRANSID_LENMinimum transaction id length.
-
Constructor Summary
Constructors Constructor Description EPPTransId()Allocates a newEPPTransIdwithnulldefault attribute values.EPPTransId(java.lang.String aServerTransId)Allocates a newEPPTransIdwith just a server transaction id specified.EPPTransId(java.lang.String aClientTransId, java.lang.String aServerTransId)Allocates a newEPPTransIdwith 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 newEPPTransIdwith 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.Objectclone()CloneEPPTransId.voiddecode(org.w3c.dom.Element aElement)decodeEPPTransIdfrom a DOM element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)encodeEPPTransIdinto a DOM element tree.booleanequals(java.lang.Object aObject)implements a deepEPPTransIdcompare.java.lang.StringgetClientTransId()Gets the client specified transaction id.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.StringgetRootName()Gets the root tag such as domain or host specific tags.java.lang.StringgetRootNS()Gets the root element XML namespace URI.java.lang.StringgetServerTransId()Gets the server generated transaction id.voidsetClientTransId(java.lang.String aClientTransId)Sets the client specified transaction id.voidsetRootName(java.lang.String aRootNS, java.lang.String aRootName)Sets the root tag such as domain or host specific tags.voidsetServerTransId(java.lang.String aServerTransId)Sets the server generated transaction id.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation 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 newEPPTransIdwithnulldefault attribute values. The server transaction id must be set before callingencode.
-
EPPTransId
public EPPTransId(java.lang.String aServerTransId)
Allocates a newEPPTransIdwith 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 newEPPTransIdwith 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 newEPPTransIdwith 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
Stringif defined;nullotherwise.
-
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
Stringif defined;nullotherwise.
-
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 EPPEncodeExceptionencodeEPPTransIdinto a DOM element tree. The <trID> or the element name set withsetRootNameis creates and the attribute nodes are appended as children.- Specified by:
encodein 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 EPPDecodeExceptiondecodeEPPTransIdfrom a DOM element tree. TheaElementargument needs to be the "trID" element, or an element that conforms to the XML structure of "trID".- Specified by:
decodein 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 deepEPPTransIdcompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPTransIdinstance to compare with- Returns:
trueif equal;falseotherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPTransId.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein 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 XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-