dblevins 2005/03/09 01:17:16
Modified: modules/core/src/java/org/openejb/server/httpd
HttpRequest.java HttpRequestImpl.java
Log:
First run of axis integration. more to sew up yet.
Revision Changes Path
1.2 +11 -13
openejb/modules/core/src/java/org/openejb/server/httpd/HttpRequest.java
Index: HttpRequest.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/server/httpd/HttpRequest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HttpRequest.java 17 Dec 2004 05:10:23 -0000 1.1
+++ HttpRequest.java 9 Mar 2005 06:17:16 -0000 1.2
@@ -46,6 +46,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.util.Map;
import javax.servlet.ServletInputStream;
@@ -142,26 +143,23 @@
*/
public String getFormParameter(String name);
- /** Gets all the form parameters in the form of a two-dimentional array
- * The second dimention has two indexes which contain the key and value
- * for example:
- * <code>
- * for(int i=0; i<formParams.length; i++) {
- * key = formParams[i][0];
- * value = formParams[i][1];
- * }
- * </code>
- *
- * All values are strings
+ /**
+ * Gets all the form parameters
* @return All the form parameters
*/
- public String[][] getFormParameters();
+ public Map getFormParameters();
/** Gets a URL (or query) parameter based on the name passed in.
* @param name The name of the URL (or query) parameter
* @return The value of the URL (or query) parameter
*/
public String getQueryParameter(String name);
+
+ /**
+ * Gets all the query parameters
+ * @return All the query parameters
+ */
+ public Map getQueryParameters();
/** Gets an integer value of the request method. These values are:
*
1.5 +7 -28
openejb/modules/core/src/java/org/openejb/server/httpd/HttpRequestImpl.java
Index: HttpRequestImpl.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/server/httpd/HttpRequestImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HttpRequestImpl.java 3 Feb 2005 00:07:58 -0000 1.4
+++ HttpRequestImpl.java 9 Mar 2005 06:17:16 -0000 1.5
@@ -50,6 +50,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.StringTokenizer;
+import java.util.Map;
/**
* A class to take care of HTTP Requests. It parses headers, content, form
and url
@@ -115,34 +116,12 @@
return (String) formParams.get(name);
}
- /**
- * Gets all the form parameters in the form of a two-dimentional array
- * The second dimention has two indexes which contain the key and value
- * for example:
- * <code>
- * for(int i=0; i<formParams.length; i++) {
- * key = formParams[i][0];
- * value = formParams[i][1];
- * }
- * </code>
- * <p/>
- * All values are strings
- *
- * @return All the form parameters
- */
- public String[][] getFormParameters() {
- Iterator keys = formParams.keySet().iterator();
- String[][] returnValue = new String[formParams.size()][2];
-
- String temp;
- int i = 0;
- while (keys.hasNext()) {
- temp = (String) keys.next();
- returnValue[i][0] = temp;
- returnValue[i++][1] = (String) formParams.get(temp);
- }
+ public Map getFormParameters() {
+ return (Map)formParams.clone();
+ }
- return returnValue;
+ public Map getQueryParameters() {
+ return (Map)queryParams.clone();
}
/**