|
EPP RTK for Java v 0.5.0 |
||||||||
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.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 |
getAvailResultFor(epp_CheckResult[] check_results,
java.lang.String check_value)
Given an array of epp_CheckResult's, finds the matching value and returns it's avail value in a Boolean object. |
static java.lang.Boolean |
getCheckResultFor(epp_CheckResult[] check_results,
java.lang.String check_value)
Deprecated. Please use getAvailResultFor(epp_CheckResult[] check_results,String check_value) |
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 |
getExtensionNode(java.lang.String extension_string)
Gets the Node representing the extension xml tag. |
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 |
java.lang.String |
getXML()
Accessor method for the response XML String |
static void |
initAuthInfoStringToTypeHash()
|
static void |
initHashes()
|
static void |
initTransferStatusToTypeHash()
|
protected epp_CheckResult[] |
parseGenericCheckResults(org.w3c.dom.Node chkdata_node)
Given the chkData XML node, it extracts the check value, object availability and reason text. |
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 void |
prepareExtensionElement(org.w3c.dom.Document doc,
org.w3c.dom.Element command,
epp_Extension extension)
Method to change an epp_Extension 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 epp_TransferStatusType |
transferStatusFromString(java.lang.String s)
|
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, 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 enum
protected static java.util.Hashtable transfer_status_to_type_hash_
EPP IDL epp.idl for the definition of the epp_TransferStatusType enum
public static java.lang.String[] auth_type_to_string_array_
EPP IDL epp.idl for the definition of the epp_AuthInfoType enum
protected static java.util.Hashtable auth_type_string_to_type_hash_
EPP IDL epp.idl for the definition of the epp_AuthInfoType enum
protected 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 textprotected org.w3c.dom.Node getNode(org.w3c.dom.NodeList node_list, java.lang.String node_name)
Nodelist
- XML nodesString
- Name of the node to findprotected 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() methodprotected 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 Stringsprotected 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 credentialsprotected 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_AuthInfo
- element that contains authorization informationprotected epp_CheckResult[] parseGenericCheckResults(org.w3c.dom.Node chkdata_node) throws epp_XMLException
Node
- EPP chkData nodeepp_XMLException
- if the node list does not contain the datapublic 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 searchpublic static java.lang.Boolean getAvailResultFor(epp_CheckResult[] check_results, java.lang.String check_value)
epp_CheckResult[]
- array of check results.String
- the value for which to searchprotected org.w3c.dom.Node getExtensionNode(java.lang.String extension_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.0protected void prepareExtensionElement(org.w3c.dom.Document doc, org.w3c.dom.Element command, epp_Extension extension) throws epp_XMLException
public static java.lang.String transferStatusToString(epp_TransferStatusType status_type)
public static epp_TransferStatusType transferStatusFromString(java.lang.String s)
|
EPP RTK for Java v 0.5.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |