2006/unicorn/src/org/w3c/unicorn/output MailOutputModule.java,1.3,1.4

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

Modified Files:
	MailOutputModule.java 
Log Message:
- mapOfSpecificParameters 
+ mimeType

Index: MailOutputModule.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/MailOutputModule.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- MailOutputModule.java	23 Sep 2009 13:02:05 -0000	1.3
+++ MailOutputModule.java	23 Sep 2009 13:35:27 -0000	1.4
@@ -24,26 +24,27 @@
  */
 public class MailOutputModule implements OutputModule {
 	
-	private OutputFormater aOutputFormater;
+	private OutputFormater firstOutputFormater;
 	
 	private OutputFormater mailOutputFormater;
 	
-	private Map<String, String> mapOfOutputParameters;
-	
-	private Map<String, String> mapOfSpecificParameters;
+	private String mimeType;
 	
 	private String recipient;
 	
+	private Map<String, String> mapOfOutputParameters;
+	
 	public MailOutputModule(Map<String, String> mapOfOutputParameters, Map<String, String> mapOfSpecificParameters) {
 		this.mapOfOutputParameters = mapOfOutputParameters;
-		this.mapOfSpecificParameters = mapOfSpecificParameters;
-		this.recipient = mapOfSpecificParameters.get("email");
-			
+		//this.mapOfSpecificParameters = mapOfSpecificParameters;
+		
+		recipient = mapOfSpecificParameters.get("email");
+		mimeType = mapOfOutputParameters.get("mimetype");
+		
 		String format = mapOfOutputParameters.get("format");
 		String lang = mapOfOutputParameters.get("lang"); 
-		String mimeType = mapOfOutputParameters.get("mimetype");
 		
-		aOutputFormater = OutputFactory.createOutputFormater(format, lang, mimeType);
+		firstOutputFormater = OutputFactory.createOutputFormater(format, lang, mimeType);
 		
 		if (mapOfSpecificParameters.get("format") != null)
 			format = mapOfSpecificParameters.get("format");
@@ -81,7 +82,7 @@
 			CharArrayWriter writer = new CharArrayWriter();
 			mailOutputFormater.produceOutput(mapOfStringObject, writer);
 			writer.close();
-			msg.setContent(writer.toString(), mapOfOutputParameters.get("mimetype"));
+			msg.setContent(writer.toString(), mimeType);
 			
 			Transport.send(msg);
 		} catch (AddressException e) {
@@ -97,7 +98,7 @@
 	}
 
 	public void produceError(Map<String, Object> mapOfStringObject, final Writer aWriter) {
-		aOutputFormater.produceError(mapOfStringObject, aWriter);
+		firstOutputFormater.produceError(mapOfStringObject, aWriter);
 	}
 
 	public String getOutputParameter(String string) {

Received on Wednesday, 23 September 2009 13:35:40 UTC