Commits

Sam Adams  committed 4a61cc7

Move skin configuration from GlobalData to ConfigurationProperties

  • Participants
  • Parent commits 3897439

Comments (0)

Files changed (2)

File chempound-webapp/src/main/java/net/chempound/webapp/ConfigurationProperties.java

 
     private String frontPageTitle = "Chempound Repository";
 
+    private final String skinName = System.getProperty("chempound.skin", "default");
+    private final String skinFile = skinName + ".ftl";
+
     private String googleAnalyticsId;
 
     public String getTitle() {
     public void setGoogleAnalyticsId(final String googleAnalyticsId) {
         this.googleAnalyticsId = googleAnalyticsId;
     }
+
+    public String getSkinName() {
+        return skinName;
+    }
+
+    public String getSkinFile() {
+        return skinFile;
+    }
 }

File chempound-webapp/src/main/java/net/chempound/webapp/GlobalData.java

     private final TripleStore tripleStore;
     private final URI baseUri;
     private final String version = "0.2";
-    private final String skinName = "default";
-    private final String skinFile = "default.ftl";
 
     private final ConfigurationProperties data = new ConfigurationProperties();
 
     }
 
     public String getSkinName() {
-        return skinName;
+        return data.getSkinName();
     }
 
     public String getSkinFile() {
-        return skinFile;
+        return data.getSkinFile();
     }
 }