Changeset 467:ea4a2e807f0c
- Timestamp:
- 09/21/09 15:50:19 (4 years ago)
- Author:
- tgambet
- Branch:
- default
- convert_revision:
- svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@468
- Message:
-
produceError and produceOutput now have the same signature
- Location:
- src/org/w3c/unicorn/output
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r464
|
r467
|
|
| 1 | | // $Id: OutputFormater.java,v 1.5 2009-09-21 14:38:35 tgambet Exp $ |
| | 1 | // $Id: OutputFormater.java,v 1.6 2009-09-21 15:50:19 tgambet Exp $ |
| 2 | 2 | // Author: Jean-Guilhem Rouel |
| 3 | 3 | // (c) COPYRIGHT MIT, ERCIM and Keio, 2006. |
| … |
… |
|
| 10 | 10 | import org.apache.commons.logging.Log; |
| 11 | 11 | import org.apache.commons.logging.LogFactory; |
| 12 | | import org.w3c.unicorn.util.Message; |
| 13 | 12 | |
| 14 | 13 | /** |
| … |
… |
|
| 29 | 28 | |
| 30 | 29 | /** |
| 31 | | * @param errorMessage |
| | 30 | * @param messages |
| 32 | 31 | * @param aWriter |
| 33 | 32 | */ |
| 34 | | public abstract void produceError(Message errorMessage, Writer output); |
| | 33 | public abstract void produceError(Map<String, Object> mapOfStringObject, Writer output); |
| 35 | 34 | |
| 36 | 35 | } |
-
|
r464
|
r467
|
|
| 1 | | // $Id: OutputModule.java,v 1.5 2009-09-21 14:38:35 tgambet Exp $ |
| | 1 | // $Id: OutputModule.java,v 1.6 2009-09-21 15:50:19 tgambet Exp $ |
| 2 | 2 | // Author: Damien LEROY. |
| 3 | 3 | // (c) COPYRIGHT MIT, ERCIM ant Keio, 2006. |
| … |
… |
|
| 10 | 10 | import org.apache.commons.logging.Log; |
| 11 | 11 | import org.apache.commons.logging.LogFactory; |
| 12 | | import org.w3c.unicorn.util.Message; |
| 13 | 12 | |
| 14 | 13 | /** |
| … |
… |
|
| 32 | 31 | * |
| 33 | 32 | */ |
| 34 | | public abstract void produceError(final OutputFormater aOutputFormater, Message errorMessage, |
| | 33 | public abstract void produceError(final OutputFormater aOutputFormater, Map<String, Object> mapOfStringObject, |
| 35 | 34 | final Map<String, String> mapOfParameter, final Writer aWriter); |
| 36 | 35 | |
-
|
r295
|
r467
|
|
| 1 | | // $Id: SimpleOutputFormater.java,v 1.4 2009-09-07 16:32:20 tgambet Exp $ |
| | 1 | // $Id: SimpleOutputFormater.java,v 1.5 2009-09-21 15:50:19 tgambet Exp $ |
| 2 | 2 | // Author: Damien LEROY. |
| 3 | 3 | // (c) COPYRIGHT MIT, ERCIM ant Keio, 2006. |
| … |
… |
|
| 7 | 7 | import java.io.IOException; |
| 8 | 8 | import java.io.Writer; |
| | 9 | import java.util.ArrayList; |
| 9 | 10 | import java.util.Map; |
| 10 | 11 | |
| 11 | 12 | import org.apache.velocity.VelocityContext; |
| 12 | 13 | import org.w3c.unicorn.Framework; |
| 13 | | import org.w3c.unicorn.util.Message; |
| 14 | 14 | import org.w3c.unicorn.util.Property; |
| 15 | 15 | import org.w3c.unicorn.util.Templates; |
| … |
… |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | | public void produceError(Message errorMessage, final Writer output) { |
| | 82 | public void produceError(Map<String, Object> mapOfStringObject, final Writer output) { |
| 83 | 83 | |
| 84 | 84 | logger.trace("produceError"); |
| 85 | | logger.debug("ErrorMessage : " + errorMessage.getMessage() + "."); |
| 86 | 85 | logger.debug("Writer : " + output + "."); |
| 87 | 86 | |
| 88 | | Message[] messages = {errorMessage}; |
| | 87 | ArrayList<?> messages = (ArrayList<?>) mapOfStringObject.get("messages"); |
| 89 | 88 | aVelocityContext.put("messages", messages); |
| 90 | 89 | |
-
|
r300
|
r467
|
|
| 1 | | // $Id: SimpleOutputModule.java,v 1.4 2009-09-08 14:22:02 tgambet Exp $ |
| | 1 | // $Id: SimpleOutputModule.java,v 1.5 2009-09-21 15:50:19 tgambet Exp $ |
| 2 | 2 | // Author: Damien LEROY. |
| 3 | 3 | // (c) COPYRIGHT MIT, ERCIM ant Keio, 2006. |
| … |
… |
|
| 7 | 7 | import java.io.Writer; |
| 8 | 8 | import java.util.Map; |
| 9 | | |
| 10 | | import org.w3c.unicorn.util.Message; |
| 11 | 9 | |
| 12 | 10 | /** |
| … |
… |
|
| 22 | 20 | } |
| 23 | 21 | |
| 24 | | public void produceError(final OutputFormater aOutputFormater, Message errorMessage, |
| | 22 | public void produceError(final OutputFormater aOutputFormater, Map<String, Object> mapOfStringObject, |
| 25 | 23 | final Map<String, String> mapOfParameter, final Writer aWriter) { |
| 26 | | aOutputFormater.produceError(errorMessage, aWriter); |
| | 24 | aOutputFormater.produceError(mapOfStringObject, aWriter); |
| 27 | 25 | } |
| 28 | 26 | |