2006/unicorn/src/org/w3c/unicorn/response Response.java,1.7,1.8

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response
In directory hutz:/tmp/cvs-serv8710/src/org/w3c/unicorn/response

Modified Files:
	Response.java 
Log Message:
moved the filtering of the uri into the Response class

Index: Response.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/Response.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Response.java	18 Sep 2009 17:15:30 -0000	1.7
+++ Response.java	21 Sep 2009 09:38:22 -0000	1.8
@@ -7,6 +7,8 @@
 
 import javax.xml.datatype.XMLGregorianCalendar;
 
+import org.w3c.unicorn.Framework;
+
 public class Response {
 	protected String uri;
 	
@@ -265,6 +267,19 @@
 	public String getRequestUri() {
 		return requestUri;
 	}
+	
+	public String getFilteredRequestUri(String observerId) {
+		if (requestUri != null) {
+			String outputParamName = Framework.mapOfObserver.get(observerId).getParamOutputName();
+			return requestUri.replaceAll("&?" + outputParamName + "=[^&]*", "");
+		} else {
+			return null;
+		}
+	}
+	
+	public String getBaseURI(String observerId) {
+		return Framework.mapOfObserver.get(observerId).getListOfCallMethod().get(0).getURL().toString();
+	}
 
 	public void setRequestUri(String requestUri) {
 		this.requestUri = requestUri;

Received on Monday, 21 September 2009 09:38:33 UTC