From: Tim P <ti...@us...> - 2008-03-20 11:01:50
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16419/src/org/webmacro/util Modified Files: WMEval.java Log Message: Checkstyle: line length, javadoc Index: WMEval.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/WMEval.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** WMEval.java 18 Mar 2008 11:20:35 -0000 1.21 --- WMEval.java 20 Mar 2008 11:01:41 -0000 1.22 *************** *** 143,155 **** * on multiple contexts. Init parses the currentTemplate supplied. * <p> ! * The argument to init() is the currentTemplate as a stream allowing the currentTemplate ! * to come from pretty much anywhere such as a url, a file, or a db field. * <p> ! * Care must be given to the fact that in parsing the currentTemplate, th current vm is able ! * to resolve locations of other currentTemplates referenced within the supplied currentTemplate. * <p> ! * Note, once this is complete, the parsed currentTemplate can be applied to successive ! * new object contexts. In other words, the application context * can assert new objects for currentTemplate application and remove others. * @param template The stream containing the top-level, unparsed currentTemplate. * --- 143,158 ---- * on multiple contexts. Init parses the currentTemplate supplied. * <p> ! * The argument to init() is the currentTemplate as a stream allowing the ! * currentTemplate to come from pretty much anywhere such as a url, ! * a file, or a db field. * <p> ! * Care must be given to the fact that in parsing the currentTemplate, ! * the current vm is able to resolve locations of other currentTemplates ! * referenced within the supplied currentTemplate. * <p> ! * Note, once this is complete, the parsed currentTemplate can be applied ! * to successive new object contexts. In other words, the application context * can assert new objects for currentTemplate application and remove others. + * * @param template The stream containing the top-level, unparsed currentTemplate. * *************** *** 158,162 **** { // ! Template t = new StreamTemplate(wm.getBroker(), new InputStreamReader(template)); t.parse(); this.currentTemplate = t; --- 161,166 ---- { // ! Template t = new StreamTemplate(wm.getBroker(), ! new InputStreamReader(template)); t.parse(); this.currentTemplate = t; *************** *** 260,271 **** /** ! * Evaluates the string template against the current context ! * and returns the value. If an output stream is specified, the value ! * is written out as well to this stream. * @param templateName The name of the template. * @param out An optional output stream. * @return The output from the evaluated template */ ! public String eval (Context context, String templateName, OutputStream out) throws Exception { return eval(context, templateName, out, null); --- 264,278 ---- /** ! * Evaluates the named template against the current context ! * and returns the value. ! * If an output stream is specified, the return value is ! * also written out to the stream. ! * * @param templateName The name of the template. * @param out An optional output stream. * @return The output from the evaluated template */ ! public String eval (Context context, String templateName, OutputStream out) ! throws Exception { return eval(context, templateName, out, null); *************** *** 371,377 **** /** ! * Evaluates the current context for the input file and writes it to the output file. */ ! public String eval (Context context, String templateName, String outputFileName, boolean append, String encoding) throws Exception { OutputStream out = new FileOutputStream(outputFileName, append); --- 378,395 ---- /** ! * Evaluate the named template against the given context. ! * Writes the output to the given output file. ! * ! * @param context the context to evaluate the template against ! * @param templateName the name of the template to evaluate ! * @param outputFileName name of file to output to ! * @param append whether to apppend output ! * @param encoding the encoding to use, may be null ! * @return ! * @throws Exception */ ! public String eval (Context context, String templateName, ! String outputFileName, boolean append, String encoding) ! throws Exception { OutputStream out = new FileOutputStream(outputFileName, append); |