aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-07-23 09:59:59 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-07-23 10:00:11 +0200
commitfa5e05ed1f61182122c2a72d292c5f45061dba2c (patch)
tree31e730741ac323e6ca9500793d501c8f36084fd4 /sonar-core
parent543bf9e522cb581bae64b3520af36927cbffd42d (diff)
downloadsonarqube-fa5e05ed1f61182122c2a72d292c5f45061dba2c.tar.gz
sonarqube-fa5e05ed1f61182122c2a72d292c5f45061dba2c.zip
SONAR-5477 Return global settings from database in /batch/global WS
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java b/sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java
index be7e5ed7028..756ed70d824 100644
--- a/sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java
@@ -24,8 +24,8 @@ import com.google.common.base.Strings;
import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.session.SqlSession;
import org.sonar.api.BatchComponent;
-import org.sonar.core.persistence.DaoComponent;
import org.sonar.api.ServerComponent;
+import org.sonar.core.persistence.DaoComponent;
import org.sonar.core.persistence.DbSession;
import org.sonar.core.persistence.MyBatis;
@@ -74,14 +74,17 @@ public class PropertiesDao implements BatchComponent, ServerComponent, DaoCompon
public List<PropertyDto> selectGlobalProperties() {
SqlSession session = mybatis.openSession(false);
- PropertiesMapper mapper = session.getMapper(PropertiesMapper.class);
try {
- return mapper.selectGlobalProperties();
+ return selectGlobalProperties(session);
} finally {
MyBatis.closeQuietly(session);
}
}
+ public List<PropertyDto> selectGlobalProperties(SqlSession session) {
+ return session.getMapper(PropertiesMapper.class).selectGlobalProperties();
+ }
+
public PropertyDto selectGlobalProperty(String propertyKey) {
SqlSession session = mybatis.openSession(false);
PropertiesMapper mapper = session.getMapper(PropertiesMapper.class);