Java Doc for HttpTransactionQueryBase.java in  » ERP-CRM-Financial » sakai » edu » indiana » lib » twinpeaks » search » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » edu.indiana.lib.twinpeaks.search 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.indiana.lib.twinpeaks.search.QueryBase
      edu.indiana.lib.twinpeaks.search.HttpTransactionQueryBase

All known Subclasses:   edu.indiana.lib.twinpeaks.search.singlesearch.web2.Web2Query,
HttpTransactionQueryBase
abstract public class HttpTransactionQueryBase extends QueryBase implements HttpTransactionQueryInterface(Code)
Base class for HTTP search activities



Constructor Summary
public  HttpTransactionQueryBase()
    

Method Summary
public  voidclearParameters()
    
public  ElementgetBody(Document pageDocument)
    
public  booleangetFollowRedirects()
    
public  ElementgetFormElement(Document pageDocument, String formName)
    
public  StringgetParameter(String name)
    
public  StringgetParameterName(String value)
    
public  DocumentgetQueryDocument(String consumer)
    
public  StringgetQueryMethod()
    
public  StringgetQueryUrl(String consumer)
    
public  byte[]getResponseBytes()
    
public  StringgetResponseCharacterSet()
    
public  DocumentgetResponseDocument()
    
public  StringgetResponseHeader(String name)
    
public  StringgetResponseString()
    
public  StringgetSearchString()
    
public  SessionContextgetSessionContext()
    
public  StringgetSessionParameter(String consumer, String name)
    
public  ObjectgetSessionValue(String consumer, String name)
    
public  StringgetUrl()
    
public  voidinitialize(SessionContext session)
    
public  URLnewFullUrl(String baseComponent, String relativeComponent)
    
public  voidremoveQueryUrl(String consumer)
    
public  voidremoveSessionParameter(String consumer, String name)
    
public  voidsetDefaultCharacterSet(String cs)
    
public  voidsetParameter(String name, String value)
    
public  voidsetParametersFromFormInputs(Document pageDocument, String formName, List nameList)
    
public  voidsetParametersFromInputNames(Document pageDocument, List nameList)
    
public  voidsetParametersFromInputValues(Document pageDocument, List nameList)
    
public  voidsetParametersFromInputs(Document pageDocument, List nameList)
    
public  voidsetParametersFromNameList(NodeList nodeList, List nameList)
    
public  voidsetParametersFromValueList(NodeList nodeList, List nameList)
    
public  voidsetPreserveBaseUrlFile(boolean state)
    
public  voidsetQueryDocument(String consumer, Document queryForm)
    
public  voidsetQueryMethod(String method)
    
public  voidsetQueryUrl(String consumer, String queryUrl)
    
public  voidsetRedirectBehavior(int behavior)
     Establish a mechanism for handling redirects
Parameters:
  behavior - Specifies the desired behavior.
public  voidsetSearchString(String searchString)
    
public  voidsetSessionParameter(String consumer, String name, String value)
    
public  voidsetSessionValue(String consumer, String name, Object value)
    
public  voidsetUrl(String url)
    
public  voidsetUrl(URL url)
    
public  voidsetUrlFromAnchor(Element anchor)
    
public  voidsetUrlFromForm(Document pageDocument, String formName)
    
public  intsubmit()
     Submit a request (POST or GET) and read the response.


Constructor Detail
HttpTransactionQueryBase
public HttpTransactionQueryBase()(Code)
Constructor




Method Detail
clearParameters
public void clearParameters()(Code)
Clear the parameter list



getBody
public Element getBody(Document pageDocument)(Code)
Locate the HTML BODY element in the page document
Parameters:
  pageDocument - An HTML page (as a DOM) The body Element



getFollowRedirects
public boolean getFollowRedirects()(Code)
Should URLConnection follow redirects? true if URLConnection should handle redirects



getFormElement
public Element getFormElement(Document pageDocument, String formName)(Code)
Find a named FORM element
Parameters:
  pageDocument - The search engine query page (as a DOM Document)
Parameters:
  formName - The name of the FORM to lookup(eg FORM name="formName")



getParameter
public String getParameter(String name)(Code)
Get a named parameter
Parameters:
  name - Parameter name Parameter value



getParameterName
public String getParameterName(String value)(Code)
Get the parameter name associated with the 1st occurance of this value
Parameters:
  value - Parameter value Parameter name



getQueryDocument
public Document getQueryDocument(String consumer)(Code)
Fetch the final query form as a DOM document
Parameters:
  consumer - A unique name for the "user" of this object Query form (as a DOM document)



getQueryMethod
public String getQueryMethod()(Code)
Fetch the current HTTP query method The method (as text)



getQueryUrl
public String getQueryUrl(String consumer)(Code)
Fetch the URL for the query
Parameters:
  consumer - A unique name for the "user" of this object Address of the final query page



getResponseBytes
public byte[] getResponseBytes()(Code)
Get the server response text The response (as a byte array)



getResponseCharacterSet
public String getResponseCharacterSet()(Code)
Fetch the response character set Character set designation (as a String)



getResponseDocument
public Document getResponseDocument() throws SearchException(Code)
Parse the server response (override as required) Response Document



getResponseHeader
public String getResponseHeader(String name)(Code)
Fetch a named HTTP response parameter
Parameters:
  name - Parameter name Parameter value



getResponseString
public String getResponseString()(Code)
Get the server response text The response (as a String)



getSearchString
public String getSearchString()(Code)
Fetch the current search text The search string



getSessionContext
public SessionContext getSessionContext()(Code)
Get the SessionContext object for this user The current SessionContext



getSessionParameter
public String getSessionParameter(String consumer, String name)(Code)
Fetch the requested general purpose parameter
Parameters:
  consumer - A unique name for the "user" of this object
Parameters:
  name - Parameter name Parameter value (null if none)



getSessionValue
public Object getSessionValue(String consumer, String name)(Code)
Fetch the requested general purpose parameter
Parameters:
  consumer - A unique name for the "user" of this object
Parameters:
  name - Parameter name Parameter value (null if none)



getUrl
public String getUrl()(Code)
Fetch the current search URL The URL (as a String)



initialize
public void initialize(SessionContext session)(Code)
One time initialization
Parameters:
  session - SessionContext object



newFullUrl
public URL newFullUrl(String baseComponent, String relativeComponent)(Code)
Construct a new URL from base and relative components
Parameters:
  baseComponent - Base URL - the relative URL is added to this
Parameters:
  relativeComponent - A partial (or full) URL that represents our target A full URL composed of the relative URL combined with "missing"portions taken from the base



removeQueryUrl
public void removeQueryUrl(String consumer)(Code)
Delete a stored query URL
Parameters:
  consumer - A unique name for the "user" of this object



removeSessionParameter
public void removeSessionParameter(String consumer, String name)(Code)
Delete the requested general purpose parameter
Parameters:
  consumer - A unique name for the "user" of this object
Parameters:
  name - Parameter name



setDefaultCharacterSet
public void setDefaultCharacterSet(String cs)(Code)
Set the default character set for this transaction
Parameters:
  cs - Character set (UTF-8, ISO-8859-1, etc)



setParameter
public void setParameter(String name, String value)(Code)
Set up a name=value pair
Parameters:
  name - Parameter name
Parameters:
  value - Parameter value



setParametersFromFormInputs
public void setParametersFromFormInputs(Document pageDocument, String formName, List nameList) throws SearchException(Code)
Produce a target URL for this query by combining the form "action" value with the base URL of the query page
Parameters:
  pageDocument - The search engine query page (as a DOM Document)
Parameters:
  formName - The name of the FORM to lookup(eg FORM name="formName")
Parameters:
  nameList - A list of the parameters we're looking for



setParametersFromInputNames
public void setParametersFromInputNames(Document pageDocument, List nameList)(Code)
Set query parameters based on page-wide INPUTs
Parameters:
  pageDocument - The search engine query page (as a DOM Document)
Parameters:
  nameList - A list of the parameters we're looking for



setParametersFromInputValues
public void setParametersFromInputValues(Document pageDocument, List nameList)(Code)
Set query parameters based on page-wide INPUTs
Parameters:
  pageDocument - The search engine query page (as a DOM Document)
Parameters:
  nameList - A list of the parameters we're looking for



setParametersFromInputs
public void setParametersFromInputs(Document pageDocument, List nameList)(Code)
Set query parameters based on page-wide INPUTs
Parameters:
  pageDocument - The search engine query page (as a DOM Document)
Parameters:
  nameList - A list of the parameters we're looking forHttpTransactionQueryBase.setParametersFromInputNames()



setParametersFromNameList
public void setParametersFromNameList(NodeList nodeList, List nameList)(Code)
Set query parameters based on element names (save name=value pairs)
Parameters:
  nodeList - List of Elements to evaluate
Parameters:
  nameList - A list of the parameters we're looking for



setParametersFromValueList
public void setParametersFromValueList(NodeList nodeList, List nameList)(Code)
Set query parameters based on element values (save name=value pairs)
Parameters:
  nodeList - List of Elements to evaluate
Parameters:
  nameList - A list of the parameters we're looking for



setPreserveBaseUrlFile
public void setPreserveBaseUrlFile(boolean state)(Code)
Set the "file preservation state" for getBaseUrlSpecification()
Parameters:
  state - true to preserve URL file portion



setQueryDocument
public void setQueryDocument(String consumer, Document queryForm)(Code)
Save the final query form as a DOM document
Parameters:
  consumer - A unique name for the "user" of this object
Parameters:
  queryForm - Query page as a DOM document



setQueryMethod
public void setQueryMethod(String method)(Code)
Set the HTTP query method (post or get)
Parameters:
  method - METHOD_POST or METHOD_GET



setQueryUrl
public void setQueryUrl(String consumer, String queryUrl)(Code)
Save the URL for the query page
Parameters:
  consumer - A unique name for the "user" of this object
Parameters:
  queryUrl - Address of the final query page



setRedirectBehavior
public void setRedirectBehavior(int behavior) throws SearchException(Code)
Establish a mechanism for handling redirects
Parameters:
  behavior - Specifies the desired behavior. Use one of:
  • REDIRECT_AUTOMATIC - URLConnection handlesall redirects
  • REDIRECT_MANAGED - The submit() codehandles any redirects
  • REDIRECT_MANAGED_SINGLESTEP - The caller will handle each redirect



setSearchString
public void setSearchString(String searchString)(Code)
Specify the search text
Parameters:
  searchString - Text to look for



setSessionParameter
public void setSessionParameter(String consumer, String name, String value)(Code)
Save a general purpose parameter
Parameters:
  consumer - A unique name for the "user" of this object
Parameters:
  name - Parameter name
Parameters:
  value - Parameter value



setSessionValue
public void setSessionValue(String consumer, String name, Object value)(Code)
Save a general purpose parameter
Parameters:
  consumer - A unique name for the "user" of this object
Parameters:
  name - Parameter name
Parameters:
  value - Parameter value



setUrl
public void setUrl(String url)(Code)
Set search URL
Parameters:
  url - URL string



setUrl
public void setUrl(URL url)(Code)
Set search URL
Parameters:
  url - URL object



setUrlFromAnchor
public void setUrlFromAnchor(Element anchor) throws SearchException(Code)
Produce a target URL for this query by combining an anchor "href" value with the base URL of the query page
Parameters:
  anchor - Anchor element



setUrlFromForm
public void setUrlFromForm(Document pageDocument, String formName) throws SearchException(Code)
Produce a target URL for this query by combining the form "action" value with the base URL of the query page
Parameters:
  pageDocument - The search engine query page (as a DOM Document)
Parameters:
  formName - The name of the FORM to lookup(eg FORM name="formName")



submit
public int submit() throws SearchException(Code)
Submit a request (POST or GET) and read the response. Various aspects of the response can be inspected using the "getXXX()" methods. Submission status code (200 = success)



Methods inherited from edu.indiana.lib.twinpeaks.search.QueryBase
public Integer getIntegerRequestParameter(String name)(Code)(Java Doc)
public String getRequestParameter(String name)(Code)(Java Doc)
public Map getRequestParameterMap()(Code)(Java Doc)
abstract public String getSearchString()(Code)(Java Doc)
abstract public String getUrl()(Code)(Java Doc)
public void parseRequest(Map parameterMap)(Code)(Java Doc)
protected void populateRequestParameters(Map parameterMap)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.