2006/unicorn/org/w3c/unicorn/tests UnicornClient.java,1.11,1.12 UnicornClientDirectInputTest.java,1.3,1.4 FirstServlet.java,1.14,1.15

Update of /sources/public/2006/unicorn/org/w3c/unicorn/tests
In directory hutz:/tmp/cvs-serv28313/org/w3c/unicorn/tests

Modified Files:
	UnicornClient.java UnicornClientDirectInputTest.java 
	FirstServlet.java 
Log Message:
Modifying UNICORN_PARAMETER_PREFIX now works

Index: FirstServlet.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/FirstServlet.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- FirstServlet.java	22 Jul 2009 14:54:21 -0000	1.14
+++ FirstServlet.java	28 Jul 2009 10:56:56 -0000	1.15
@@ -113,8 +113,8 @@
 		// ucn_lang is a parameter which is define in xx_index.html.vm.
 		// It is an hidden parameter of a form.
 		String templateLang = null;
-		if (aHttpServletRequest.getParameterValues("ucn_lang") != null){
-			templateLang = aHttpServletRequest.getParameterValues("ucn_lang")[0];
+		if (aHttpServletRequest.getParameterValues(Property.get("UNICORN_PARAMETER_PREFIX") + "lang") != null){
+			templateLang = aHttpServletRequest.getParameterValues(Property.get("UNICORN_PARAMETER_PREFIX") + "lang")[0];
 		}
 		else {
 			templateLang = chooseTemplateLang(aLocale);
@@ -241,7 +241,7 @@
 					addParameter(aFileItem.getFieldName(), aFileItem.getString(),
 							aUnicornCall, mapOfSpecificParameter, mapOfOutputParameter);
 
-				} else if(aFileItem.getFieldName().equals("ucn_file")) {
+				} else if(aFileItem.getFieldName().equals(Property.get("UNICORN_PARAMETER_PREFIX") + "file")) {
 					aFileItemUploaded = aFileItem;
 					aUnicornCall.setDocumentName(aFileItemUploaded.getName());
 					aUnicornCall.setInputParameterValue(aFileItemUploaded);
@@ -355,7 +355,7 @@
 		}
 
 		if (sParamName.equals("lang")) {
-			aUnicornCall.addParameter("ucn_lang", tStringParamValue);
+			aUnicornCall.addParameter(Property.get("UNICORN_PARAMETER_PREFIX") + "lang", tStringParamValue);
 		}
 
 		// Global Unicorn parameter
@@ -387,7 +387,7 @@
 			mapOfOutputParameter.put(sParamName, tStringParamValue[0]);
 		}
 		else if (sParamName.equals("text_mime")) {
-			aUnicornCall.addParameter("ucn_mime", tStringParamValue);
+			aUnicornCall.addParameter(Property.get("UNICORN_PARAMETER_PREFIX") + "mime", tStringParamValue);
 		}
 	}
 

Index: UnicornClient.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/UnicornClient.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- UnicornClient.java	2 Jul 2008 17:34:46 -0000	1.11
+++ UnicornClient.java	28 Jul 2009 10:56:56 -0000	1.12
@@ -12,6 +12,7 @@
 import org.w3c.unicorn.output.OutputFactory;
 import org.w3c.unicorn.output.OutputFormater;
 import org.w3c.unicorn.output.OutputModule;
+import org.w3c.unicorn.util.Property;
 
 public class UnicornClient {
 
@@ -96,7 +97,7 @@
 					aUnicornCall.setMapOfStringParameter(mapOfParameter);
 				}
 				String[] tmp = {pInput[1]};
-				mapOfParameter.put("ucn_mime", tmp);
+				mapOfParameter.put(Property.get("UNICORN_PARAMETER_PREFIX") + "mime", tmp);
 
 				aUnicornCall.setInputParameterValue(content);
 				

Index: UnicornClientDirectInputTest.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/UnicornClientDirectInputTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- UnicornClientDirectInputTest.java	2 Jul 2008 17:34:47 -0000	1.3
+++ UnicornClientDirectInputTest.java	28 Jul 2009 10:56:56 -0000	1.4
@@ -9,6 +9,7 @@
 import org.w3c.unicorn.output.OutputFactory;
 import org.w3c.unicorn.output.OutputFormater;
 import org.w3c.unicorn.output.OutputModule;
+import org.w3c.unicorn.util.Property;
 
 public class UnicornClientDirectInputTest {
 
@@ -24,7 +25,7 @@
 		
 		Map<String, String[]> mapOfParameter = new LinkedHashMap<String, String[]>();
 		String[] tmp = {"text/css"};
-		mapOfParameter.put("ucn_mime", tmp); 
+		mapOfParameter.put(Property.get("UNICORN_PARAMETER_PREFIX") + "mime", tmp); 
 		aUnicornCall.setMapOfStringParameter(mapOfParameter);
 
 		aUnicornCall.setInputParameterValue("p#msie { /* msie-bug note for text/plain */ float: right; border: 1px solid black; background: white;}");

Received on Tuesday, 28 July 2009 10:57:06 UTC