|
EPP RTK for Java v 0.3.10 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.omg.CORBA.portable.ObjectImpl
|
+--com.tucows.oxrs.epp.rtk.RTKBase
|
+--com.tucows.oxrs.epp.rtk.xml.EPPXMLBase
Top-level abstract class for all RTK classes that deal with XML data.
| Field Summary | |
protected static java.util.Hashtable |
auth_type_string_to_type_hash_
Hashtable to allow for conversion from String auth id type to epp_AuthInfoType. |
static java.lang.String[] |
auth_type_to_string_array_
Array to allow for conversion from epp_AuthInfoType to a String representation of the auth id type. |
protected static java.lang.String[] |
transfer_op_to_string_array_
Array to allow for conversion from epp_TransferStatusType to a String representation of the transfer status. |
protected static java.lang.String[] |
transfer_status_to_string_array_
|
protected static java.util.Hashtable |
transfer_status_to_type_hash_
Hashtable to allow for conversion from String transfer status to epp_TransferStatusType. |
protected java.lang.String |
xml_
Holder of the response XML String |
| Fields inherited from class com.tucows.oxrs.epp.rtk.RTKBase |
CRLF, DATE_FMT, DEBUG_LEVEL_ONE, DEBUG_LEVEL_THREE, DEBUG_LEVEL_TWO, DEBUG_NONE, RTK_VERSION, UTC_FMT |
| Constructor Summary | |
protected |
EPPXMLBase()
Default constructor |
protected |
EPPXMLBase(java.lang.String xml)
Constructor with XML String |
| Method Summary | |
protected org.w3c.dom.Element |
addXMLElement(org.w3c.dom.Document doc,
org.w3c.dom.Element containing_element,
java.lang.String tag_name,
java.lang.String value)
Creates an Element for the given tag name and appends it to the given containing Element. |
static java.lang.Object |
convertListToArray(java.lang.Class the_class,
java.util.List the_list)
Converts a List of any size to a Java Object array that can be cast into an array of any class. |
static java.lang.String[] |
convertListToStringArray(java.util.List the_list)
Converts a List of any size of Strings to a Java Object array. |
protected org.w3c.dom.Element |
createDocRoot(org.w3c.dom.Document doc)
Given a Document, this method create the root epp tag and populates its attributes with xmlns, xmlns:xsi, and xsi:schemaLocation values. |
protected java.lang.String |
createXMLFromDoc(org.w3c.dom.Document doc)
Given a Document with all of its children elements appended, converts this document to an XML String. |
static java.lang.Boolean |
getCheckResultFor(epp_CheckResult[] check_results,
java.lang.String check_value)
Given an array of epp_CheckResult's, finds the matching value and returns it's exists value in a Boolean object. |
protected org.w3c.dom.Element |
getDocumentElement()
Using pre-set response XML, returns the document's Element. |
protected org.w3c.dom.Element |
getElement(org.w3c.dom.NodeList node_list,
java.lang.String node_name)
Given the node list, it finds the Element for the given name. |
protected org.w3c.dom.Node |
getNode(org.w3c.dom.NodeList node_list,
java.lang.String node_name)
Given the node list, it finds the node for the given name Please see the Xerces documentation for more information regarding Nodes and Nodelists |
protected org.w3c.dom.Node |
getUnspecNode(java.lang.String unspec_string)
Gets the Node representing the unspec xml tag. |
java.lang.String |
getXML()
Accessor method for the response XML String |
static void |
initAuthInfoStringToTypeHash()
|
static void |
initHashes()
|
static void |
initTransferStatusToTypeHash()
|
protected epp_Response |
parseGenericResult(org.w3c.dom.Node response_node)
Given the response XML node, it extracts the result code and result text. |
protected org.w3c.dom.Element |
prepareAuthInfo(org.w3c.dom.Document doc,
java.lang.String tag_name,
epp_AuthInfo auth_info)
Creates an EPP |
protected org.w3c.dom.Element |
prepareCreds(org.w3c.dom.Document doc,
epp_Credentials creds)
Creates an EPP |
protected org.w3c.dom.Element |
prepareUnspecElement(org.w3c.dom.Document doc,
epp_Unspec unspec)
Method to change an epp_Unspec instance to XML elements. |
protected void |
stringListToXML(org.w3c.dom.Document doc,
org.w3c.dom.Element wrapper,
java.lang.String tag_name,
java.util.List list)
Given a list of String values, create Elements all with the same tag name and all going under the same Element wrapper. |
static java.lang.String |
transferStatusToString(epp_TransferStatusType status_type)
Convenience method to get a transfer status string from an epp_TransferStatusType object. |
| Methods inherited from class com.tucows.oxrs.epp.rtk.RTKBase |
_ids, debug, debug, getDebugLevel, getRTKProperties, setDebugLevel |
| Methods inherited from class org.omg.CORBA.portable.ObjectImpl |
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static java.lang.String[] transfer_op_to_string_array_
EPP IDL epp.idl for the definition of the epp_TransferStatusType enumprotected static java.util.Hashtable transfer_status_to_type_hash_
EPP IDL epp.idl for the definition of the epp_TransferStatusType enumprotected static java.lang.String[] transfer_status_to_string_array_
public static java.lang.String[] auth_type_to_string_array_
EPP IDL epp.idl for the definition of the epp_AuthInfoType enumprotected static java.util.Hashtable auth_type_string_to_type_hash_
EPP IDL epp.idl for the definition of the epp_AuthInfoType enumprotected java.lang.String xml_
| Constructor Detail |
protected EPPXMLBase()
protected EPPXMLBase(java.lang.String xml)
| Method Detail |
public java.lang.String getXML()
public static void initHashes()
public static void initTransferStatusToTypeHash()
public static void initAuthInfoStringToTypeHash()
protected epp_Response parseGenericResult(org.w3c.dom.Node response_node)
throws epp_XMLException
Node - EPP response nodeepp_XMLException - if the node list does not contain the result text
protected org.w3c.dom.Node getNode(org.w3c.dom.NodeList node_list,
java.lang.String node_name)
Nodelist - XML nodesString - Name of the node to find
protected org.w3c.dom.Element getElement(org.w3c.dom.NodeList node_list,
java.lang.String node_name)
Nodelist - XML nodesString - Name of the element to findgetNode(NodeList,String)
protected org.w3c.dom.Element getDocumentElement()
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException - if there is an error getting the bytes from the XMLorg.xml.sax.SAXException - if there are XML errorsjava.lang.RuntimeException - if the XML document does not support Traversal v2.0protected org.w3c.dom.Element createDocRoot(org.w3c.dom.Document doc)
Document - which implements the createElement() method
protected java.lang.String createXMLFromDoc(org.w3c.dom.Document doc)
throws java.io.IOException
Document - the complete XML Documentjava.io.IOException -
protected org.w3c.dom.Element addXMLElement(org.w3c.dom.Document doc,
org.w3c.dom.Element containing_element,
java.lang.String tag_name,
java.lang.String value)
Document - the Document instance that is creating the ElementsElement - the Element that will contain the new Element createdString - the tag name for the new ElementString - the String value to put into the tag. Can be null for an empty tag.
public static java.lang.Object convertListToArray(java.lang.Class the_class,
java.util.List the_list)
List integer_list = (List)ArrayList();
integer_list.add(new Integer(1));
integer_list.add(new Integer(2));
Integer[] string_array = (Integer[]) EPPXMLBase.convertListToArray((new Integer()).getClass(), string_list)
Class - the Class of the resulting array.List - the List of instances of the given Classpublic static java.lang.String[] convertListToStringArray(java.util.List the_list)
List string_list = (List)ArrayList();
string_list.add("Hello");
string_list.add("Goodbye");
// Note that no casting is required here.
String[] string_array = EPPXMLBase.convertListToStringArray(string_list)
List - the List of instances of Strings
protected void stringListToXML(org.w3c.dom.Document doc,
org.w3c.dom.Element wrapper,
java.lang.String tag_name,
java.util.List list)
Document - the Document instance that is creating the ElementsElement - the Element that will contain the new Elements createdString - the tag name to use for all the new ElementsList - the List of String values to put into the new Elements.
protected org.w3c.dom.Element prepareCreds(org.w3c.dom.Document doc,
epp_Credentials creds)
Document - the Document instance that is creating the Elementsepp_Credentials - the non-null credentials
protected org.w3c.dom.Element prepareAuthInfo(org.w3c.dom.Document doc,
java.lang.String tag_name,
epp_AuthInfo auth_info)
Document - the Document instance that is creating the ElementsString - the tag's nameepp_TransID - the non-null auth id
public static java.lang.Boolean getCheckResultFor(epp_CheckResult[] check_results,
java.lang.String check_value)
epp_CheckResult[] - array of check results.String - the value for which to search
protected org.w3c.dom.Node getUnspecNode(java.lang.String unspec_string)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException - if there is an error getting the bytes from the XMLorg.xml.sax.SAXException - if there are XML errorsjava.lang.RuntimeException - if the XML document does not support Traversal v2.0
protected org.w3c.dom.Element prepareUnspecElement(org.w3c.dom.Document doc,
epp_Unspec unspec)
throws epp_XMLException
public static java.lang.String transferStatusToString(epp_TransferStatusType status_type)
|
EPP RTK for Java v 0.3.10 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||