diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-10-10 11:01:35 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-10-10 11:02:52 +0200 |
commit | 2800245cbd33f1932845276d3e6ea71c66da4f95 (patch) | |
tree | f3ecb64fc92f2337af66a7363b98be36c5ecc752 /sonar-batch/src/main/java | |
parent | 6c893bdf78ae76ae1df181923b647591522b0510 (diff) | |
download | sonarqube-2800245cbd33f1932845276d3e6ea71c66da4f95.tar.gz sonarqube-2800245cbd33f1932845276d3e6ea71c66da4f95.zip |
SONAR-2861 Remove unused classes ResourceDatabaseConfiguration and ProjectConfiguration
Diffstat (limited to 'sonar-batch/src/main/java')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java deleted file mode 100644 index 5e74b027b45..00000000000 --- a/sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2011 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.batch; - -import org.apache.commons.configuration.*; -import org.sonar.api.batch.bootstrap.ProjectDefinition; -import org.sonar.api.batch.bootstrap.ProjectReactor; -import org.sonar.api.database.DatabaseSession; - -public class ProjectConfiguration extends CompositeConfiguration { - private PropertiesConfiguration runtimeConfiguration; - - /** - * Used during batch startup - */ - public ProjectConfiguration(DatabaseSession session, ProjectReactor projectReactor) { - this(session, projectReactor.getRoot()); - } - - public ProjectConfiguration(DatabaseSession session, ProjectDefinition project) { - runtimeConfiguration = new PropertiesConfiguration(); - addConfiguration(runtimeConfiguration); - - loadSystemSettings(); - loadProjectDatabaseSettings(session, project); - addConfiguration(new MapConfiguration(project.getProperties())); - loadGlobalDatabaseSettings(session); - } - - private void loadProjectDatabaseSettings(DatabaseSession session, ProjectDefinition project) { - addConfiguration(new ResourceDatabaseConfiguration(session, project.getKey())); - - ProjectDefinition parent = project.getParent(); - while (parent != null && parent.getKey() != null) { - addConfiguration(new ResourceDatabaseConfiguration(session, parent.getKey())); - parent = parent.getParent(); - } - } - - private void loadGlobalDatabaseSettings(DatabaseSession session) { - addConfiguration(new org.sonar.api.database.configuration.DatabaseConfiguration(session)); - } - - private void loadSystemSettings() { - addConfiguration(new SystemConfiguration()); - addConfiguration(new EnvironmentConfiguration()); - } - - @Override - public void setProperty(String s, Object o) { - runtimeConfiguration.setProperty(s, o); - } -} |