2006/unicorn/src/org/w3c/unicorn/output OutputModule.java,1.5,1.6 OutputFormater.java,1.5,1.6 SimpleOutputModule.java,1.4,1.5 SimpleOutputFormater.java,1.4,1.5

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

Modified Files:
	OutputModule.java OutputFormater.java SimpleOutputModule.java 
	SimpleOutputFormater.java 
Log Message:
produceError and produceOutput now have the same signature

Index: OutputFormater.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/OutputFormater.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- OutputFormater.java	21 Sep 2009 14:38:35 -0000	1.5
+++ OutputFormater.java	21 Sep 2009 15:50:19 -0000	1.6
@@ -9,7 +9,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.w3c.unicorn.util.Message;
 
 /**
  * SimpleOutputFormater<br />
@@ -28,9 +27,9 @@
 	public abstract void produceOutput(Map<String, Object> mapOfStringObject, Writer output);
 
 	/**
-	 * @param errorMessage 
+	 * @param messages 
 	 * @param aWriter
 	 */
-	public abstract void produceError(Message errorMessage, Writer output);
+	public abstract void produceError(Map<String, Object> mapOfStringObject, Writer output);
 
 }
\ No newline at end of file

Index: OutputModule.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/OutputModule.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- OutputModule.java	21 Sep 2009 14:38:35 -0000	1.5
+++ OutputModule.java	21 Sep 2009 15:50:19 -0000	1.6
@@ -9,7 +9,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.w3c.unicorn.util.Message;
 
 /**
  * Interface for all output module.
@@ -31,7 +30,7 @@
 	 * Generates an error output
 	 * 
 	 */
-	public abstract void produceError(final OutputFormater aOutputFormater, Message errorMessage,
+	public abstract void produceError(final OutputFormater aOutputFormater, Map<String, Object> mapOfStringObject,
 			final Map<String, String> mapOfParameter, final Writer aWriter);
 
 }

Index: SimpleOutputFormater.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/SimpleOutputFormater.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- SimpleOutputFormater.java	7 Sep 2009 16:32:20 -0000	1.4
+++ SimpleOutputFormater.java	21 Sep 2009 15:50:19 -0000	1.5
@@ -6,11 +6,11 @@
 
 import java.io.IOException;
 import java.io.Writer;
+import java.util.ArrayList;
 import java.util.Map;
 
 import org.apache.velocity.VelocityContext;
 import org.w3c.unicorn.Framework;
-import org.w3c.unicorn.util.Message;
 import org.w3c.unicorn.util.Property;
 import org.w3c.unicorn.util.Templates;
 
@@ -79,13 +79,12 @@
 		}
 	}
 
-	public void produceError(Message errorMessage, final Writer output) {
+	public void produceError(Map<String, Object> mapOfStringObject, final Writer output) {
 		
 		logger.trace("produceError");
-		logger.debug("ErrorMessage : " + errorMessage.getMessage() + ".");
 		logger.debug("Writer : " + output + ".");
 		
-		Message[] messages = {errorMessage};
+		ArrayList<?> messages = (ArrayList<?>) mapOfStringObject.get("messages");
 		aVelocityContext.put("messages", messages);
 		
 		Templates.write(format + ".error.vm", aVelocityContext, output);

Index: SimpleOutputModule.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/SimpleOutputModule.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- SimpleOutputModule.java	8 Sep 2009 14:22:02 -0000	1.4
+++ SimpleOutputModule.java	21 Sep 2009 15:50:19 -0000	1.5
@@ -7,8 +7,6 @@
 import java.io.Writer;
 import java.util.Map;
 
-import org.w3c.unicorn.util.Message;
-
 /**
  * This module allow to generate output in text format.
  * 
@@ -21,9 +19,9 @@
 		aOutputFormater.produceOutput(mapOfStringObject, aWriter);
 	}
 
-	public void produceError(final OutputFormater aOutputFormater, Message errorMessage,
+	public void produceError(final OutputFormater aOutputFormater, Map<String, Object> mapOfStringObject,
 			final Map<String, String> mapOfParameter, final Writer aWriter) {
-		aOutputFormater.produceError(errorMessage, aWriter);
+		aOutputFormater.produceError(mapOfStringObject, aWriter);
 	}
 
 }

Received on Monday, 21 September 2009 15:50:31 UTC