use of org.structr.api.DatabaseService in project structr by structr.
the class StructrApp method getGlobalSetting.
@Override
public <T> T getGlobalSetting(final String key, final T defaultValue) throws FrameworkException {
final DatabaseService service = getDatabaseService();
if (service != null) {
final GraphProperties config = service.getGlobalProperties();
T value = null;
if (config != null) {
value = (T) config.getProperty(key);
}
if (value == null) {
return defaultValue;
}
return value;
}
return defaultValue;
}
Aggregations