- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 12 Aug 2009 13:15:22 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/output In directory hutz:/tmp/cvs-serv22119/src/org/w3c/unicorn/output Modified Files: Tag: dev2 OutputFactory.java XMLOutputFormater.java Log Message: All initialization actions moved to Framework.java Index: XMLOutputFormater.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/Attic/XMLOutputFormater.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- XMLOutputFormater.java 11 Aug 2009 16:20:43 -0000 1.1.2.1 +++ XMLOutputFormater.java 12 Aug 2009 13:15:19 -0000 1.1.2.2 @@ -92,6 +92,7 @@ .get(sObjectName)); } this.aTemplateOutput.merge(aVelocityContext, aWriter); + aWriter.close(); } /* @@ -111,5 +112,6 @@ aEventCartridge.attachToContext(aVelocityContext); aVelocityContext.put("error", aException); this.aTemplateError.merge(aVelocityContext, aWriter); + aWriter.close(); } } Index: OutputFactory.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/Attic/OutputFactory.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- OutputFactory.java 11 Aug 2009 16:20:43 -0000 1.1.2.1 +++ OutputFactory.java 12 Aug 2009 13:15:19 -0000 1.1.2.2 @@ -4,16 +4,13 @@ // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.unicorn.output; -import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; import java.util.Properties; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.velocity.exception.ParseErrorException; import org.apache.velocity.exception.ResourceNotFoundException; -import org.w3c.unicorn.util.Property; /** * This class allow to manage all output module and output formater. It provide @@ -33,7 +30,7 @@ private static Properties aPropertiesSpecialFormaters; - public static void init() { + /*public static void init() { OutputFactory.aPropertiesSpecialFormaters = Property.getProps("specialFormaters.properties"); @@ -44,8 +41,8 @@ } catch (final IOException e) { OutputFactory.logger.error("IOException : " + e.getMessage(), e); e.printStackTrace(); - }*/ - } + } + }*/ /** * Create a new output module and add it to the map. @@ -98,9 +95,9 @@ final String sFormaterName = OutputFactory.aPropertiesSpecialFormaters .getProperty(sMimeType); if (null != sFormaterName) { - final Class aFormaterClass = Class + final Class<?> aFormaterClass = Class .forName("org.w3c.unicorn.output." + sFormaterName); - final Class[] tClassParamType = { String.class, String.class }; + final Class<?>[] tClassParamType = { String.class, String.class }; final Object[] tObjectParamValue = { sOutputFormat, sLang }; final OutputFormater aOutputFormater; aOutputFormater = (OutputFormater) aFormaterClass.getConstructor( @@ -199,4 +196,15 @@ return aOutputFormater; } + public static Properties getPropertiesSpecialFormaters() { + return aPropertiesSpecialFormaters; + } + + public static void setPropertiesSpecialFormaters( + Properties aPropertiesSpecialFormaters) { + OutputFactory.aPropertiesSpecialFormaters = aPropertiesSpecialFormaters; + } + + + }
Received on Wednesday, 12 August 2009 13:15:34 UTC