Commits

Anonymous committed 10e6345

Include splash page templates in layout, rather than separately generating output and embedding it

Comments (0)

Files changed (2)

crystallography-handler/src/main/java/net/chempound/crystal/display/CrystalStructureSplashPageWriter.java

 import net.chempound.rdf.DCTerms;
 import net.chempound.services.FreemarkerService;
 import net.chempound.webapp.output.AbstractSplashPageWriter;
+import net.chempound.webapp.output.Page;
 import org.apache.commons.io.IOUtils;
 
 import javax.inject.Inject;
     }
 
     @Override
-    public String write(final Model model, final URI aggregationUri, final Map<String, Object> map) throws IOException, TemplateException {
-        map.put("headers", headers);
+    public void write(final Model model, final URI aggregationUri, final Map<String, Object> map, final Page page) throws IOException, TemplateException {
+        page.addParam("headers", headers);
 
         final BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
         final TemplateHashModel staticModels = wrapper.getStaticModels();
 
-        map.put("DC", staticModels.get(DCTerms.class.getName()));
-        map.put("CIF", staticModels.get(Cryst.class.getName()));
-        map.put("IUCR", staticModels.get(CifDict.class.getName()));
+        page.addParam("DC", staticModels.get(DCTerms.class.getName()));
+        page.addParam("CIF", staticModels.get(Cryst.class.getName()));
+        page.addParam("IUCR", staticModels.get(CifDict.class.getName()));
 
-        return super.write(model, aggregationUri, map);
+        super.write(model, aggregationUri, map, page);
     }
 
 }

crystallography-importer/pom.xml

         <dependency>
             <groupId>sea36</groupId>
             <artifactId>JmolImageGenerator</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-cli</groupId>
+                    <artifactId>commons-cli</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>