diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-09-27 15:17:59 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-09-27 15:17:59 +0200 |
commit | 8872c32eec2b8bb07dba35d566f1135c50843383 (patch) | |
tree | cc6b019a7aff2f303535ddaab2486bde7c525f84 /sonar-plugin-api | |
parent | be8a52af8539dd972b081202aa569ccdc33dac40 (diff) | |
download | sonarqube-8872c32eec2b8bb07dba35d566f1135c50843383.tar.gz sonarqube-8872c32eec2b8bb07dba35d566f1135c50843383.zip |
SONAR-2602 support project modules with different languages
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java | 14 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java | 25 |
2 files changed, 0 insertions, 39 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java index 35a6e481340..59b735a0138 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java @@ -25,7 +25,6 @@ import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.hibernate.annotations.BatchSize; import org.sonar.api.database.BaseIdentifiable; -import org.sonar.api.profiles.RulesProfile; import org.sonar.api.resources.ProjectLink; import org.sonar.api.resources.Resource; @@ -99,10 +98,6 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { @BatchSize(size = 8) private List<ProjectLink> projectLinks = new ArrayList<ProjectLink>(); - @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "profile_id", updatable = true, nullable = true) - private RulesProfile rulesProfile; - /** * Default constructor */ @@ -264,14 +259,6 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { this.rootId = rootId; } - public RulesProfile getRulesProfile() { - return rulesProfile; - } - - public void setRulesProfile(RulesProfile rulesProfile) { - this.rulesProfile = rulesProfile; - } - public String getQualifier() { return qualifier; } @@ -337,7 +324,6 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { clone.setDescription(getDescription()); clone.setEnabled(getEnabled()); clone.setProjectLinks(getProjectLinks()); - clone.setRulesProfile(getRulesProfile()); clone.setLanguageKey(getLanguageKey()); clone.setCopyResourceId(getCopyResourceId()); clone.setLongName(getLongName()); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java index a06e887c02d..171f2e92219 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java @@ -91,9 +91,6 @@ public class RulesProfile implements Cloneable { @OneToMany(mappedBy = "rulesProfile", fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE}) private List<Alert> alerts = Lists.newArrayList(); - @OneToMany(mappedBy = "rulesProfile", fetch = FetchType.LAZY) - private List<ResourceModel> projects = Lists.newArrayList(); - /** * @deprecated use the factory method create() */ @@ -110,7 +107,6 @@ public class RulesProfile implements Cloneable { this.language = language; this.activeRules = Lists.newArrayList(); this.alerts = Lists.newArrayList(); - this.projects = Lists.newArrayList(); } /** @@ -291,20 +287,6 @@ public class RulesProfile implements Cloneable { } /** - * @return the list of projects attached to the profile - */ - public List<ResourceModel> getProjects() { - return projects; - } - - /** - * Sets the list of projects attached to the profile - */ - public void setProjects(List<ResourceModel> projects) { - this.projects = projects; - } - - /** * Note: disabled rules are excluded. * * @return the list of active rules for a given severity @@ -424,13 +406,6 @@ public class RulesProfile implements Cloneable { } }))); } - if (CollectionUtils.isNotEmpty(getProjects())) { - clone.setProjects(new ArrayList<ResourceModel>(CollectionUtils.collect(getProjects(), new Transformer() { - public Object transform(Object input) { - return ((ResourceModel) input).clone(); - } - }))); - } return clone; } |