working on string-templated based static pages
This commit is contained in:
@@ -36,6 +36,7 @@ public class Configuration {
|
||||
|
||||
private void setDefaults() throws MalformedURLException {
|
||||
if (data == null) data = new JSONObject();
|
||||
baseDir();
|
||||
serverPort();
|
||||
tokenUrl();
|
||||
loginUrl();
|
||||
@@ -70,12 +71,22 @@ public class Configuration {
|
||||
}
|
||||
|
||||
public String clientId() {
|
||||
if (!data.containsKey(Constants.CLIENT_ID)) data.put(CLIENT_ID,"widerhall");
|
||||
if (!data.containsKey(CLIENT_ID)) data.put(CLIENT_ID,"widerhall");
|
||||
return (String) data.get(CLIENT_ID);
|
||||
}
|
||||
|
||||
public Object clientSecret() {
|
||||
if (!data.containsKey(Constants.CLIENT_SECRET)) data.put(CLIENT_SECRET,"changeme");
|
||||
if (!data.containsKey(CLIENT_SECRET)) data.put(CLIENT_SECRET,"changeme");
|
||||
return (String) data.get(CLIENT_SECRET);
|
||||
}
|
||||
|
||||
public String dbLocation() {
|
||||
if (!data.containsKey(DB_FILE)) data.put(DB_FILE,System.getProperty("user.home")+"/.config/widerhall/db.sqlite3");
|
||||
return (String) data.get(DB_FILE);
|
||||
}
|
||||
|
||||
public String baseDir() {
|
||||
if (!data.containsKey(Constants.BASE_DIR)) data.put(BASE_DIR,System.getProperty("user.dir")+"/static");
|
||||
return (String) data.get(BASE_DIR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user