some premptive merging....added FO and PDF hashes to the config template hash
authorjohn <john>
Thu, 13 Jun 2002 11:12:37 +0000 (11:12 +0000)
committerjohn <john>
Thu, 13 Jun 2002 11:12:37 +0000 (11:12 +0000)
source/mir/misc/HTMLTemplateProcessor.java

index b30f4b7..ec71fcb 100755 (executable)
@@ -32,6 +32,8 @@ public final class HTMLTemplateProcessor {
   private static String               imageHost;
   private static String               imagePath;
   private static String               openAction;
+  private static String               generateFO; 
+  private static String               generatePDF;
   protected static String producerDocRoot =
                MirConfig.getProp("Producer.DocRoot");
   protected static String producerStorageRoot =
@@ -40,7 +42,7 @@ public final class HTMLTemplateProcessor {
   //
   // init
 
-  static {
+    static {
     /** @todo either in the above block or here :) //rk */
     templateDir = MirConfig.getPropWithHome("HTMLTemplateProcessor.Dir");
     templateCache = new FileTemplateCache(templateDir);
@@ -68,6 +70,8 @@ public final class HTMLTemplateProcessor {
     imagePath = MirConfig.getProp("Producer.Image.Path");
     producerDocRoot = MirConfig.getProp("Producer.DocRoot");
     producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
+    generateFO = MirConfig.getProp("GenerateFO");    
+    generatePDF = MirConfig.getProp("GeneratePDF");
   }
 
   /**
@@ -244,7 +248,9 @@ public final class HTMLTemplateProcessor {
                configHash.put("imageHost", new SimpleScalar(imageHost));
                configHash.put("imagePath", new SimpleScalar(imagePath));
                configHash.put("mirVersion", new SimpleScalar(MirConfig.getProp("Mir.Version")));
-               // this conform to updated freemarker syntax
+               configHash.put("generateFO", new SimpleScalar(generateFO));  
+               configHash.put("generatePDF", new SimpleScalar(generatePDF));
+                // this conform to updated freemarker syntax
                configHash.put("compressWhitespace", new freemarker.template.utility.CompressWhitespace() );
 
                SimpleHash outPutHash = new SimpleHash();