summaryrefslogtreecommitdiffstats
path: root/sonar-batch/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-12-22 13:52:31 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2011-12-22 13:52:33 +0100
commit5d02d93ba42efbf926d25126f746a632b922b1ca (patch)
tree5a19985b2f25f0c5ebdb03d71d5a4c7e28a338b3 /sonar-batch/src
parent84171b67f487307059cce507f41fd03dbfdcbc4b (diff)
downloadsonarqube-5d02d93ba42efbf926d25126f746a632b922b1ca.tar.gz
sonarqube-5d02d93ba42efbf926d25126f746a632b922b1ca.zip
Refactor the packages of sonar-core
* The root package should be org.sonar.core -> org.sonar.persistence is moved to org.sonar.core.persistence * Classes are grouped by functional domain (resource, review, rule, ...)
Diffstat (limited to 'sonar-batch/src')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java8
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java4
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java8
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java2
8 files changed, 13 insertions, 17 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java
index 55871f76d0d..b370c60da98 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java
@@ -20,7 +20,7 @@
package org.sonar.batch.bootstrap;
import org.sonar.api.config.Settings;
-import org.sonar.persistence.DefaultDatabase;
+import org.sonar.core.persistence.DefaultDatabase;
import java.util.Properties;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java
index 0dbe5c95b97..7c4b48d6929 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java
@@ -29,10 +29,10 @@ import org.sonar.batch.ProjectConfigurator;
import org.sonar.batch.ProjectTree;
import org.sonar.batch.components.*;
import org.sonar.batch.index.*;
-import org.sonar.core.components.CacheMetricFinder;
-import org.sonar.core.components.CacheRuleFinder;
-import org.sonar.core.components.DefaultUserFinder;
-import org.sonar.core.notifications.DefaultNotificationManager;
+import org.sonar.core.metric.CacheMetricFinder;
+import org.sonar.core.notification.DefaultNotificationManager;
+import org.sonar.core.rule.CacheRuleFinder;
+import org.sonar.core.user.DefaultUserFinder;
import org.sonar.jpa.dao.MeasuresDao;
/**
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
index 62990dc1eef..21f6824c713 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
@@ -30,8 +30,8 @@ import org.sonar.batch.config.BatchSettingsEnhancer;
import org.sonar.jpa.session.DatabaseSessionProvider;
import org.sonar.jpa.session.DefaultDatabaseConnector;
import org.sonar.jpa.session.ThreadLocalDatabaseSessionFactory;
-import org.sonar.persistence.DaoUtils;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.DaoUtils;
+import org.sonar.core.persistence.MyBatis;
import java.net.URLClassLoader;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java
index 134c0b0f6d9..99c6c156174 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java
@@ -39,7 +39,7 @@ import org.sonar.batch.index.DefaultIndex;
import org.sonar.batch.index.DefaultResourcePersister;
import org.sonar.batch.phases.Phases;
import org.sonar.batch.phases.PhasesTimeProfiler;
-import org.sonar.core.components.DefaultModelFinder;
+import org.sonar.core.qualitymodel.DefaultModelFinder;
import org.sonar.jpa.dao.DaoFacade;
import org.sonar.jpa.dao.ProfilesDao;
import org.sonar.jpa.dao.RulesDao;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
index 278183cc6ae..a681b32dabf 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
@@ -27,7 +27,7 @@ import org.sonar.api.database.model.ResourceModel;
import org.sonar.api.database.model.Snapshot;
import org.sonar.api.resources.*;
import org.sonar.api.utils.SonarException;
-import org.sonar.persistence.resource.ResourceIndexerDao;
+import org.sonar.core.resource.ResourceIndexerDao;
import javax.persistence.NonUniqueResultException;
import javax.persistence.Query;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
index 8f5c8a14e5c..7a7877287ea 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
@@ -26,7 +26,7 @@ import org.sonar.api.resources.JavaPackage;
import org.sonar.api.resources.Library;
import org.sonar.api.resources.Project;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
-import org.sonar.persistence.resource.ResourceIndexerDao;
+import org.sonar.core.resource.ResourceIndexerDao;
import java.text.ParseException;
import java.text.SimpleDateFormat;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
index a1bf89534d4..3d1508676bd 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
@@ -20,7 +20,6 @@
package org.sonar.batch.index;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.sonar.api.database.model.MeasureModel;
import org.sonar.api.database.model.Snapshot;
@@ -31,19 +30,16 @@ import org.sonar.api.measures.PersistenceMode;
import org.sonar.api.resources.JavaFile;
import org.sonar.api.resources.JavaPackage;
import org.sonar.api.resources.Project;
-import org.sonar.core.components.DefaultRuleFinder;
+import org.sonar.core.rule.DefaultRuleFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import java.util.List;
-import static org.hamcrest.CoreMatchers.anyOf;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
public class MeasurePersisterTest extends AbstractDbUnitTestCase {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
index dcedc0b8c75..d7d211fab8d 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
@@ -25,7 +25,7 @@ import org.sonar.api.database.model.Snapshot;
import org.sonar.batch.ServerMetadata;
import org.sonar.batch.index.DefaultResourcePersister;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
-import org.sonar.persistence.resource.ResourceIndexerDao;
+import org.sonar.core.resource.ResourceIndexerDao;
import javax.persistence.Query;