producer will now by default pass through the html filter.
-[last changed: $Date: 2003/12/03 15:41:11 $] 2002 mir-coders group
+[last changed: $Date: 2005/12/24 21:47:17 $] 2002 mir-coders group
-------------------------------------------------------------------------------
================================
incrementally when they are produced, uses standard internationalized
template scheme to display results of queries, which can be sorted by real
publication date and include things like image thumbnails
-
-[Bugfixes]
-* more image formats supported with JAI / Java Image I/O
[Build process]
[Maintenance]
-[Notes]
-Mir depends media operations depend on the correct installation of
-JAI / Java Image I/O in the JRE running tomcat.
-
===============================
1.0.0 final released 2002/12/24
===============================
[Bugfixes]
* minor: in source/mir/misc/HTMLTemplateProcessor.java, use Video.Host
config option not the non-existant VideoHost option.
-
+
[Build process]
[Maintenance]
=============================
[New features/Improvements]
-* throw a RuntimeException in MirConfig.getProp(..) if the property is not
+* throw a RuntimeException in MirConfig.getProp(..) if the property is not
found. This should ease upgrading between versions when a new Config property
is added.
[Bugfixes]
* Add a new method to escape characters that are special characters in SQL. It
- does a better job than the old hack in StringUtil.quote(..) which replaced
- single quotes with the HTML representation of a single quote ('
+ does a better job than the old hack in StringUtil.quote(..) which replaced
+ single quotes with the HTML representation of a single quote ('
I believe). The hack papered over a bug in the postgres JDBC driver which
makes it not recognize escaping w/ a backslash (it uses double single quotes
instead).
-
+
[Build process]
[Maintenance]
posting.template that prevented the chossing of a topic in openposting from
working. luckily this bug didn't affect most sites since most installations
customize the template.
-
+
[Build process]
* set a "Cache-control", "Pragma" and "Expires" header to the http response
in the Mir and OpenMir servlets to insure that nothing gets cached by a
client browser.
-* Add a new config parameter: Mir.DefaultHTMLCharset to set the HTML
- content-type charset in one place and re-use it in templates as
+* Add a new config parameter: Mir.DefaultHTMLCharset to set the HTML
+ content-type charset in one place and re-use it in templates as
${config.defEncoding}.
* Allow some HTML tags in the abstract (description field) during an
openposting. strip out the dangerous ones like <head>, <body> and <script> as
* Fix embarrassing bug in the admin interface that caused data to dissappear
when double quotes were in a title form field for example.. (anything
enclosed in a value="...")
-* fix a bug in comment search: if you were at an offset > 0, i.e not on the
+* fix a bug in comment search: if you were at an offset > 0, i.e not on the
first page, the search would be broken.
* fix minor bug in media searching: mediafolder search setting would be reset
each time. make sure it is not so.
[Maintenance]
* comment out a bunch of debug logging in Database.java
* add this file, REPORTING_BUGS, KNOWN_BUGS, CODINGSTYLE and a README file.
-* Add gnu Style ChangeLog using cvs2cl (use "-F MIR_1_0 --utc" options., for
+* Add gnu Style ChangeLog using cvs2cl (use "-F MIR_1_0 --utc" options., for
HEAD, it would be "-F trunk --utc")
[Notes]
[Bugfixes]
* Better and more consistent exception handling: make sure all exceptions make
it to the top.
-* make sure that if some part of a posting fails that the posting however
+* make sure that if some part of a posting fails that the posting however
complete/inconplete it may be is deleted
* many bugfixes all over the place
Mir.Localizer.Admin.GeneratorLibrary= default=freemarker(templates/admin/),preview=freemarker(etc/producer)
Mir.Localizer.OpenPosting.GeneratorLibrary= default=freemarker(etc/open/)
+# Should an XSS preventing interceptor be used by the producer subsystem?
+Mir.Producer.UseInterceptor=1
+
# How should the custom operations (hide etc) in article and comment lists
# be presented?
# 0 = links, 1 = checkboxes, 2 = a listbox
if (calculatedFieldsCache.containsKey(aKey)) {
return calculatedFieldsCache.get(aKey);
}
- else if (aKey instanceof String && definition.hasCalculatedField((String) aKey)) {
- result = definition.getCalculatedField((String) aKey).getValue(this);
+ else if (definition.hasCalculatedField(aKey)) {
+ result = definition.getCalculatedField(aKey).getValue(this);
calculatedFieldsCache.put(aKey, result);
return result;
}
else {
- return entity.getFieldValue((String) aKey);
+ return entity.getFieldValue(aKey);
}
}
generatorLibraries.put(aQualifier, aLibrary);
}
- public Generator makeGenerator(String anIdentifier) throws GeneratorExc, GeneratorFailure {
+ public Generator makeGenerator(String anIdentifier, Generator.Interceptor anInterceptor) throws GeneratorExc, GeneratorFailure {
String qualifier;
String libraryName;
int position;
if (library==null)
throw new GeneratorExc("CompositeGeneratorLibrary: library '"+libraryName+"' not found");
- return library.makeGenerator(qualifier);
+ return library.makeGenerator(qualifier, anInterceptor);
}
if (defaultLibrary!=null)
- return defaultLibrary.makeGenerator(anIdentifier);
+ return defaultLibrary.makeGenerator(anIdentifier, anInterceptor);
throw new GeneratorExc("CompositeGeneratorLibrary: no default library speficied");
}
}
\ No newline at end of file
public class FreemarkerGenerator implements Generator {
private Template template;
+ private Interceptor interceptor;
- public FreemarkerGenerator(Template aTemplate) {
+ public FreemarkerGenerator(Template aTemplate, Interceptor anInterceptor) {
template = aTemplate;
+ interceptor = anInterceptor;
}
public void generate(Object anOutputWriter, Map aValues, LoggerWrapper aLogger) throws GeneratorExc, GeneratorFailure {
return new SimpleScalar(aString);
}
- private static TemplateHashModel makeMapAdapter(Map aMap) {
+ private TemplateHashModel makeMapAdapter(Map aMap) {
return new MapAdapter(aMap);
}
- private static TemplateListModel makeIteratorAdapter(Iterator anIterator) {
+ private TemplateListModel makeIteratorAdapter(Iterator anIterator) {
return new IteratorAdapter(anIterator);
}
- private static TemplateMethodModel makeFunctionAdapter(Generator.Function aFunction) {
+ private TemplateMethodModel makeFunctionAdapter(Generator.Function aFunction) {
return new FunctionAdapter(aFunction);
}
- private static TemplateHashModel makeBeanAdapter(Object anObject) {
+ private TemplateHashModel makeBeanAdapter(Object anObject) {
return new BeanAdapter(anObject);
}
- public static TemplateModel makeAdapter(Object anObject) throws TemplateModelException {
- if (anObject == null) {
- return null;
+ public TemplateModel makeAdapter(Object anObject) throws TemplateModelException {
+ Object object = anObject;
+ if (interceptor != null) {
+ object = interceptor.intercept(object);
}
- if (anObject instanceof TemplateModel) {
- return (TemplateModel) anObject;
+ if (object == null) {
+ return null;
}
- else if (anObject instanceof Generator.Function) {
- return makeFunctionAdapter((Generator.Function) anObject);
+ if (object instanceof TemplateModel) {
+ return (TemplateModel) object;
}
- else if (anObject instanceof Integer) {
- return makeStringAdapter(anObject.toString());
+ else if (object instanceof Generator.Function) {
+ return makeFunctionAdapter((Generator.Function) object);
}
- else if (anObject instanceof Boolean) {
- if (((Boolean) anObject).booleanValue()) {
+ else if (object instanceof Integer) {
+ return makeStringAdapter(object.toString());
+ }
+ else if (object instanceof Boolean) {
+ if (((Boolean) object).booleanValue()) {
return makeStringAdapter("1");
}
else {
return makeStringAdapter("0");
}
}
- else if (anObject instanceof String) {
- return makeStringAdapter((String) anObject);
+ else if (object instanceof String) {
+ return makeStringAdapter((String) object);
}
- else if (anObject instanceof Map) {
- return makeMapAdapter((Map) anObject);
+ else if (object instanceof Map) {
+ return makeMapAdapter((Map) object);
}
- else if (anObject instanceof Iterator) {
- return makeIteratorAdapter((Iterator) anObject);
+ else if (object instanceof Iterator) {
+ return makeIteratorAdapter((Iterator) object);
}
- else if (anObject instanceof Collection) {
- return makeIteratorAdapter(((Collection) anObject).iterator());
+ else if (object instanceof Collection) {
+ return makeIteratorAdapter(((Collection) object).iterator());
}
- else if (anObject instanceof Number) {
- return makeAdapter(new GeneratorFormatAdapters.NumberFormatAdapter((Number) anObject));
+ else if (object instanceof Number) {
+ return makeAdapter(new GeneratorFormatAdapters.NumberFormatAdapter((Number) object));
}
- else if (anObject instanceof Date) {
- return makeAdapter(new GeneratorFormatAdapters.DateFormatAdapter((Date) anObject));
+ else if (object instanceof Date) {
+ return makeAdapter(new GeneratorFormatAdapters.DateFormatAdapter((Date) object));
}
else {
- return makeBeanAdapter(anObject);
+ return makeBeanAdapter(object);
}
}
- private static class MapAdapter implements TemplateModelRoot {
+ private class MapAdapter implements TemplateModelRoot {
private Map map;
private Map valuesCache;
}
}
- private static class IteratorAdapter implements TemplateListModel {
+ private class IteratorAdapter implements TemplateListModel {
private Iterator iterator;
private List valuesCache;
private int position;
}
}
- private static class FunctionAdapter implements TemplateMethodModel {
+ private class FunctionAdapter implements TemplateMethodModel {
private Generator.Function function;
FunctionAdapter(Generator.Function aFunction) {
}
- private static class BeanAdapter implements TemplateHashModel {
+ private class BeanAdapter implements TemplateHashModel {
private Object object;
public BeanAdapter(Object anObject) {
templateCache.setLoadingPolicy(FileTemplateCache.LOAD_ON_DEMAND);
}
- public Generator makeGenerator(String anIdentifier) throws GeneratorExc, GeneratorFailure {
+ public Generator makeGenerator(String anIdentifier, Interceptor anInterceptor) throws GeneratorExc, GeneratorFailure {
Template template = (Template) templateCache.getItem(anIdentifier, "template");
if (template==null) {
templateCache.getDirectory() + File.separatorChar + anIdentifier);
}
- return new FreemarkerGenerator(template);
+ return new FreemarkerGenerator(template, anInterceptor);
}
+
}
public static class FreemarkerGeneratorLibraryFactory implements LibraryFactory {
*/
package mir.generator;
-import java.io.PrintWriter;
-import java.io.Reader;
+import mir.log.LoggerWrapper;
+
import java.util.List;
import java.util.Map;
-import mir.log.LoggerWrapper;
-
/**
* A "generator" is an abstraction for a template
* If you need a generator, use MirGeneratorLocalizer
* MirGeneratorLocalizer to create a writer.
* @param aValues the key/value pairs which the template engine will use as variables
*/
- public void generate(Object anOutputWriter, Map aValues, LoggerWrapper aLogger) throws GeneratorExc, GeneratorFailure;
+ void generate(Object anOutputWriter, Map aValues, LoggerWrapper aLogger) throws GeneratorExc, GeneratorFailure;
-
- public static interface Library {
- public Generator makeGenerator(String anIdentifier) throws GeneratorExc, GeneratorFailure;
+ interface Library {
+ Generator makeGenerator(String anIdentifier, Interceptor anInterceptor) throws GeneratorExc, GeneratorFailure;
}
- public static interface LibraryFactory {
- public Library makeLibrary(String anInitializationString) throws GeneratorExc, GeneratorFailure ;
+ interface LibraryFactory {
+ Library makeLibrary(String anInitializationString) throws GeneratorExc, GeneratorFailure ;
}
- /** interface for a generator implementation independent function */
- public static interface Function {
- /** performs the function with the given parameters */
- public Object perform(List aParameters) throws GeneratorExc, GeneratorFailure;
+ interface Interceptor {
+ Object intercept(Object anObject);
}
- public static interface Transformer {
- public void perform(Reader aSource, PrintWriter anOutput) throws GeneratorExc, GeneratorFailure;
+ /** interface for a generator implementation independent function */
+ interface Function {
+ /** performs the function with the given parameters */
+ Object perform(List aParameters) throws GeneratorExc, GeneratorFailure;
}
}
public class TALGenerator implements Generator {
private String templateIdentifier;
private TALGeneratorLibrary library;
+ private Interceptor interceptor;
- public TALGenerator(String aTemplate, TALGeneratorLibrary aLibrary) {
+ public TALGenerator(String aTemplate, TALGeneratorLibrary aLibrary, Interceptor anInterceptor) {
templateIdentifier = aTemplate;
library = aLibrary;
+ interceptor = anInterceptor;
}
public void generate(Object anOutputWriter, Map aValues, final LoggerWrapper aLogger) throws GeneratorExc, GeneratorFailure {
engine = new TALTemplateEngine(new MirExpressionParser(), aTemplateRoot);
}
- public Generator makeGenerator(String anIdentifier) throws GeneratorExc, GeneratorFailure {
- return new TALGenerator(anIdentifier, this);
+ public Generator makeGenerator(String anIdentifier, Interceptor anInterceptor) throws GeneratorExc, GeneratorFailure {
+ return new TALGenerator(anIdentifier, this, anInterceptor);
}
}
private String templateIdentifier;
private VelocityGeneratorLibrary library;
private static LoggerWrapper logger = new LoggerWrapper("Generator.velocity");
+ private Interceptor interceptor;
/**
*
* @param aLibrary
*/
- public VelocityGenerator(String aTemplate, VelocityGeneratorLibrary aLibrary) {
+ public VelocityGenerator(String aTemplate, VelocityGeneratorLibrary aLibrary, Interceptor anInterceptor) {
templateIdentifier = aTemplate;
library = aLibrary;
+ interceptor = anInterceptor;
}
/**
}
}
- public Generator makeGenerator(String anIdentifier) throws GeneratorExc, GeneratorFailure {
- return new VelocityGenerator(anIdentifier, this);
+ public Generator makeGenerator(String anIdentifier, Interceptor anInterceptor) throws GeneratorExc, GeneratorFailure {
+ return new VelocityGenerator(anIdentifier, this, anInterceptor);
}
}
import java.util.Map;
import mir.generator.tal.interfaces.TALExpressionParser;
+import mir.generator.Generator;
import mir.util.ParameterExpander;
import mir.util.RewindableIterator;
private String parametersExpression;
private Generator.Library generatorLibrary;
private WriterEngine writerEngine;
+ private Generator.Interceptor interceptor;
- public GeneratingProducerNode(Generator.Library aGeneratorLibrary, WriterEngine aWriterEngine, String aGenerator, String aDestination, String aParameters) {
+ public GeneratingProducerNode(Generator.Library aGeneratorLibrary, WriterEngine aWriterEngine, Generator.Interceptor anInterceptor, String aGenerator, String aDestination, String aParameters) {
generatorExpression=aGenerator;
destinationExpression=aDestination;
parametersExpression=aParameters;
generatorLibrary = aGeneratorLibrary;
writerEngine = aWriterEngine;
+ interceptor = anInterceptor;
}
- public GeneratingProducerNode(Generator.Library aGeneratorLibrary, WriterEngine aWriterEngine, String aGenerator, String aDestination) {
- this(aGeneratorLibrary, aWriterEngine, aGenerator, aDestination, "");
+ public GeneratingProducerNode(Generator.Library aGeneratorLibrary, WriterEngine aWriterEngine, Generator.Interceptor anInterceptor, String aGenerator, String aDestination) {
+ this(aGeneratorLibrary, aWriterEngine, anInterceptor, aGenerator, aDestination, "");
}
public void produce(Map aValueMap, String aVerb, LoggerWrapper aLogger) throws ProducerFailure {
mirMap.put("parameters", parameters);
writer = writerEngine.openWriter(destinationIdentifier, parameters);
- generator = generatorLibrary.makeGenerator(generatorIdentifier);
+ generator = generatorLibrary.makeGenerator(generatorIdentifier, interceptor);
generator.generate(writer, aValueMap, aLogger);
writerEngine.closeWriter(writer);
public static void registerBuilders(ProducerNodeBuilderLibrary aBuilderLibrary,
EntityAdapterModel aModel, Generator.Library aGeneratorLibrary,
+ Generator.Interceptor anInterceptor,
WriterEngine aWriterEngine, File aSourceBasePath, File aDestinationBasePath) throws ProducerConfigExc {
aBuilderLibrary.registerBuilder("Set", EvaluatedAssignmentProducerNodeBuilder.class);
aBuilderLibrary.registerFactory("CreateEntity", new CreateEntityProducerNodeBuilder.factory(aModel));
aBuilderLibrary.registerFactory("DeleteEntity", new DeleteEntityProducerNodeBuilder.factory(aModel));
- aBuilderLibrary.registerFactory("Generate", new GeneratingProducerNodeBuilder.factory(aGeneratorLibrary, aWriterEngine));
+ aBuilderLibrary.registerFactory("Generate", new GeneratingProducerNodeBuilder.factory(aGeneratorLibrary,
+ aWriterEngine, anInterceptor));
}
public static abstract class AbstractProducerNodeBuilder implements ProducerNodeBuilder {
private String parameters;
private Generator.Library generatorLibrary;
private WriterEngine writerEngine;
+ private Generator.Interceptor interceptor;
- public GeneratingProducerNodeBuilder(Generator.Library aGeneratorLibrary, WriterEngine aWriterEngine) {
+ public GeneratingProducerNodeBuilder(Generator.Library aGeneratorLibrary, WriterEngine aWriterEngine,
+ Generator.Interceptor anInterceptor) {
super(GENERATION_SUBNODES);
writerEngine = aWriterEngine;
generatorLibrary = aGeneratorLibrary;
+ interceptor = anInterceptor;
}
public void setAttributes(Map anAttributes) throws ProducerConfigExc, XMLParserExc {
}
public ProducerNode constructNode() {
- return new GeneratingProducerNode(generatorLibrary, writerEngine, generator, destination, parameters);
+ return new GeneratingProducerNode(generatorLibrary, writerEngine, interceptor, generator, destination, parameters);
}
public static class factory implements ProducerNodeBuilderFactory {
private Generator.Library generatorLibrary;
private WriterEngine writerEngine;
+ private Generator.Interceptor interceptor;
- public factory(Generator.Library aGeneratorLibrary, WriterEngine aWriterEngine) {
+ public factory(Generator.Library aGeneratorLibrary, WriterEngine aWriterEngine, Generator.Interceptor anInterceptor) {
writerEngine = aWriterEngine;
generatorLibrary = aGeneratorLibrary;
+ interceptor = anInterceptor;
}
public ProducerNodeBuilder makeBuilder() {
- return new GeneratingProducerNodeBuilder(generatorLibrary, writerEngine);
+ return new GeneratingProducerNodeBuilder(generatorLibrary, writerEngine, interceptor);
}
}
}
*/
package mircoders.localizer;
+import mir.generator.Generator;
+
import java.util.Map;
public interface MirProducerAssistantLocalizer {
public void initializeGenerationValueSet(Map aValueSet) throws MirLocalizerExc, MirLocalizerFailure;
public String filterHTMLText(String aText) throws MirLocalizerExc, MirLocalizerFailure;
public String filterNonHTMLText(String aText) throws MirLocalizerExc, MirLocalizerFailure;
+ public Generator.Interceptor createGenerationInterceptor() throws MirLocalizerExc, MirLocalizerFailure;
}
if (previewPages.containsKey(aPreviewPage)) {
try {
- return MirGlobal.localizer().generators().makeAdminGeneratorLibrary().makeGenerator((String) previewPages.get(aPreviewPage));
+ return MirGlobal.localizer().generators().makeAdminGeneratorLibrary().
+ makeGenerator((String) previewPages.get(aPreviewPage), null);
}
catch (GeneratorExc e) {
throw new MirLocalizerFailure(e);
String emailAnArticleTemplate = configuration.getString("Localizer.OpenSession.email.MailTemplate");
- Generator generator = MirGlobal.localizer().generators().makeOpenPostingGeneratorLibrary().makeGenerator(emailAnArticleTemplate);
+ Generator generator =
+ MirGlobal.localizer().generators().makeOpenPostingGeneratorLibrary().
+ makeGenerator(emailAnArticleTemplate, null);
StringWriter theEmailStringWriter = new StringWriter();
PrintWriter theEmailPrintWriter = new PrintWriter(theEmailStringWriter);
Iterator i = new EntityIteratorAdapter("", "", 20, MirGlobal.localizer().dataModel().adapterModel(), "language");
while (i.hasNext()) {
EntityAdapter language = (EntityAdapter) i.next();
- if (language.get("code").equals("ot"))
+ if (language.get("code").equals("ot")) {
otherLanguageId = (String) language.get("id");
+ }
languageCodeToId.put(language.get("code"), language.get("id"));
}
MirGlobal.config().getString("Producer.ImageRoot"),
MirGlobal.config().getString("Producer.MailLinkName"),
MirGlobal.config().getString("Producer.ExtLinkName"),
- MirGlobal.config().getString("Producer.IntLinkName")
- );
+ MirGlobal.config().getString("Producer.IntLinkName"));
logger.debug("done filtering non-HTML text ");
return result;
}
throw new RuntimeException(t.toString());
}
}
+
+ public Generator.Interceptor createGenerationInterceptor() throws MirLocalizerExc, MirLocalizerFailure {
+
+ if (MirGlobal.config().getBoolean("Mir.Producer.UseInterceptor", true)) {
+ return new Generator.Interceptor() {
+
+ public Object intercept(Object anObject) {
+ if (anObject instanceof EntityAdapter) {
+ return new InterceptedEntityAdapter((EntityAdapter) anObject);
+ }
+
+ return anObject;
+ }
+ };
+ }
+ else {
+ return null;
+ }
+ }
+
+ public class InterceptedEntityAdapter {
+ private EntityAdapter adapter;
+
+ InterceptedEntityAdapter(EntityAdapter anEntityAdapter) {
+ adapter = anEntityAdapter;
+ }
+
+ public Object get(String aField) {
+ Object result = adapter.get(aField);
+ if (result instanceof String) {
+ return filterHTMLText((String) result);
+ }
+ else {
+ return result;
+ }
+ }
+
+ public Object getRaw() {
+ return new RawEntityAdapter(adapter);
+ }
+ }
+
+ public class RawEntityAdapter {
+ private EntityAdapter adapter;
+
+ RawEntityAdapter(EntityAdapter anEntityAdapter) {
+ adapter = anEntityAdapter;
+ }
+
+ public Object get(String aField) {
+ return adapter.get(aField);
+ }
+ }
+
public String filterHTMLText(String aText) {
try {
StringWriter out = new StringWriter();
tidy.setCharEncoding(Configuration.UTF8);
tidy.setErrout(logger.asPrintWriter(LoggerWrapper.DEBUG_MESSAGE));
print(tidy.parseDOM(in, null), out);
-
+
return out.toString();
}
catch (IOException e) {
protected void setupProducerNodeBuilderLibrary(ProducerNodeBuilderLibrary aLibrary) throws MirLocalizerFailure {
try {
DefaultProducerNodeBuilders.registerBuilders(
- aLibrary, model, generatorLibrary, writerEngine,
- MirGlobal.config().getHome(), MirGlobal.config().getFile("Producer.StorageRoot"));
+ aLibrary, model, generatorLibrary,
+ MirGlobal.localizer().producerAssistant().createGenerationInterceptor(),
+ writerEngine,
+ MirGlobal.config().getHome(),
+ MirGlobal.config().getFile("Producer.StorageRoot"));
SupplementalProducerNodeBuilders.registerBuilders(aLibrary, MirGlobal.config().getHome());
}
catch (Throwable t) {
logger.debug("generator used: " + aGenerator);
try {
- Generator generator = MirGlobal.localizer().generators().makeAdminGeneratorLibrary().makeGenerator(aGenerator);
+ Generator generator = MirGlobal.localizer().generators().makeAdminGeneratorLibrary().makeGenerator(aGenerator, null);
generator.generate(aWriter, aGenerationData, logger);
}
public static void generateOpenPostingResponse(PrintWriter aWriter, Map aGenerationData, String aGenerator) {
try {
- Generator generator = MirGlobal.localizer().generators().makeOpenPostingGeneratorLibrary().makeGenerator(aGenerator);
+ Generator generator = MirGlobal.localizer().generators().makeOpenPostingGeneratorLibrary().makeGenerator(aGenerator, null);
generator.generate(aWriter, aGenerationData, logger);
}
responseData.put("extra", anExtra);
- Generator generator = MirGlobal.localizer().generators().makeOpenPostingGeneratorLibrary().makeGenerator(aGenerator);
+ Generator generator =
+ MirGlobal.localizer().generators().makeOpenPostingGeneratorLibrary().makeGenerator(aGenerator, null);
generator.generate(anOutputWriter, responseData, getLogger());
anOutputWriter.close();
responseData.put("extra", anExtra);
- Generator generator = MirGlobal.localizer().generators().makeOpenPostingGeneratorLibrary().makeGenerator(aGenerator);
+ Generator generator =
+ MirGlobal.localizer().generators().
+ makeOpenPostingGeneratorLibrary().makeGenerator(aGenerator, null);
generator.generate(anOutputWriter, responseData, getLogger());
anOutputWriter.close();
public void showProducerQueueStatus(HttpServletRequest aRequest, HttpServletResponse aResponse) {
try {
// TODO: use ServletHelper
- Generator generator = MirGlobal.localizer().generators().makeAdminGeneratorLibrary().makeGenerator("producerqueue.template");
+ Generator generator = MirGlobal.localizer().generators().
+ makeAdminGeneratorLibrary().makeGenerator("producerqueue.template", null);
Map generationData = ServletHelper.makeGenerationData(aRequest, aResponse, new Locale[] { getLocale(aRequest), getFallbackLocale(aRequest)});
generationData.put( "thisurl", "module=Producer&do=showProducerQueueStatus");