Java Doc for HttpRequestManager.java in  » Content-Management-System » harmonise » org » openharmonise » rm » view » servlet » utils » 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 » Content Management System » harmonise » org.openharmonise.rm.view.servlet.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openharmonise.rm.view.servlet.utils.HttpRequestManager

HttpRequestManager
public class HttpRequestManager (Code)
This class provides a single interface to a HttpServletRequest no matter whether the underlying request is a multipart request or not.
author:
   Michael Bell
version:
   $Revision: 1.1 $


Field Summary
final public static  StringHEADER_CONTENT_TYPE
     String constant for the HTTP 'Content-Type' header parameter.
final public static  StringHEADER_REFERER
     String constant for the HTTP 'Referer' header parameter.
final public static  StringHEADER_USER_AGENT
     String constant for the HTTP 'User-Agent' header parameter.
final static  StringMAXFILESIZE_PNAME
     String constant for the configuration parameter that sets the maximum file size for upload.
final static  StringTEMPDIR_PNAME
     String constant for the configuration parameter that sets the directory which uploaded files are uploaded to.
final protected static  StringTYPE_TEXT
     String constant for the first 4 characters of a text based.
 intm_MAX_FILESIZE
     The maximum file size this request will accept.
 Stringm_TEMP_FILE_DIR
     The path of directory which holds uploaded files.

Constructor Summary
public  HttpRequestManager(HttpServletRequest request, int max_filesize, String tempFolder)
     Constructs a HttpRequestManager which can act as an interface to the given HttpServletRequest.

Method Summary
public  booleanMoveUploadedFile(File new_file)
     Moves the uploaded file attached to the request to the specified file location, returning true if successful.
public  booleancontainsXMLFeed()
     Returns true if request contains an XML document.
public  StringgetContentAsString(boolean delete_tmp_file)
     Returns the content of a muli-part content request as a String.
public  EnumerationgetFileNames()
     Returns the names of files which were included in the request.
public  MapgetHeaders()
     Returns a Map of header parameter names to values included in the request.
public  StringgetParameter(String name)
     Returns the query string value for the specified parameter name.
public  StringgetParameterDescription()
     Returns a String representation of the parameters and their values of the request.
public  EnumerationgetParameterNames()
     Returns an Enumeration of the query string parameter names.
public  String[]getParameterValues(String name)
     Returns the query string values for the specified parameter name.
public  StringgetRemoteAddress()
     Returns the remote address making this request.
public  StringgetStringFromReqReader()
     Retrieves the body of the request as character data using a BufferedReader and returns as a String.
public  FilegetUploadedFile()
     Returns the uploaded file.
public  StringgetUploadedFileName()
     Returns the name of the uploaded file.
public  booleanhasUploadedFiles()
     Returns true if the request was of a multi-part content type.
public  booleanisContentBinary()
     Returns true if the content attached to the request was binary.

Field Detail
HEADER_CONTENT_TYPE
final public static String HEADER_CONTENT_TYPE(Code)
String constant for the HTTP 'Content-Type' header parameter.



HEADER_REFERER
final public static String HEADER_REFERER(Code)
String constant for the HTTP 'Referer' header parameter.



HEADER_USER_AGENT
final public static String HEADER_USER_AGENT(Code)
String constant for the HTTP 'User-Agent' header parameter.



MAXFILESIZE_PNAME
final static String MAXFILESIZE_PNAME(Code)
String constant for the configuration parameter that sets the maximum file size for upload.



TEMPDIR_PNAME
final static String TEMPDIR_PNAME(Code)
String constant for the configuration parameter that sets the directory which uploaded files are uploaded to.



TYPE_TEXT
final protected static String TYPE_TEXT(Code)
String constant for the first 4 characters of a text based. mime-type.



m_MAX_FILESIZE
int m_MAX_FILESIZE(Code)
The maximum file size this request will accept.



m_TEMP_FILE_DIR
String m_TEMP_FILE_DIR(Code)
The path of directory which holds uploaded files.




Constructor Detail
HttpRequestManager
public HttpRequestManager(HttpServletRequest request, int max_filesize, String tempFolder) throws RequestManagerException(Code)
Constructs a HttpRequestManager which can act as an interface to the given HttpServletRequest.
Parameters:
  request - the servlet request
throws:
  RequestManagerException - if an error occurs handling the request




Method Detail
MoveUploadedFile
public boolean MoveUploadedFile(File new_file) throws IllegalArgumentException(Code)
Moves the uploaded file attached to the request to the specified file location, returning true if successful.
Parameters:
  new_file - the new location for uploaded file true if the operation was successful
throws:
  IllegalArgumentException - if the new file location is invalid



containsXMLFeed
public boolean containsXMLFeed()(Code)
Returns true if request contains an XML document. true if request contains an XML document



getContentAsString
public String getContentAsString(boolean delete_tmp_file) throws IOException(Code)
Returns the content of a muli-part content request as a String.
Parameters:
  delete_tmp_file -
throws:
  IOException -



getFileNames
public Enumeration getFileNames()(Code)
Returns the names of files which were included in the request. the names of files which were included in the request



getHeaders
public Map getHeaders()(Code)
Returns a Map of header parameter names to values included in the request. a Map of header parameter names to values



getParameter
public String getParameter(String name)(Code)
Returns the query string value for the specified parameter name.
Parameters:
  name - the name of the query string parameter whose value is to be returned the query string value for the specified parameter name



getParameterDescription
public String getParameterDescription()(Code)
Returns a String representation of the parameters and their values of the request.



getParameterNames
public Enumeration getParameterNames()(Code)
Returns an Enumeration of the query string parameter names. an Enumeration of the query string parameter names



getParameterValues
public String[] getParameterValues(String name)(Code)
Returns the query string values for the specified parameter name.
Parameters:
  name - the name of the query string parameter whose values are to be returned the query string values for the specified parameter name



getRemoteAddress
public String getRemoteAddress()(Code)
Returns the remote address making this request. the remote address making this request



getStringFromReqReader
public String getStringFromReqReader() throws IOException(Code)
Retrieves the body of the request as character data using a BufferedReader and returns as a String.
throws:
  IOException -



getUploadedFile
public File getUploadedFile()(Code)
Returns the uploaded file.



getUploadedFileName
public String getUploadedFileName()(Code)
Returns the name of the uploaded file.



hasUploadedFiles
public boolean hasUploadedFiles()(Code)
Returns true if the request was of a multi-part content type.



isContentBinary
public boolean isContentBinary()(Code)
Returns true if the content attached to the request was binary. true if the content attached to the request was binary



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.