001 package com.hammurapi.render;
002
003 import java.io.File;
004 import java.io.Writer;
005 import java.util.Locale;
006 import java.util.Map;
007
008 import com.hammurapi.common.Context;
009
010 /**
011 * Renders to a writer.
012 * @author Pavel Vlasov
013 *
014 */
015 public interface WriterRenderer {
016
017 /**
018 * Renders to a writer.
019 * @param out Output writer.
020 * @param environment Environment.
021 * @param context Context
022 * @param profile Rendering "profile", e.g. "outline", "embedded". Can be null.
023 * @param locale Locale. If null then the system default locale is used.
024 * @param outputDir Directory to output additional files, can be null.
025 * @return True if rendering was successful.
026 * @throws RenderingException
027 */
028 boolean render(
029 Writer out,
030 Map<String, Object> environment,
031 Context context,
032 String profile,
033 Locale locale,
034 File outputDir) throws RenderingException;
035
036 }