|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.ucalgary.services.util.PBERecorder
public class PBERecorder
This class controls the interaction between the web browser and Seahawk via the pasting actions. The tracking of Moby data in a demonstration usage of a web service or html form is used to generalize the invocation details into a Moby wrapper for the legacy service.
Field Summary | |
---|---|
static String |
AUTOCOMPLETE_PARAM
|
static String |
CONTEXT_XPTR_PARAM
|
static String |
CUSTOM_INPUT_PART_OPTION
|
static String |
CUSTOM_INPUT_PART_VALUES_SUFFIX
|
static String |
CUSTOM_VALUE_XPATH_OPTION
|
static String |
DATE_INPUT_PART_OPTION
|
static String |
FLOAT_INPUT_PART_OPTION
|
static String |
INT_INPUT_PART_OPTION
|
static String |
LIST_CHOICE_PARAM
|
static String |
OUTPUT_RULE_URI_PARAM
|
static String |
RAW_XPATH_PARAM
|
static String |
RESOURCE_FILE_PARAM
|
static String |
RESOURCE_PREFIX
|
static String |
RETURN_XPATH_PARAM
|
static String |
SCALAR_INPUT_PART_MAX_SUFFIX
|
static String |
SCALAR_INPUT_PART_MIN_SUFFIX
|
static String |
VALUE_XPATH_PARAM
|
static String |
XPATH_DEFAULT_NS_PREFIX
|
Fields inherited from interface ca.ucalgary.services.util.DataRecorder |
---|
PASSTHROUGH_ACTION |
Constructor Summary | |
---|---|
PBERecorder()
|
Method Summary | |
---|---|
String |
autocomplete(javax.servlet.http.HttpServletRequest request,
String seed)
Called via AJAX when the user is filling something on the form that's supposed to be the Moby ontology The returned value is the list of possible ontology matches, with relevant description excerpts. |
void |
dataCopied(MobyDataInstance source,
String copiedValue,
String transformRuleURI)
Called by source of data going into the browser, i.e. |
void |
dataPasted(javax.servlet.http.HttpServletRequest request)
|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called when data in a field is being updated via a paste event. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called when data a form is being submitted, or when submitting the PBE form |
String |
getBody(javax.servlet.http.HttpServletRequest request)
Gives the data recorder an opportunity to insert extra HTML elements into the body (at the start) of the WrappingServlet generates for the user-facing CGI form. |
Element[] |
getBodyAsDOM(javax.servlet.http.HttpServletRequest request,
Document owner)
|
String |
getBodyAttrs(javax.servlet.http.HttpServletRequest request)
Gives the data recorder an opportunity to insert extra HTML element attributes into the body element the WrappingServlet generates for the Web Service's CGI form. |
Attr[] |
getBodyAttrsAsDOM(javax.servlet.http.HttpServletRequest request,
Document owner)
|
int |
getChoice(String statusMsg,
String[] choices)
Show the user a set of choices in the browser window, and waits until they pick one before returning. |
String |
getHead(javax.servlet.http.HttpServletRequest request)
Gives the data recorder an opportunity to insert extra HTML into the head element of the HTML the WrappingServlet generates for the Web Service's CGI form. |
Element[] |
getHeadAsDOM(javax.servlet.http.HttpServletRequest request,
Document owner)
Gives the data recorder an opportunity to insert extra HTML into the head element of the HTML the WrappingServlet generates for the Web Service's CGI form. |
Attr |
getOnEventAsDOM(Document owner)
|
String |
getOnEventText()
Gives the data recorder an opportunity to insert a javascript event handler into every form input element the WrappingServlet generates for the Web Service's CGI form. |
Attr |
getOnSubmitAsDOM(Document owner)
|
String |
getOnSubmitText()
Gives the data recorder an opportunity to insert a javascript event handler into the form submission tags the WrappingServlet generates for the Web Service's CGI form. |
static String |
getProxyBaseUrl()
|
void |
getRawXml(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
getResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
getStatus(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
interceptRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
byte[] |
markupResponse(byte[] responseBody,
String contentType,
String charSet,
javax.servlet.http.HttpServletRequest request)
Gives the data recorder an opportunity to record or modify the CGI response before WrappingServlet returns it to the HTTP client. |
String |
markupResponse(Source resultSource,
javax.servlet.http.HttpServletRequest request)
Manipulates the Web Service response data so that it includes a bunch of links that can be used to create Moby services. |
void |
setGUIMap(Map<String,MobyContentGUI> map)
|
void |
setInputParams(javax.servlet.http.HttpServletRequest submissionRequest,
Map<String,byte[]> httpParams,
List<String> hiddenParams)
This method is to be called just before submission of data to the CGI, so that the PBE system can record the input for data type analysis later in the wrapping process. |
void |
setInputSource(javax.servlet.http.HttpServletRequest request,
SourceMap sourceMap)
This method is to be called just before submission of data to the Web Service, so that the PBE system can record the input for data type analysis later in the wrapping process. |
void |
setParameter(javax.servlet.http.HttpSession session,
String paramName,
String paramValue)
Allows a WrappingServlet to set the equivalent of HTTP request parameters (which are normally immutable). |
void |
setStatus(String statusMsg)
|
void |
setTransformer(Transformer t)
Specify a XML transformation to be applied to the service results. |
boolean |
shouldIntercept(javax.servlet.http.HttpServletRequest request)
Lets the WrappingServlet know if the HTTP GET request should be handles by interceptRequest or not. |
void |
startRecording(javax.servlet.http.HttpServletRequest request)
Tells the data recorder that a new Web Service proxying has been requested. |
String |
writeWrapperForm(javax.servlet.http.HttpServletRequest request)
Uses the retained copy of the WSDL service response, matching it up with the xPath given by the user, to create an interface confirming the definition of a new Moby service. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RESOURCE_PREFIX
public static final String RESOURCE_FILE_PARAM
public static final String AUTOCOMPLETE_PARAM
public static final String LIST_CHOICE_PARAM
public static final String RETURN_XPATH_PARAM
public static final String VALUE_XPATH_PARAM
public static final String CONTEXT_XPTR_PARAM
public static final String OUTPUT_RULE_URI_PARAM
public static final String RAW_XPATH_PARAM
public static final String XPATH_DEFAULT_NS_PREFIX
public static final String CUSTOM_VALUE_XPATH_OPTION
public static final String CUSTOM_INPUT_PART_OPTION
public static final String INT_INPUT_PART_OPTION
public static final String FLOAT_INPUT_PART_OPTION
public static final String DATE_INPUT_PART_OPTION
public static final String CUSTOM_INPUT_PART_VALUES_SUFFIX
public static final String SCALAR_INPUT_PART_MIN_SUFFIX
public static final String SCALAR_INPUT_PART_MAX_SUFFIX
Constructor Detail |
---|
public PBERecorder()
Method Detail |
---|
public void setGUIMap(Map<String,MobyContentGUI> map)
public void startRecording(javax.servlet.http.HttpServletRequest request)
DataRecorder
startRecording
in interface DataRecorder
request
- the GET request that specifies the WSDL to be proxiedpublic void setTransformer(Transformer t)
DataRecorder
setTransformer
in interface DataRecorder
public boolean shouldIntercept(javax.servlet.http.HttpServletRequest request)
DataRecorder
shouldIntercept
in interface DataRecorder
public void interceptRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
interceptRequest
in interface DataRecorder
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
doGet
in interface DataRecorder
public void getStatus(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public int getChoice(String statusMsg, String[] choices)
public void setStatus(String statusMsg)
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public String getOnEventText()
DataRecorder
getOnEventText
in interface DataRecorder
public Attr getOnEventAsDOM(Document owner)
getOnEventAsDOM
in interface DataRecorder
public String getOnSubmitText()
DataRecorder
getOnSubmitText
in interface DataRecorder
public Attr getOnSubmitAsDOM(Document owner)
getOnSubmitAsDOM
in interface DataRecorder
public String getHead(javax.servlet.http.HttpServletRequest request)
DataRecorder
getHead
in interface DataRecorder
public Element[] getHeadAsDOM(javax.servlet.http.HttpServletRequest request, Document owner)
DataRecorder
getHeadAsDOM
in interface DataRecorder
owner
- the Document that should be used to create the DOM elements returned
public String getBodyAttrs(javax.servlet.http.HttpServletRequest request)
DataRecorder
getBodyAttrs
in interface DataRecorder
public Attr[] getBodyAttrsAsDOM(javax.servlet.http.HttpServletRequest request, Document owner)
getBodyAttrsAsDOM
in interface DataRecorder
public String getBody(javax.servlet.http.HttpServletRequest request)
DataRecorder
getBody
in interface DataRecorder
public Element[] getBodyAsDOM(javax.servlet.http.HttpServletRequest request, Document owner)
getBodyAsDOM
in interface DataRecorder
public byte[] markupResponse(byte[] responseBody, String contentType, String charSet, javax.servlet.http.HttpServletRequest request) throws Exception
DataRecorder
markupResponse
in interface DataRecorder
Exception
public String markupResponse(Source resultSource, javax.servlet.http.HttpServletRequest request) throws Exception
markupResponse
in interface DataRecorder
Exception
public String autocomplete(javax.servlet.http.HttpServletRequest request, String seed)
seed
- a string of the form datatype:xxx or namespace:xxx or servicetype:xxx or just xxx to search allpublic void getRawXml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public void getResource(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public String writeWrapperForm(javax.servlet.http.HttpServletRequest request)
writeWrapperForm
in interface DataRecorder
public static String getProxyBaseUrl()
public void setInputSource(javax.servlet.http.HttpServletRequest request, SourceMap sourceMap)
setInputSource
in interface DataRecorder
public void setInputParams(javax.servlet.http.HttpServletRequest submissionRequest, Map<String,byte[]> httpParams, List<String> hiddenParams)
setInputParams
in interface DataRecorder
public void setParameter(javax.servlet.http.HttpSession session, String paramName, String paramValue)
DataRecorder
setParameter
in interface DataRecorder
public void dataCopied(MobyDataInstance source, String copiedValue, String transformRuleURI)
public void dataPasted(javax.servlet.http.HttpServletRequest request)
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |