|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.svc.clicktoconnect.C2CWebServiceParser
public class C2CWebServiceParser
This class deals with making a call to the eStara webService API and parsing the XML into a bean which is returned.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected C2CTools |
mC2CTools
|
protected java.lang.String |
mWebServiceResponseClassName
|
Constructor Summary | |
---|---|
C2CWebServiceParser()
Constructs an instance of C2CWebServiceParser |
Method Summary | |
---|---|
java.lang.String |
createWebServiceURL(java.lang.String pWebServiceURL,
java.lang.String pUsername,
java.lang.String pPassword,
java.lang.String pUserTelephoneNumber)
Returns the fully qualified URL to make the call to the eStara web service. |
C2CTools |
getC2CTools()
Returns a reference to the click to connect tools component. |
java.lang.String |
getC2CWebServiceResponseClassName()
Returns the property webServiceResponseClassName |
static org.w3c.dom.Document |
getDocument(javax.xml.parsers.DocumentBuilder documentBuilder,
java.lang.String urlString)
Returns an XML document from the given URL. |
static java.lang.String |
getElementValue(org.w3c.dom.Node elem)
Returns an element value |
java.util.Map<java.lang.String,java.lang.String> |
getTagAttributeNameToPropertyNameMap()
|
java.util.Map<java.lang.String,java.lang.String> |
getTagNameToPropertyNameMap()
Returns the tagNameToPropertyNameMap |
C2CWebServiceResponse |
parse(java.lang.String pWebServiceURL,
java.lang.String pUsername,
java.lang.String pPassword,
java.lang.String pUserTelephoneNumber)
Parses an exposed eStara web service API into a C2CWebServiceResponse bean. |
void |
setC2CTools(C2CTools pTools)
Sets the component C2CTools. |
void |
setC2CWebServiceResponseClassName(java.lang.String pWebServiceResponseClassName)
Sets the property WebServiceResponseClassName. |
void |
setTagAttributeNameToPropertyNameMap(java.util.Map<java.lang.String,java.lang.String> pTagNameToPropertyNameMap)
Sets the tag attribute to property name map. |
void |
setTagNameToPropertyNameMap(java.util.Map<java.lang.String,java.lang.String> pTagNameToPropertyNameMap)
Sets the Tag name to property name map |
C2CWebServiceResponse |
writeXMLToBean(org.w3c.dom.Node node,
C2CWebServiceResponse webServiceResponse)
Writes node and all child nodes into the C2CWebServiceResponse bean |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected C2CTools mC2CTools
protected java.lang.String mWebServiceResponseClassName
Constructor Detail |
---|
public C2CWebServiceParser()
Method Detail |
---|
public C2CTools getC2CTools()
public void setC2CTools(C2CTools pTools)
public void setC2CWebServiceResponseClassName(java.lang.String pWebServiceResponseClassName)
public java.lang.String getC2CWebServiceResponseClassName()
public java.util.Map<java.lang.String,java.lang.String> getTagNameToPropertyNameMap()
public void setTagNameToPropertyNameMap(java.util.Map<java.lang.String,java.lang.String> pTagNameToPropertyNameMap)
pTagNameToPropertyNameMap
- The new Mapping of Tag Attribute Names to Property Namespublic java.util.Map<java.lang.String,java.lang.String> getTagAttributeNameToPropertyNameMap()
public void setTagAttributeNameToPropertyNameMap(java.util.Map<java.lang.String,java.lang.String> pTagNameToPropertyNameMap)
pTagNameToPropertyNameMap
- The new Mapping of Tag Attribute Names to Property Namespublic C2CWebServiceResponse parse(java.lang.String pWebServiceURL, java.lang.String pUsername, java.lang.String pPassword, java.lang.String pUserTelephoneNumber) throws C2CException
pWebServiceURL
- the URL where the webService XML is containedpUsername
- the account username required to access this resourcepPassword
- the account password required to access this resourcepUserTelephoneNumber
- the telephone number for which the information is to be retrieved
for
C2CException
public java.lang.String createWebServiceURL(java.lang.String pWebServiceURL, java.lang.String pUsername, java.lang.String pPassword, java.lang.String pUserTelephoneNumber)
pWebServiceURL
- The URL to the exposed eStara web service APIpUsername
- The username of the eStara Webcare accountpPassword
- The password for the eStara Webcare accountpUserTelephoneNumber
- The caller ID of the customer making the telephone call.
public static org.w3c.dom.Document getDocument(javax.xml.parsers.DocumentBuilder documentBuilder, java.lang.String urlString)
documentBuilder
- Used to obtain a Document from an XML resourceurlString
- The URL including the username, password and telephone number
required to perform the lookup to the exposed eStara web service
API
public static final java.lang.String getElementValue(org.w3c.dom.Node elem)
elem
- element (XML tag Value)
public C2CWebServiceResponse writeXMLToBean(org.w3c.dom.Node node, C2CWebServiceResponse webServiceResponse)
node
- XML node from from XML tree from which the output should start
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |