cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r731255 - /cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/response/URLResponse.java
Date Sun, 04 Jan 2009 13:24:13 GMT
Author: reinhard
Date: Sun Jan  4 05:24:13 2009
New Revision: 731255

URL: http://svn.apache.org/viewvc?rev=731255&view=rev
Log:
. add constructors without having to pass a data object map

Modified:
    cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/response/URLResponse.java

Modified: cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/response/URLResponse.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/response/URLResponse.java?rev=731255&r1=731254&r2=731255&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/response/URLResponse.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/response/URLResponse.java
Sun Jan  4 05:24:13 2009
@@ -20,6 +20,7 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -36,6 +37,16 @@
 
     private Map<String, Object> data;
 
+    public URLResponse(URL url) {
+        this.url = url;
+        this.data = Collections.emptyMap();
+    }
+
+    public URLResponse(String url) throws MalformedURLException {
+        this.url = new URL(new URL("servlet:"), url);
+        this.data = Collections.emptyMap();
+    }
+
     public URLResponse(URL url, Map<String, Object> data) {
         this.url = url;
         this.data = data;



Mime
View raw message