Commits

Sam Adams  committed 407f9b8

Added shared QuixotePluginsModule

  • Participants
  • Parent commits 184d44a

Comments (0)

Files changed (4)

 #!/bin/bash
-mvn compile -Djetty.port=8181 jetty:run -Dchempound.workspace=/home/sea36/quixote-repo/workspace -Dchempound.uri=http://daedal.ch.cam.ac.uk:8181/
+mvn compile -Djetty.port=8181 jetty:run -Dchempound.workspace=/Users/seadams/quixote/workspace -Dchempound.uri=http://localhost:8181/

File src/main/java/uk/ac/cam/ch/wwmm/quixote/QuixoteChempoundServletConfig.java

 package uk.ac.cam.ch.wwmm.quixote;
 
 import com.google.inject.AbstractModule;
-import uk.ac.cam.ch.wwmm.chempound.compchem.CompChemModule;
-import uk.ac.cam.ch.wwmm.chempound.crystal.CrystallographyModule;
-import uk.ac.cam.ch.wwmm.chempound.plugins.jmol.JmolModule;
-import uk.ac.cam.ch.wwmm.chempound.plugins.jquery.JQueryModule;
 import uk.ac.cam.ch.wwmm.chempound.webapp.ChempoundServletConfig;
-import uk.ac.cam.ch.wwmm.chempound.webapp.search.chemistry.StructureSearchProviderModule;
 
 /**
- * @author sea36
+ * @author Sam Adams
  */
 public class QuixoteChempoundServletConfig extends ChempoundServletConfig {
 
     }
 
     protected AbstractModule getPluginsModule() {
-        return new AbstractModule() {
-            @Override
-            protected void configure() {
-
-                install(new StructureSearchProviderModule());
-                install(new CrystallographyModule());
-                install(new CompChemModule());
-
-                install(new JQueryModule());
-                install(new JmolModule());
-
-            }
-        };
+        return new QuixotePluginsModule();
     }
 
 }

File src/main/java/uk/ac/cam/ch/wwmm/quixote/QuixotePluginsModule.java

+package uk.ac.cam.ch.wwmm.quixote;
+
+import com.google.inject.AbstractModule;
+import uk.ac.cam.ch.wwmm.chempound.compchem.CompChemModule;
+import uk.ac.cam.ch.wwmm.chempound.crystal.CrystallographyModule;
+import uk.ac.cam.ch.wwmm.chempound.plugins.jmol.JmolModule;
+import uk.ac.cam.ch.wwmm.chempound.plugins.jquery.JQueryModule;
+import uk.ac.cam.ch.wwmm.chempound.webapp.search.chemistry.StructureSearchProviderModule;
+
+/**
+ * @author Sam Adams
+ */
+public class QuixotePluginsModule extends AbstractModule {
+
+    @Override
+    protected void configure() {
+        install(new StructureSearchProviderModule());
+        install(new CrystallographyModule());
+        install(new CompChemModule());
+
+        install(new JQueryModule());
+        install(new JmolModule());
+    }
+
+}

File src/main/java/uk/ac/cam/ch/wwmm/quixote/QuixoteWebappLauncher.java

 package uk.ac.cam.ch.wwmm.quixote;
 
 import com.google.inject.AbstractModule;
-import uk.ac.cam.ch.wwmm.chempound.compchem.CompChemModule;
-import uk.ac.cam.ch.wwmm.chempound.crystal.CrystallographyModule;
-import uk.ac.cam.ch.wwmm.chempound.plugins.jmol.JmolModule;
-import uk.ac.cam.ch.wwmm.chempound.plugins.jquery.JQueryModule;
 import uk.ac.cam.ch.wwmm.chempound.webapp.ChempoundWebappLauncher;
-import uk.ac.cam.ch.wwmm.chempound.webapp.search.chemistry.StructureSearchProviderModule;
 
 /**
  * @author Sam Adams
 
     @Override
     protected AbstractModule getPluginsModule() {
-        return new AbstractModule() {
-            @Override
-            protected void configure() {
-                install(new StructureSearchProviderModule());
-                install(new CrystallographyModule());
-                install(new CompChemModule());
-
-                install(new JQueryModule());
-                install(new JmolModule());
-            }
-        };
+        return new QuixotePluginsModule();
     }
 
 }