]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5369 Rename DB column RULES.CARDINALITY to RULES.IS_TEMPLATE
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 12 Jun 2014 12:35:01 +0000 (14:35 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 12 Jun 2014 12:35:10 +0000 (14:35 +0200)
99 files changed:
plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml
plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml
plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml
sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml
sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/sharedFixture.xml
sonar-check-api/src/main/java/org/sonar/check/Cardinality.java
sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
sonar-core/src/main/java/org/sonar/core/rule/RuleDto.java
sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml
sonar-core/src/test/resources/org/sonar/core/rule/CacheRuleFinderTest/shared.xml
sonar-core/src/test/resources/org/sonar/core/rule/DefaultRuleFinderTest/shared.xml
sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/insert-result.xml
sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/insert_all-result.xml
sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/update-result.xml
sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/update.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldCountNumberOfRulesOfACategoryForGivenPlugins.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRules.xml
sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java
sonar-server/src/main/java/org/sonar/server/qualityprofile/RuleActivator.java
sonar-server/src/main/java/org/sonar/server/qualityprofile/RuleActivatorContext.java
sonar-server/src/main/java/org/sonar/server/rule/DeprecatedRulesDefinition.java
sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java
sonar-server/src/main/java/org/sonar/server/rule/RuleCreator.java
sonar-server/src/main/java/org/sonar/server/rule/index/RuleNormalizer.java
sonar-server/src/main/webapp/WEB-INF/db/migrate/545_rename_rules_cardinality_to_is_template.rb [new file with mode: 0644]
sonar-server/src/test/java/org/sonar/server/qualityprofile/ActiveRuleBackendMediumTest.java
sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsMediumTest.java
sonar-server/src/test/java/org/sonar/server/rule/RuleBackendMediumTest.java
sonar-server/src/test/java/org/sonar/server/rule/RuleCreatorMediumTest.java
sonar-server/src/test/java/org/sonar/server/rule/RuleServiceMediumTest.java
sonar-server/src/test/java/org/sonar/server/rule/RuleTesting.java
sonar-server/src/test/java/org/sonar/server/rule/db/RuleDaoTest.java
sonar-server/src/test/java/org/sonar/server/rule/index/RuleIndexMediumTest.java
sonar-server/src/test/java/org/sonar/server/rule/ws/CreateActionMediumTest.java
sonar-server/src/test/java/org/sonar/server/rule/ws/RulesWebServiceTest.java
sonar-server/src/test/java/org/sonar/server/rule/ws/UpdateActionMediumTest.java
sonar-server/src/test/resources/org/sonar/server/qualityprofile/db/ActiveRuleDaoTest/empty.xml
sonar-server/src/test/resources/org/sonar/server/qualityprofile/db/ActiveRuleDaoTest/insert_parameter.xml
sonar-server/src/test/resources/org/sonar/server/qualityprofile/db/ActiveRuleDaoTest/shared.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_deprecated_active_rule_params-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_deprecated_active_rule_params.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_deprecated_active_rules-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_deprecated_active_rules.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_deprecated_repositories-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_deprecated_rules-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_deprecated_rules.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_template_rules_if_parent_is_disabled-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/disable_template_rules_if_parent_is_disabled.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/ignore_rule_debt_definitions_if_rule_is_linked_on_root_characteristic.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/insert_extended_repositories-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/insert_new_rules-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/not_disable_already_disabled_rules-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/not_disable_already_disabled_rules.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/not_disable_manual_rules-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/not_disable_manual_rules.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/not_disable_template_rules_if_parent_is_enabled-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/not_disable_template_rules_if_parent_is_enabled.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/not_update_already_disabled_rules-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/not_update_already_disabled_rules.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/notify_for_removed_rules_when_repository_is_still_existing.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/reactivate_disabled_rules-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/reactivate_disabled_rules.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/reactivate_disabled_template_rules-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/reactivate_disabled_template_rules.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/set_no_characteristic_when_characteristic_not_found-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/set_no_characteristic_when_characteristic_not_found.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/set_no_characteristic_when_default_characteristic_not_found_and_overriding_characteristic_disabled-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/set_no_characteristic_when_default_characteristic_not_found_and_overriding_characteristic_disabled.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/set_no_default_characteristic_when_default_characteristic_not_found_but_characteristic_has_been_overridden-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/set_no_default_characteristic_when_default_characteristic_not_found_but_characteristic_has_been_overridden.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/shared.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/store_bundle_name_and_description_in_database-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/update_rule_fields-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/update_rule_fields.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/update_rule_parameters-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/update_rule_parameters.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/update_template_rule_language-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/RegisterRulesTest/update_template_rule_language.xml
sonar-server/src/test/resources/org/sonar/server/rule/db/RuleDaoTest/insert-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/db/RuleDaoTest/insert_all-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/db/RuleDaoTest/insert_parameter-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/db/RuleDaoTest/insert_parameter.xml
sonar-server/src/test/resources/org/sonar/server/rule/db/RuleDaoTest/update-result.xml
sonar-server/src/test/resources/org/sonar/server/rule/db/RuleDaoTest/update.xml
sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset.xml
sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset_result.xml
sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules.xml
sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules_result.xml
sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed.xml
sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed_result.xml

index 5720305680255d01c9fdeba4f53b2618493545fb..5800859154cf44e3065369ea20c1557167f52498 100644 (file)
@@ -2,11 +2,11 @@
 
   <rules tags="[null]" system_tags="[null]" id="30" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck"
          plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY"
-         cardinality="SINGLE" template_id="[null]"/>
+         is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="31" name="Equals Avoid Null" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"
          plugin_config_key="Checker/TreeWalker/EqualsAvoidNull" plugin_name="checkstyle" description="[null]" priority="4" status="READY"
-         cardinality="SINGLE" template_id="[null]"/>
+         is_template="[false]" template_id="[null]"/>
 
   <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]"
             name="Bar" long_name="org.foo.Bar" description="[null]"
index 5f5bc4b4f7181cfd1504122a349b4777ca455f6e..f0d25f8474ad6988c233be4739df86ca7c201119 100644 (file)
@@ -2,11 +2,11 @@
 
   <rules tags="[null]" system_tags="[null]" id="30" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck"
          plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY"
-         cardinality="SINGLE" template_id="[null]"/>
+         is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="31" name="Equals Avoid Null" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"
          plugin_config_key="Checker/TreeWalker/EqualsAvoidNull" plugin_name="checkstyle" description="[null]" priority="4" status="READY"
-         cardinality="SINGLE" template_id="[null]"/>
+         is_template="[false]" template_id="[null]"/>
 
   <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]"
             name="Bar" long_name="org.foo.Bar" description="[null]"
index 2180e5a7bfe0724660ed63cea78ce7faf21ca507..9f3c7d89b524854cb68e45eeb63f332d38f4e413 100644 (file)
@@ -1,11 +1,11 @@
 <dataset>
   <rules tags="[null]" system_tags="[null]" id="30" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck"
          plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY"
-         cardinality="SINGLE" template_id="[null]"/>
+         is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="31" name="Equals Avoid Null" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"
          plugin_config_key="Checker/TreeWalker/EqualsAvoidNull" plugin_name="checkstyle" description="[null]" priority="4" status="READY"
-         cardinality="SINGLE" template_id="[null]"/>
+         is_template="[false]" template_id="[null]"/>
 
   <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]"
             name="Bar" long_name="org.foo.Bar" description="[null]"
index cc8a95653fc3f733a57df182cae52f8317bd575d..04dff250c1f67841bb105a7101dfffc751a87d0f 100644 (file)
@@ -8,11 +8,11 @@
 
   <rules tags="[null]" system_tags="[null]" id="30" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck"
          plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY"
-         cardinality="SINGLE" template_id="[null]"/>
+         is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="31" name="Equals Avoid Null" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"
          plugin_config_key="Checker/TreeWalker/EqualsAvoidNull" plugin_name="checkstyle" description="[null]" priority="4" status="READY"
-         cardinality="SINGLE" template_id="[null]"/>
+         is_template="[false]" template_id="[null]"/>
 
   <!-- project -->
   <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project"
index d0b7b281116db2aef2cb8b5d2526c819bcf3c189..7e02ec9e9ed3340adf8b79e44a704dee454d8451 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
   <rules tags="[null]" system_tags="[null]" id="1" name="foo" plugin_config_key="checker/foo" plugin_rule_key="checkstyle.rule1"
-         plugin_name="maven-checkstyle-plugin" description="description" cardinality="SINGLE" template_id="[null]"/>
+         plugin_name="maven-checkstyle-plugin" description="description" is_template="[false]" template_id="[null]"/>
  
   <metrics delete_historical_data="[null]" id="1" name="ncloc" val_type="INT" description="[null]"  domain="[null]"
            short_name="" qualitative="false" user_managed="false" enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
index a572b923f3571d78fafd97dda10d5f08be2a5b60..59e5a1936d4a3811794452101e433e609dcd66d2 100644 (file)
@@ -21,7 +21,9 @@ package org.sonar.check;
 
 /**
  * @since 2.3
+ * @deprecated since 4.4
  */
+@Deprecated
 public enum Cardinality {
   SINGLE, MULTIPLE
 }
index bd3d49c539186e62de3358cec1f700928aa90bf1..27bde939cd38fe4db95adccc7b92c0612161f7f8 100644 (file)
@@ -33,7 +33,7 @@ import java.util.List;
  */
 public class DatabaseVersion implements BatchComponent, ServerComponent {
 
-  public static final int LAST_VERSION = 544;
+  public static final int LAST_VERSION = 545;
 
   public static enum Status {
     UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL
index e0c9c75dda3ccb558eb245a8ed769a755d03f5a9..e1859e925e3b7a92a96b250e70367d5b30b90166 100644 (file)
@@ -26,7 +26,6 @@ import org.apache.commons.lang.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.Dto;
 
 import javax.annotation.CheckForNull;
@@ -46,7 +45,7 @@ public final class RuleDto extends Dto<RuleKey> {
   private String name;
   private String configKey;
   private Integer severity;
-  private Cardinality cardinality;
+  private boolean isTemplate;
   private String language;
   private Integer templateId;
   private String noteData;
@@ -157,12 +156,12 @@ public final class RuleDto extends Dto<RuleKey> {
     return this;
   }
 
-  public Cardinality getCardinality() {
-    return cardinality;
+  public boolean isTemplate() {
+    return isTemplate;
   }
 
-  public RuleDto setCardinality(@Nullable Cardinality cardinality) {
-    this.cardinality = cardinality;
+  public RuleDto setIsTemplate(boolean isTemplate) {
+    this.isTemplate = isTemplate;
     return this;
   }
 
index 5574aa55a942c6463b53a599019b0efdc4656f8e..7ae350296b67bcca0da1fbe25bba89daf3495508 100644 (file)
@@ -239,6 +239,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('541');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('542');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('543');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('544');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('545');
 
 INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null);
 ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
index ddd8a236ec8a120f1d775b765f41a513dce1d41f..be5dfd5a49917b8fb8856f104f5384112af8d2ae 100644 (file)
@@ -134,7 +134,7 @@ CREATE TABLE "RULES" (
   "PLUGIN_NAME" VARCHAR(255) NOT NULL,
   "DESCRIPTION" VARCHAR(16777215),
   "PRIORITY" INTEGER,
-  "CARDINALITY" VARCHAR(10),
+  "IS_TEMPLATE" BOOLEAN,
   "TEMPLATE_ID" INTEGER,
   "PLUGIN_CONFIG_KEY" VARCHAR(500),
   "NAME" VARCHAR(200),
index dbd8278ea3118bf96f437e4bbe2ee9052e4d3a3d..b95f1b268d544b9e4f3c5a2659d2ec213bf73672 100644 (file)
@@ -12,7 +12,7 @@
     r.name,
     r.plugin_config_key as "configKey",
     r.priority as "severity",
-    r.cardinality,
+    r.is_template as "isTemplate",
     r.language as "language",
     r.template_id as "templateId",
     r.note_data as "noteData",
@@ -79,7 +79,7 @@
     name=#{name},
     plugin_config_key=#{configKey},
     priority=#{severity},
-    cardinality=#{cardinality},
+    is_template=#{isTemplate},
     language=#{language},
     template_id=#{templateId},
     note_data=#{noteData},
   </update>
 
   <sql id="insertColumns">
-    (plugin_rule_key, plugin_name, description, status, name, plugin_config_key, priority, cardinality, language, template_id,
+    (plugin_rule_key, plugin_name, description, status, name, plugin_config_key, priority, is_template, language, template_id,
     characteristic_id, default_characteristic_id, remediation_function, default_remediation_function,
     remediation_coeff, default_remediation_coeff, remediation_offset, default_remediation_offset,
     effort_to_fix_description, tags, system_tags, note_data, note_user_login, note_created_at, note_updated_at,
   <insert id="insert" parameterType="Rule" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
     insert into rules <include refid="insertColumns"/>
     values (#{ruleKey}, #{repositoryKey}, #{description}, #{status}, #{name}, #{configKey},
-      #{severity}, #{cardinality}, #{language}, #{templateId},
+      #{severity}, #{isTemplate}, #{language}, #{templateId},
       #{subCharacteristicId}, #{defaultSubCharacteristicId}, #{remediationFunction}, #{defaultRemediationFunction},
       #{remediationCoefficient}, #{defaultRemediationCoefficient}, #{remediationOffset}, #{defaultRemediationOffset},
       #{effortToFixDescription}, #{tagsField}, #{systemTagsField}, #{noteData}, #{noteUserLogin}, #{noteCreatedAt},
   <insert id="batchInsert" parameterType="Rule" useGeneratedKeys="false">
     insert into rules <include refid="insertColumns"/>
     values (#{ruleKey}, #{repositoryKey}, #{description}, #{status}, #{name}, #{configKey},
-    #{severity}, #{cardinality}, #{language}, #{templateId},
+    #{severity}, #{isTemplate}, #{language}, #{templateId},
     #{subCharacteristicId}, #{defaultSubCharacteristicId}, #{remediationFunction}, #{defaultRemediationFunction},
     #{remediationCoefficient}, #{defaultRemediationCoefficient}, #{remediationOffset}, #{defaultRemediationOffset},
     #{effortToFixDescription}, #{tagsField}, #{systemTagsField}, #{noteData}, #{noteUserLogin}, #{noteCreatedAt},
index 7a2f0f1dd4e59aa207f7c1a2b7a87d3580fc4436..f01f4cf5fc0b1d84c52a84c9c62498b9ab26a58b 100644 (file)
@@ -2,17 +2,17 @@
   <!-- CHECKSTYLE -->
 
   <rules tags="[null]" system_tags="[null]" id="1" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck"
-         plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY"  cardinality="SINGLE" template_id="[null]"/>
+         plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY"  is_template="[false]" template_id="[null]"/>
 
   <!-- disabled rule -->
   <rules tags="[null]" system_tags="[null]" id="2" name="Disabled checked" plugin_rule_key="DisabledCheck"
-         plugin_config_key="Checker/Treewalker/DisabledCheck" plugin_name="checkstyle" description="[null]" priority="4" status="REMOVED" cardinality="SINGLE" template_id="[null]" />
+         plugin_config_key="Checker/Treewalker/DisabledCheck" plugin_name="checkstyle" description="[null]" priority="4" status="REMOVED" is_template="[false]" template_id="[null]" />
 
   <rules tags="[null]" system_tags="[null]" id="3" name="Check Annotation" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck"
-         plugin_config_key="Checker/Treewalker/AnnotationUseStyleCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY" cardinality="SINGLE" template_id="[null]" />
+         plugin_config_key="Checker/Treewalker/AnnotationUseStyleCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY" is_template="[false]" template_id="[null]" />
 
 
   <!-- PMD -->
   <rules tags="[null]" system_tags="[null]" id="4" name="Call Super First" plugin_rule_key="CallSuperFirst"
-         plugin_config_key="rulesets/android.xml/CallSuperFirst" plugin_name="pmd" description="[null]" priority="2" status="READY" cardinality="SINGLE" template_id="[null]" />
+         plugin_config_key="rulesets/android.xml/CallSuperFirst" plugin_name="pmd" description="[null]" priority="2" status="READY" is_template="[false]" template_id="[null]" />
 </dataset>
index 7a2f0f1dd4e59aa207f7c1a2b7a87d3580fc4436..f01f4cf5fc0b1d84c52a84c9c62498b9ab26a58b 100644 (file)
@@ -2,17 +2,17 @@
   <!-- CHECKSTYLE -->
 
   <rules tags="[null]" system_tags="[null]" id="1" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck"
-         plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY"  cardinality="SINGLE" template_id="[null]"/>
+         plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY"  is_template="[false]" template_id="[null]"/>
 
   <!-- disabled rule -->
   <rules tags="[null]" system_tags="[null]" id="2" name="Disabled checked" plugin_rule_key="DisabledCheck"
-         plugin_config_key="Checker/Treewalker/DisabledCheck" plugin_name="checkstyle" description="[null]" priority="4" status="REMOVED" cardinality="SINGLE" template_id="[null]" />
+         plugin_config_key="Checker/Treewalker/DisabledCheck" plugin_name="checkstyle" description="[null]" priority="4" status="REMOVED" is_template="[false]" template_id="[null]" />
 
   <rules tags="[null]" system_tags="[null]" id="3" name="Check Annotation" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck"
-         plugin_config_key="Checker/Treewalker/AnnotationUseStyleCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY" cardinality="SINGLE" template_id="[null]" />
+         plugin_config_key="Checker/Treewalker/AnnotationUseStyleCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY" is_template="[false]" template_id="[null]" />
 
 
   <!-- PMD -->
   <rules tags="[null]" system_tags="[null]" id="4" name="Call Super First" plugin_rule_key="CallSuperFirst"
-         plugin_config_key="rulesets/android.xml/CallSuperFirst" plugin_name="pmd" description="[null]" priority="2" status="READY" cardinality="SINGLE" template_id="[null]" />
+         plugin_config_key="rulesets/android.xml/CallSuperFirst" plugin_name="pmd" description="[null]" priority="2" status="READY" is_template="[false]" template_id="[null]" />
 </dataset>
index 37acd6276dc22ab8fc8d755f1ad92470eb760cee..56f9fbc44adf3438ae68b0da02e861f530f8df8f 100644 (file)
@@ -1,27 +1,7 @@
-<!--
-  ~ SonarQube, open source software quality management tool.
-  ~ Copyright (C) 2008-2014 SonarSource
-  ~ mailto:contact AT sonarsource DOT com
-  ~
-  ~ SonarQube 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.
-  ~
-  ~ SonarQube 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 this program; if not, write to the Free Software Foundation,
-  ~ Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-  -->
-
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
-         plugin_config_key="NewConfigKey" priority="0" cardinality="MULTIPLE" language="dart" created_at="2013-12-16" updated_at="2013-12-17" template_id="3"
+         plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" created_at="2013-12-16" updated_at="2013-12-17" template_id="3"
          note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
          characteristic_id="100" default_characteristic_id="101"
          remediation_function="linear" default_remediation_function="linear_offset"
index 065d4ce07556bf2f3d34f029a7f14f874292472c..22178ac22b8b0ec8bc3166cfd085b8ef0dfc0111 100644 (file)
@@ -21,7 +21,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
-         plugin_config_key="NewConfigKey" priority="0" cardinality="MULTIPLE" language="dart" created_at="2013-12-16" updated_at="2013-12-17" template_id="3"
+         plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" created_at="2013-12-16" updated_at="2013-12-17" template_id="3"
          note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
          characteristic_id="100" default_characteristic_id="101"
          remediation_function="linear" default_remediation_function="linear_offset"
@@ -31,7 +31,7 @@
       />
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="NewRuleKey2" plugin_name="plugin2" name="new name2" description="new description2" status="BETA"
-         plugin_config_key="NewConfigKey2" priority="2" cardinality="SINGLE" language="js" created_at="2013-12-14" updated_at="2013-12-15" template_id="[null]"
+         plugin_config_key="NewConfigKey2" priority="2" is_template="[false]" language="js" created_at="2013-12-14" updated_at="2013-12-15" template_id="[null]"
          note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
          characteristic_id="102" default_characteristic_id="103"
          remediation_function="linear_offset" default_remediation_function="linear"
index 0ebcdfb5da6f6d8705097467af28e695135ebb87..514786e0dc025183ef07bc3b3dc4c3d407dc49db 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
-    plugin_config_key="NewConfigKey" priority="0" cardinality="MULTIPLE" language="dart" created_at="2011-04-25 01:05:00" updated_at="2013-12-17" template_id="3"
+    plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" created_at="2011-04-25 01:05:00" updated_at="2013-12-17" template_id="3"
     note_data="My note" note_user_login="admin" note_created_at="2013-12-19" note_updated_at="2013-12-20"
     characteristic_id="100" default_characteristic_id="101"
     remediation_function="linear" default_remediation_function="linear_offset"
   />
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="Parent1" plugin_name="checkstyle" name="Parent Rule 1" description="Parent Rule 1" status="READY"
-    plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" updated_at="[null]" template_id="[null]"
+    plugin_config_key="Parent1" priority="2" is_template="[false]" language="golo" created_at="1981-10-24 15:20:00" updated_at="[null]" template_id="[null]"
     note_created_at="[null]" note_data="[null]" note_updated_at="[null]" note_user_login="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="Parent2" plugin_name="checkstyle" name="Parent Rule 2" description="Parent Rule 2" status="READY"
-    plugin_config_key="Parent2" priority="2" cardinality="SINGLE" language="dart" created_at="1982-12-14 03:15:00" updated_at="[null]" template_id="[null]"
+    plugin_config_key="Parent2" priority="2" is_template="[false]" language="dart" created_at="1982-12-14 03:15:00" updated_at="[null]" template_id="[null]"
     note_created_at="[null]" note_data="[null]" note_updated_at="[null]" note_user_login="[null]"/>
 
 </dataset>
index ff2d0c693f41f18a61a3dee0e468265d68379dcb..d4979390cdf9c7670863b146827f72174c6d9e1d 100644 (file)
@@ -1,12 +1,12 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY"
-    plugin_config_key="AvoidNull" priority="2" cardinality="SINGLE" language="golo" created_at="2011-04-25 01:05:00" template_id="2"/>
+    plugin_config_key="AvoidNull" priority="2" is_template="[false]" language="golo" created_at="2011-04-25 01:05:00" template_id="2"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="Parent1" plugin_name="checkstyle" name="Parent Rule 1" description="Parent Rule 1" status="READY"
-    plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" />
+    plugin_config_key="Parent1" priority="2" is_template="[false]" language="golo" created_at="1981-10-24 15:20:00" />
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="Parent2" plugin_name="checkstyle" name="Parent Rule 2" description="Parent Rule 2" status="READY"
-    plugin_config_key="Parent2" priority="2" cardinality="SINGLE" language="dart" created_at="1982-12-14 03:15:00" />
+    plugin_config_key="Parent2" priority="2" is_template="[false]" language="dart" created_at="1982-12-14 03:15:00" />
 
 </dataset>
index bf45c5a92c17bf42f7c143cf393e6827e03fbfff..43f9ba1217a75fe01f8dea33a9f6a4ed5ad509c9 100644 (file)
@@ -1,14 +1,14 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" name="rule one" description="desc" plugin_config_key="config"
-         plugin_rule_key="rule_one" plugin_name="plugin1" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="rule_one" plugin_name="plugin1" status="READY" is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" name="rule two" description="desc" plugin_config_key="config"
-         plugin_rule_key="rule_two" plugin_name="plugin2" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="rule_two" plugin_name="plugin2" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="3" name="rule three" description="desc" plugin_config_key="config"
-         plugin_rule_key="rule_three" plugin_name="plugin2" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="rule_three" plugin_name="plugin2" status="READY" is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="4" name="rule 4" description="desc" plugin_config_key="config"
-         plugin_rule_key="rule_4" plugin_name="plugin2" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="rule_4" plugin_name="plugin2" status="READY" is_template="[false]" template_id="[null]"/>
 
 </dataset>
index 32fc897bb0797872fa7450f935f89d243528452f..c9466ae86055ed8fc95ee1a763828db8390002a0 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" name="rule1" description="desc" plugin_config_key="config"
-         plugin_rule_key="key1" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="key1" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
 
   <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="REGULAR_EXPRESSION"/>
   <rules_parameters id="2" rule_id="1" name="param2" description="[null]" param_type="REGULAR_EXPRESSION"/>
index b132f040e0eb3aff70ee37238895daea80db01ef..09b9dc7369132fedd91c21594705ebebd723cfab 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" name="rule1" description="desc" plugin_config_key="config"
-         plugin_rule_key="key1" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="key1" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
 
   <rules_parameters id="1" rule_id="1" name="param1" description="foo" param_type="REGULAR_EXPRESSION"/>
   <rules_parameters id="2" rule_id="1" name="param2" description="foo" param_type="REGULAR_EXPRESSION"/>
index 1ec9a6dc34c24d10cb6400a18d4c6c59c5f290a5..8beeb398505b35fd6f1a781f42a32d1d5532b0ef 100644 (file)
@@ -4,11 +4,11 @@
   <rules_profiles id="2" name="profile two" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" name="foo" description="test" plugin_config_key="checker/foo"
-         plugin_rule_key="checkstyle.rule1" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule1" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="2" name="bar" description="test" plugin_config_key="checker/bar"
-         plugin_rule_key="checkstyle.rule2" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule2" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="3" name="baz" description="test" plugin_config_key="checker/baz"
-         plugin_rule_key="checkstyle.rule3" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule3" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
 
   <active_rules created_at="[null]" updated_at="[null]" id="1" profile_id="1" rule_id="1" failure_level="2"/>
   <active_rules created_at="[null]" updated_at="[null]" id="2" profile_id="1" rule_id="2" failure_level="2"/>
index 6ac597e4d68d50458f6f5760af4a786652ac0685..8174c814f69f4788eada00e4761a5a32372f594a 100644 (file)
@@ -4,11 +4,11 @@
   <rules_profiles id="2" name="profile two" language="java" />
 
   <rules tags="[null]" system_tags="[null]" id="1" name="foo" description="test" plugin_config_key="checker/foo"
-         plugin_rule_key="checkstyle.rule1" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule1" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="2" name="bar" description="test" plugin_config_key="checker/bar"
-         plugin_rule_key="checkstyle.rule2" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule2" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="3" name="baz" description="test" plugin_config_key="checker/baz"
-         plugin_rule_key="checkstyle.rule3" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule3" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
 
   <active_rules created_at="[null]" updated_at="[null]" id="1" profile_id="1" rule_id="1" failure_level="2"/>
   <active_rules created_at="[null]" updated_at="[null]" id="2" profile_id="1" rule_id="2" failure_level="2"/>
index 313eca0af8948680ff1d7d757885529f28942ad1..db8f5e5504541af41dc3e60df916350bb0f44c90 100644 (file)
@@ -4,11 +4,11 @@
   <rules_profiles id="2" name="profile two" language="java" />
 
   <rules tags="[null]" system_tags="[null]" id="1" name="foo" description="test" plugin_config_key="checker/foo"
-         plugin_rule_key="checkstyle.rule1" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule1" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="2" name="bar" description="test" plugin_config_key="checker/bar"
-         plugin_rule_key="checkstyle.rule2" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule2" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="3" name="baz" description="test" plugin_config_key="checker/baz"
-         plugin_rule_key="checkstyle.rule3" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule3" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
 
   <active_rules created_at="[null]" updated_at="[null]" id="1" profile_id="1" rule_id="1" failure_level="2"/>
   <active_rules created_at="[null]" updated_at="[null]" id="2" profile_id="1" rule_id="2" failure_level="2"/>
index 60e1ebdffee3b896c205c0c9235afed10bbf29c2..320cd40bc851238830ec9a548a542d57790a9a93 100644 (file)
@@ -2,9 +2,9 @@
 
   <!-- Rules -->
   <rules tags="[null]" system_tags="[null]" id="1" name="new1" description="test1" plugin_config_key="checker/new1"
-         plugin_rule_key="checkstyle.new1" plugin_name="PLUGIN_KEY" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.new1" plugin_name="PLUGIN_KEY" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="2" name="new2" description="test2" plugin_config_key="checker/new2"
-         plugin_rule_key="checkstyle.new2" plugin_name="PLUGIN_KEY" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.new2" plugin_name="PLUGIN_KEY" status="READY" is_template="[false]" template_id="[null]"/>
 
   <!-- Rules parameters -->
   <rules_parameters id="1" rule_id="1" name="rule1_param1" description="rule1_desc1" param_type="REGULAR_EXPRESSION"
index 433c39c0a1a6ef35a5b093c46d291e4bcfd6e16d..5aa92b98b74a3c5f328788eed80c43de00823e2a 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" name="foo" description="test" plugin_config_key="checker/foo"
-         plugin_rule_key="checkstyle.rule1" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="checkstyle.rule1" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
 
 </dataset>
index 38f56f74b4ebfcb4c5c7657ba862824b7d9d4344..e1fc3119b249990894209a62f0a6e6ae5597ce20 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" name="rule one" description="desc" plugin_config_key="other config"
-         plugin_rule_key="rule_one" plugin_name="plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="rule_one" plugin_name="plugin" status="READY" is_template="[false]" template_id="[null]"/>
   <rules tags="[null]" system_tags="[null]" id="2" name="rule two" description="desc" plugin_config_key="config"
-         plugin_rule_key="rule_two" plugin_name="other plugin" status="READY" cardinality="SINGLE" template_id="[null]"/>
+         plugin_rule_key="rule_two" plugin_name="other plugin" status="READY" is_template="[false]" template_id="[null]"/>
 
   <rules_parameters id="1" rule_id="1" name="rule1_param1" description="rule1_desc1" param_type="REGULAR_EXPRESSION"
       />
index a8592b81a2280da5bfc1746a87d2c1127b1f6274..63cb14defffa03a8cfbe36b04b2085bb8a82a4f1 100644 (file)
@@ -107,8 +107,8 @@ public class Rule {
   private String pluginName;
 
   @Enumerated(EnumType.STRING)
-  @Column(name = "cardinality", updatable = true, nullable = false)
-  private Cardinality cardinality = Cardinality.SINGLE;
+  @Column(name = "is_template", updatable = true, nullable = false)
+  private boolean isTemplate = false;
 
   @Column(name = "status", updatable = true, nullable = true)
   private String status = STATUS_READY;
@@ -351,12 +351,35 @@ public class Rule {
     return setRepositoryKey(repositoryKey).setKey(key).setConfigKey(key);
   }
 
+  /**
+   * @since 4.4
+   */
+  public boolean isTemplate() {
+    return isTemplate;
+  }
+
+  /**
+   * @since 4.4
+   */
+  public Rule setIsTemplate(boolean isTemplate) {
+    this.isTemplate = isTemplate;
+    return this;
+  }
+
+  /**
+   * @deprecated since 4.4, use {@link #isTemplate()}
+   */
+  @Deprecated
   public Cardinality getCardinality() {
-    return cardinality;
+    return isTemplate ? Cardinality.MULTIPLE : Cardinality.SINGLE;
   }
 
+  /**
+   * @deprecated since 4.4, use {@link #setIsTemplate(boolean)}
+   */
+  @Deprecated
   public Rule setCardinality(Cardinality c) {
-    this.cardinality = c;
+    this.isTemplate = Cardinality.MULTIPLE.equals(c);
     return this;
   }
 
@@ -544,7 +567,7 @@ public class Rule {
       .append("configKey", configKey)
       .append("plugin", pluginName)
       .append("severity", priority)
-      .append("cardinality", cardinality)
+      .append("isTemplate", isTemplate())
       .append("status", status)
       .append("language", language)
       .append("template", template)
index a74a955230f99677479e44f43dbc696b8620f279..cf2cf6fc0f3fac862c5d4b5f32af84b12de86ccf 100644 (file)
@@ -402,7 +402,7 @@ public class RuleActivator implements ServerComponent {
     }
   }
 
-  void setParent(DbSession dbSession, QualityProfileKey key, QualityProfileKey parentKey) {
+  void setParent(DbSession dbSession, QualityProfileKey key, @Nullable QualityProfileKey parentKey) {
     QualityProfileDto profile = db.qualityProfileDao().getNonNullByKey(dbSession, key);
     if (parentKey == null) {
       // unset if parent is defined, else nothing to do
index f6a48fc20af64a5db58fd2ae35673f21005702ca..0cf00d4f41b80d86b0d1d07a58e76d779467917e 100644 (file)
@@ -22,7 +22,6 @@ package org.sonar.server.qualityprofile;
 import com.google.common.collect.Maps;
 import org.apache.commons.lang.StringUtils;
 import org.sonar.api.rule.RuleStatus;
-import org.sonar.check.Cardinality;
 import org.sonar.core.qualityprofile.db.ActiveRuleDto;
 import org.sonar.core.qualityprofile.db.ActiveRuleParamDto;
 import org.sonar.core.qualityprofile.db.QualityProfileDto;
@@ -33,6 +32,7 @@ import org.sonar.server.rule.Rule;
 
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
+
 import java.util.Collection;
 import java.util.Map;
 
@@ -186,7 +186,7 @@ class RuleActivatorContext {
     if (RuleStatus.REMOVED == rule.getStatus()) {
       throw new BadRequestException("Rule was removed: " + rule.getKey());
     }
-    if (Cardinality.MULTIPLE.equals(rule.getCardinality())) {
+    if (rule.isTemplate()) {
       throw new BadRequestException("Rule template can't be activated on a Quality profile: " + rule.getKey());
     }
     if (Rule.MANUAL_REPOSITORY_KEY.equals(rule.getRepositoryKey())) {
index 607dd9dce0d23624ac637e19857c2a8a57d7bb24..8f185baf37884e0a2f0413e85a6f6b4e9c62b72a 100644 (file)
@@ -33,7 +33,6 @@ import org.sonar.api.server.debt.DebtRemediationFunction;
 import org.sonar.api.server.rule.RuleParamType;
 import org.sonar.api.server.rule.RulesDefinition;
 import org.sonar.api.utils.ValidationMessages;
-import org.sonar.check.Cardinality;
 import org.sonar.core.i18n.RuleI18nManager;
 import org.sonar.server.debt.DebtModelPluginRepository;
 import org.sonar.server.debt.DebtModelXMLExporter;
@@ -41,6 +40,7 @@ import org.sonar.server.debt.DebtRulesXMLImporter;
 
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
+
 import java.io.Reader;
 import java.util.Collection;
 import java.util.List;
@@ -91,7 +91,7 @@ public class DeprecatedRulesDefinition implements RulesDefinition {
         newRule.setName(ruleName(repository.getKey(), rule));
         newRule.setHtmlDescription(ruleDescription(repository.getKey(), rule));
         newRule.setInternalKey(rule.getConfigKey());
-        newRule.setTemplate(Cardinality.MULTIPLE.equals(rule.getCardinality()));
+        newRule.setTemplate(rule.isTemplate());
         newRule.setSeverity(rule.getSeverity().toString());
         newRule.setStatus(rule.getStatus() == null ? RuleStatus.defaultStatus() : RuleStatus.valueOf(rule.getStatus()));
         newRule.setTags(rule.getTags());
index 393408613b654be9f0c783cbe18889cc3dced6b6..4adc3ae8dcac7b0a37f27c226c40bfd257b54a57 100644 (file)
@@ -34,7 +34,6 @@ import org.sonar.api.server.debt.DebtRemediationFunction;
 import org.sonar.api.server.rule.RulesDefinition;
 import org.sonar.api.utils.System2;
 import org.sonar.api.utils.TimeProfiler;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
 import org.sonar.core.rule.RuleParamDto;
@@ -164,7 +163,7 @@ public class RegisterRules implements Startable {
 
   private RuleDto createRuleDto(RulesDefinition.Rule ruleDef, DbSession session) {
     RuleDto ruleDto = RuleDto.createFor(RuleKey.of(ruleDef.repository().key(), ruleDef.key()))
-      .setCardinality(ruleDef.template() ? Cardinality.MULTIPLE : Cardinality.SINGLE)
+      .setIsTemplate(ruleDef.template())
       .setConfigKey(ruleDef.internalKey())
       .setDescription(ruleDef.htmlDescription())
       .setLanguage(ruleDef.repository().language())
@@ -201,9 +200,9 @@ public class RegisterRules implements Startable {
       dto.setSeverity(severity);
       changed = true;
     }
-    Cardinality cardinality = def.template() ? Cardinality.MULTIPLE : Cardinality.SINGLE;
-    if (!cardinality.equals(dto.getCardinality())) {
-      dto.setCardinality(cardinality);
+    boolean isTemplate = def.template();
+    if (isTemplate != dto.isTemplate()) {
+      dto.setIsTemplate(isTemplate);
       changed = true;
     }
     if (def.status() != dto.getStatus()) {
index 72cff038f8fcddf79c197863a1410518916bac1f..14d87785d39a5234a157a763eeb498000dd25556 100644 (file)
@@ -24,7 +24,6 @@ import com.google.common.base.Strings;
 import org.sonar.api.ServerComponent;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.Severity;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
 import org.sonar.core.rule.RuleParamDto;
@@ -44,7 +43,7 @@ public class RuleCreator implements ServerComponent {
       RuleKey templateKey = newRule.templateKey();
       if (templateKey != null) {
         RuleDto templateRule = dbClient.ruleDao().getByKey(dbSession, templateKey);
-        if (!Cardinality.MULTIPLE.equals(templateRule.getCardinality())) {
+        if (!templateRule.isTemplate()) {
           throw new IllegalArgumentException("This rule is not a template rule: " + templateKey.toString());
         }
         validateRule(newRule);
@@ -103,7 +102,6 @@ public class RuleCreator implements ServerComponent {
       .setName(newRule.name())
       .setDescription(newRule.htmlDescription())
       .setSeverity(newRule.severity())
-      .setCardinality(Cardinality.SINGLE)
       .setStatus(newRule.status())
       .setLanguage(templateRuleDto.getLanguage())
       .setDefaultSubCharacteristicId(templateRuleDto.getDefaultSubCharacteristicId())
index fd34a6af5cfa2ab1d6963c158f34971110606a53..69dc9b4cbf79ff0949e005871de70f8bfea6a1d4 100644 (file)
@@ -24,7 +24,6 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Sets;
 import org.elasticsearch.action.update.UpdateRequest;
 import org.sonar.api.rule.RuleKey;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
 import org.sonar.core.rule.RuleParamDto;
@@ -170,7 +169,7 @@ public class RuleNormalizer extends BaseNormalizer<RuleDto, RuleKey> {
       update.put(RuleField.STATUS.field(), rule.getStatus().name());
       update.put(RuleField.LANGUAGE.field(), rule.getLanguage());
       update.put(RuleField.INTERNAL_KEY.field(), rule.getConfigKey());
-      update.put(RuleField.IS_TEMPLATE.field(), rule.getCardinality() == Cardinality.MULTIPLE);
+      update.put(RuleField.IS_TEMPLATE.field(), rule.isTemplate());
 
       update.put(RuleField.NOTE.field(), rule.getNoteData());
       update.put(RuleField.NOTE_LOGIN.field(), rule.getNoteUserLogin());
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/545_rename_rules_cardinality_to_is_template.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/545_rename_rules_cardinality_to_is_template.rb
new file mode 100644 (file)
index 0000000..d27d134
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# SonarQube, open source software quality management tool.
+# Copyright (C) 2008-2014 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# SonarQube 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.
+#
+# SonarQube 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 this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+#
+
+#
+# SonarQube 4.4
+# SONAR-5369
+#
+class RenameRulesCardinalityToIsTemplate < ActiveRecord::Migration
+
+  class Rule < ActiveRecord::Base
+  end
+
+  def self.up
+    begin
+      add_column 'rules', 'is_template', :boolean, :null => false, :default => false
+      Rule.reset_column_information
+      Rule.all.each do |r|
+        r.is_template = r.cardinality == 'MULTIPLE'
+        r.save!
+      end
+      remove_column 'rules', 'cardinality'
+    end
+  end
+
+end
index c2cd3c79f87107d20d2cc6ac11bc03724788ff82..c7bb61746df0d8568d15e7f76f54055a69abc938 100644 (file)
@@ -26,7 +26,6 @@ import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.server.debt.DebtRemediationFunction;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.qualityprofile.db.ActiveRuleDto;
 import org.sonar.core.qualityprofile.db.ActiveRuleParamDto;
@@ -286,8 +285,6 @@ public class ActiveRuleBackendMediumTest {
   }
 
 
-
-
   private RuleDto newRuleDto(RuleKey ruleKey) {
     return new RuleDto()
       .setRuleKey(ruleKey.rule())
@@ -297,7 +294,7 @@ public class ActiveRuleBackendMediumTest {
       .setStatus(RuleStatus.READY)
       .setConfigKey("InternalKey" + ruleKey.rule())
       .setSeverity(Severity.INFO)
-      .setCardinality(Cardinality.SINGLE)
+      .setIsTemplate(false)
       .setLanguage("js")
       .setRemediationFunction(DebtRemediationFunction.Type.LINEAR.toString())
       .setDefaultRemediationFunction(DebtRemediationFunction.Type.LINEAR_OFFSET.toString())
index 057f2081bba1ef7f7fa8530b1f515c7d99d0879f..216ca56cd4082e5fc56245e7eb03dc3c14e3c3e6 100644 (file)
@@ -28,7 +28,6 @@ import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.server.ws.WebService;
-import org.sonar.check.Cardinality;
 import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.qualityprofile.db.ActiveRuleDto;
@@ -286,7 +285,7 @@ public class QProfilesWsMediumTest {
   public void bulk_activate_rule_with_template() throws Exception {
     QualityProfileDto profile = getProfile("java");
     RuleDto rule0 = getRule(profile.getLanguage(), "toto")
-      .setCardinality(Cardinality.MULTIPLE);
+      .setIsTemplate(true);
     RuleDto rule1 = getRule(profile.getLanguage(), "tata");
     session.commit();
 
index e60820055dc7d74cd86cfe51081720cc9ea6a4e4..522741cdf4a409968fcd6d7ea927de3b12f92093 100644 (file)
@@ -30,7 +30,6 @@ import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.server.debt.DebtRemediationFunction;
 import org.sonar.api.server.rule.RuleParamType;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
 import org.sonar.core.rule.RuleParamDto;
@@ -372,7 +371,7 @@ public class RuleBackendMediumTest {
       .setStatus(RuleStatus.READY)
       .setConfigKey("InternalKey" + ruleKey.rule())
       .setSeverity(Severity.INFO)
-      .setCardinality(Cardinality.SINGLE)
+      .setIsTemplate(false)
       .setLanguage("js")
       .setTags(ImmutableSet.of("tag1", "tag2"))
       .setSystemTags(ImmutableSet.of("systag1", "systag2"))
index 48695e5bb83e2dbfe3de740371cde09e5f23c4be..edc6677b072557ebbbec69ee01d0a7ca09ca02d9 100644 (file)
@@ -30,7 +30,6 @@ import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.server.debt.DebtRemediationFunction;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
 import org.sonar.core.rule.RuleParamDto;
@@ -298,8 +297,7 @@ public class RuleCreatorMediumTest {
   public void fail_to_create_custom_rule_when_wrong_rule_template() throws Exception {
     // insert rule
     RuleDto rule = dao.insert(dbSession,
-      RuleTesting.newDto(RuleKey.of("java", "S001"))
-        .setCardinality(Cardinality.SINGLE));
+      RuleTesting.newDto(RuleKey.of("java", "S001")).setIsTemplate(false));
     dbSession.commit();
 
     // Create custom rule with unknown template rule
@@ -344,7 +342,7 @@ public class RuleCreatorMediumTest {
   private RuleDto createTemplateRule(){
     RuleDto templateRule = dao.insert(dbSession,
       RuleTesting.newDto(RuleKey.of("java", "S001"))
-        .setCardinality(Cardinality.MULTIPLE)
+        .setIsTemplate(true)
         .setLanguage("java")
         .setConfigKey("S001")
         .setDefaultSubCharacteristicId(1)
index 87c1d753bef74afc4266338df4f062675d1c2671..c0c317887b901a68a4616cb8ae1a73aea435fada 100644 (file)
@@ -28,7 +28,6 @@ import org.junit.Test;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
-import org.sonar.check.Cardinality;
 import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
@@ -134,7 +133,7 @@ public class RuleServiceMediumTest {
 
     // Create template rule
     RuleKey templateRuleKey = RuleKey.of("java", "S001");
-    dao.insert(dbSession, RuleTesting.newDto(templateRuleKey).setCardinality(Cardinality.MULTIPLE));
+    dao.insert(dbSession, RuleTesting.newTemplateRule(templateRuleKey));
     dbSession.commit();
 
     // Create custom rule
@@ -169,7 +168,7 @@ public class RuleServiceMediumTest {
 
     // Create template rule
     RuleKey templateRuleKey = RuleKey.of("java", "S001");
-    dao.insert(dbSession, RuleTesting.newDto(templateRuleKey).setCardinality(Cardinality.MULTIPLE));
+    dao.insert(dbSession, RuleTesting.newTemplateRule(templateRuleKey));
     dbSession.commit();
 
     // Create custom rule
index 455440bf3c7e0852cc03a01dffac20f50db62436..c11aff6a7b7151fa0b3965bbd7ce35968b22f0bf 100644 (file)
@@ -24,7 +24,6 @@ import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.server.debt.DebtRemediationFunction;
-import org.sonar.check.Cardinality;
 import org.sonar.core.rule.RuleDto;
 
 import java.util.Date;
@@ -52,7 +51,7 @@ public class RuleTesting {
       .setStatus(RuleStatus.READY)
       .setConfigKey("InternalKey" + ruleKey.rule())
       .setSeverity(Severity.INFO)
-      .setCardinality(Cardinality.SINGLE)
+      .setIsTemplate(false)
       .setTags(ImmutableSet.of("tag1", "tag2"))
       .setSystemTags(ImmutableSet.of("systag1", "systag2"))
       .setLanguage("js")
@@ -67,12 +66,11 @@ public class RuleTesting {
 
   public static RuleDto newTemplateRule(RuleKey ruleKey){
     return newDto(ruleKey)
-      .setCardinality(Cardinality.MULTIPLE);
+      .setIsTemplate(true);
   }
 
   public static RuleDto newCustomRule(RuleDto templateRule){
     return newDto(RuleKey.of(templateRule.getRepositoryKey(), templateRule.getRuleKey() + "_" + new Date().getTime()))
-      .setCardinality(Cardinality.SINGLE)
       .setTemplateId(templateRule.getId());
   }
 
index a922e6cd7211253017b1ee8ff1e4dd00d01013f6..7c20cf3ab026d9b3b5cb0c49353b0e12a77e93f9 100644 (file)
@@ -29,7 +29,6 @@ import org.sonar.api.rule.Severity;
 import org.sonar.api.server.debt.DebtRemediationFunction;
 import org.sonar.api.utils.DateUtils;
 import org.sonar.api.utils.System2;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.AbstractDaoTestCase;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
@@ -174,7 +173,7 @@ public class RuleDaoTest extends AbstractDaoTestCase {
       .setStatus(RuleStatus.DEPRECATED)
       .setConfigKey("NewConfigKey")
       .setSeverity(Severity.INFO)
-      .setCardinality(Cardinality.MULTIPLE)
+      .setIsTemplate(true)
       .setLanguage("dart")
       .setTemplateId(3)
       .setNoteData("My note")
@@ -214,7 +213,7 @@ public class RuleDaoTest extends AbstractDaoTestCase {
       .setStatus(RuleStatus.DEPRECATED)
       .setConfigKey("NewConfigKey")
       .setSeverity(Severity.INFO)
-      .setCardinality(Cardinality.MULTIPLE)
+      .setIsTemplate(true)
       .setLanguage("dart")
       .setTemplateId(3)
       .setSubCharacteristicId(100)
@@ -248,7 +247,7 @@ public class RuleDaoTest extends AbstractDaoTestCase {
       .setStatus(RuleStatus.DEPRECATED)
       .setConfigKey("NewConfigKey")
       .setSeverity(Severity.INFO)
-      .setCardinality(Cardinality.MULTIPLE)
+      .setIsTemplate(true)
       .setLanguage("dart")
       .setTemplateId(3)
       .setSubCharacteristicId(100)
@@ -270,7 +269,7 @@ public class RuleDaoTest extends AbstractDaoTestCase {
       .setStatus(RuleStatus.BETA)
       .setConfigKey("NewConfigKey2")
       .setSeverity(Severity.MAJOR)
-      .setCardinality(Cardinality.SINGLE)
+      .setIsTemplate(false)
       .setLanguage("js")
       .setTemplateId(null)
       .setSubCharacteristicId(102)
index 426a7190580a5b43c00c20ed14eed5886a62e4e1..73eb674593cdef483deeb68f1bc132ccdf331fb2 100644 (file)
@@ -31,7 +31,6 @@ import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.server.debt.DebtRemediationFunction;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.qualityprofile.db.ActiveRuleDto;
 import org.sonar.core.qualityprofile.db.QualityProfileDto;
@@ -711,8 +710,8 @@ public class RuleIndexMediumTest {
 
   @Test
   public void search_by_is_template() throws InterruptedException {
-    dao.insert(dbSession, newRuleDto(RuleKey.of("java", "S001")).setCardinality(Cardinality.SINGLE));
-    dao.insert(dbSession, newRuleDto(RuleKey.of("java", "S002")).setCardinality(Cardinality.MULTIPLE));
+    dao.insert(dbSession, newRuleDto(RuleKey.of("java", "S001")).setIsTemplate(false));
+    dao.insert(dbSession, newRuleDto(RuleKey.of("java", "S002")).setIsTemplate(true));
     dbSession.commit();
 
     // find all
@@ -741,7 +740,7 @@ public class RuleIndexMediumTest {
 
   @Test
   public void search_by_template_key() throws InterruptedException {
-    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setCardinality(Cardinality.MULTIPLE);
+    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setIsTemplate(true);
     dao.insert(dbSession, templateRule);
     dao.insert(dbSession, newRuleDto(RuleKey.of("java", "S001_MY_CUSTOM")).setTemplateId(templateRule.getId()));
     dbSession.commit();
@@ -765,7 +764,7 @@ public class RuleIndexMediumTest {
 
   @Test
   public void search_by_template_key_with_params() throws InterruptedException {
-    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setCardinality(Cardinality.MULTIPLE);
+    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setIsTemplate(true);
     RuleParamDto ruleParamDto = RuleParamDto.createFor(templateRule).setName("regex").setType("STRING").setDescription("Reg ex").setDefaultValue(".*");
     dao.insert(dbSession, templateRule);
     dao.addRuleParam(dbSession, templateRule, ruleParamDto);
@@ -788,7 +787,7 @@ public class RuleIndexMediumTest {
 
   @Test
   public void show_custom_rule() throws InterruptedException {
-    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setCardinality(Cardinality.MULTIPLE);
+    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setIsTemplate(true);
     dao.insert(dbSession, templateRule);
     dao.insert(dbSession, newRuleDto(RuleKey.of("java", "S001_MY_CUSTOM")).setTemplateId(templateRule.getId()));
     dbSession.commit();
@@ -864,7 +863,7 @@ public class RuleIndexMediumTest {
       .setStatus(RuleStatus.READY)
       .setConfigKey("InternalKey" + ruleKey.rule())
       .setSeverity(Severity.INFO)
-      .setCardinality(Cardinality.SINGLE)
+      .setIsTemplate(false)
       .setLanguage("js")
       .setRemediationFunction(DebtRemediationFunction.Type.LINEAR.toString())
       .setDefaultRemediationFunction(DebtRemediationFunction.Type.LINEAR_OFFSET.toString())
index 4627de3acb6f261c32a363cd0cb997620a7c9e06..fb074ecdcc102a8001f736117a37240ee24dccb4 100644 (file)
@@ -27,7 +27,6 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.sonar.api.rule.RuleKey;
-import org.sonar.check.Cardinality;
 import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
@@ -73,7 +72,7 @@ public class CreateActionMediumTest {
       .setLogin("me");
 
     // Template rule
-    RuleDto templateRule = ruleDao.insert(session, RuleTesting.newDto(RuleKey.of("java", "S001")).setCardinality(Cardinality.MULTIPLE));
+    RuleDto templateRule = ruleDao.insert(session, RuleTesting.newTemplateRule(RuleKey.of("java", "S001")));
     RuleParamDto param = RuleParamDto.createFor(templateRule).setName("regex").setType("STRING").setDescription("Reg ex").setDefaultValue(".*");
     ruleDao.addRuleParam(session, templateRule, param);
     session.commit();
index f8e16570838a5dabd53a68bc8fff6d49d494aa1e..c700804b145adeaa46da385ebd03010f7ea8cb72 100644 (file)
@@ -30,7 +30,6 @@ import org.sonar.api.rule.Severity;
 import org.sonar.api.server.debt.DebtRemediationFunction;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.api.utils.DateUtils;
-import org.sonar.check.Cardinality;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.qualityprofile.db.ActiveRuleDto;
 import org.sonar.core.qualityprofile.db.ActiveRuleParamDto;
@@ -191,7 +190,7 @@ public class RulesWebServiceTest {
 
   @Test
   public void search_template_rules() throws Exception {
-    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setCardinality(Cardinality.MULTIPLE);
+    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setIsTemplate(true);
     ruleDao.insert(session, templateRule);
     ruleDao.insert(session, newRuleDto(RuleKey.of("java", "S001_MY_CUSTOM")).setTemplateId(templateRule.getId()));
     session.commit();
@@ -206,7 +205,7 @@ public class RulesWebServiceTest {
 
   @Test
   public void search_custom_rules_from_template_key() throws Exception {
-    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setCardinality(Cardinality.MULTIPLE);
+    RuleDto templateRule = newRuleDto(RuleKey.of("java", "S001")).setIsTemplate(true);
     ruleDao.insert(session, templateRule);
     ruleDao.insert(session, newRuleDto(RuleKey.of("java", "S001_MY_CUSTOM")).setTemplateId(templateRule.getId()));
     session.commit();
@@ -455,7 +454,7 @@ public class RulesWebServiceTest {
       .setStatus(RuleStatus.READY)
       .setConfigKey("InternalKey" + ruleKey.rule())
       .setSeverity(Severity.INFO)
-      .setCardinality(Cardinality.SINGLE)
+      .setIsTemplate(false)
       .setLanguage("js")
       .setRemediationFunction(DebtRemediationFunction.Type.LINEAR.toString())
       .setDefaultRemediationFunction(DebtRemediationFunction.Type.LINEAR_OFFSET.toString())
index caefdad115941920e61867a2df1777778bf6719d..1ca8956e27fdec8878b1fef332f7c6f5e04f3d8f 100644 (file)
@@ -30,7 +30,6 @@ import org.mockito.runners.MockitoJUnitRunner;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
-import org.sonar.check.Cardinality;
 import org.sonar.core.permission.GlobalPermissions;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.rule.RuleDto;
@@ -77,7 +76,7 @@ public class UpdateActionMediumTest {
       .setLogin("me");
 
     // Template rule
-    RuleDto templateRule = ruleDao.insert(session, RuleTesting.newDto(RuleKey.of("java", "S001")).setCardinality(Cardinality.MULTIPLE));
+    RuleDto templateRule = ruleDao.insert(session, RuleTesting.newTemplateRule(RuleKey.of("java", "S001")));
     RuleParamDto param = RuleParamDto.createFor(templateRule).setName("regex").setType("STRING").setDescription("Reg ex").setDefaultValue(".*");
     ruleDao.addRuleParam(session, templateRule, param);
     session.commit();
index 192f6531b7a0e29ae711eec58e52cc5cbedffacb..9e4f1eb56f2899bdaaadc11c722436303e1c5141 100644 (file)
@@ -2,7 +2,7 @@
     <rules_parameters id="1" rule_id="10" name="max" param_type="INTEGER" default_value="30" description="My Parameter"/>
 
     <rules tags="[null]" system_tags="[null]" id="10" plugin_rule_key="Parent1" plugin_name="checkstyle" name="Parent Rule 1" description="Parent Rule 1" status="READY"
-           plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" />
+           plugin_config_key="Parent1" priority="2" is_template="[false]" language="golo" created_at="1981-10-24 15:20:00" />
 
     <rules_profiles id="1" name="Child" language="java" parent_name="Parent" version="1"
                     used_profile="[false]"/>
index 706a94112cfec38587e9fda73a7b7bc71142d34f..a13d968365dfc57066e8044871cafa1efefb5148 100644 (file)
@@ -4,7 +4,7 @@
     <active_rules created_at="[null]" updated_at="[null]" id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
 
     <rules tags="[null]" system_tags="[null]" id="10" plugin_rule_key="Parent1" plugin_name="checkstyle" name="Parent Rule 1" description="Parent Rule 1" status="READY"
-           plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" />
+           plugin_config_key="Parent1" priority="2" is_template="[false]" language="golo" created_at="1981-10-24 15:20:00" />
 
     <rules_profiles id="1" name="Child" language="java" parent_name="Parent" version="1"
                     used_profile="[false]"/>
index 71152729eeb1453dfecdedfb459adaa7fedc0605..bf9ee7ff04e37b7490ae3ffedfcb1aa97e5034a5 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
     <rules tags="[null]" system_tags="[null]" id="10" plugin_rule_key="Parent1" plugin_name="checkstyle" name="Parent Rule 1" description="Parent Rule 1" status="READY"
-           plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" />
+           plugin_config_key="Parent1" priority="2" is_template="[false]" language="golo" created_at="1981-10-24 15:20:00" />
 
     <rules tags="[null]" system_tags="[null]" id="11" plugin_rule_key="Parent2" plugin_name="checkstyle" name="Parent Rule 2" description="Parent Rule 2" status="READY"
-           plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" />
+           plugin_config_key="Parent1" priority="2" is_template="[false]" language="golo" created_at="1981-10-24 15:20:00" />
 
     <active_rules created_at="[null]" updated_at="[null]" id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
 
index acce83dc56f66b5c452e6db0cfbbca7eff84caee..11ede736fd2404560764c77875918d28a8854583 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules_parameters id="1" rule_id="1" default_value="default value one" description="parameter one" name="param1" param_type="STRING"/>
   <rules_parameters id="2" rule_id="1" default_value="default value two" description="parameter two" name="param2" param_type="STRING"/>
index 83c96760f2c8a5de3b0b88dfca911c249d63eee1..c8ab86530c030bf389667042484adb6292bbb364 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
-         status="READY" priority="2" cardinality="SINGLE" template_id="[null]" />
+         status="READY" priority="2" is_template="[false]" template_id="[null]" />
 
   <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="STRING"/>
   <rules_parameters id="2" rule_id="1" name="param2" description="[null]" param_type="STRING"/>
index 5543cb5d637f6898f9cf7d21b569697ede7de02d..ed1a478d498795b86fd3712adc1ff335b5efc30b 100644 (file)
@@ -1,15 +1,15 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="deprecated" plugin_name="fake" plugin_config_key="[null]" name="Deprecated fake" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index 1bc82135c5ddd20cb407e764453eada9059de5fa..6d205ac7231598d51a75febb8d606d333deaa7a9 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="deprecated" plugin_name="fake" plugin_config_key="[null]" name="Deprecated fake" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]"/>
 
   <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="STRING"/>
 
index 7fcf4aa84020606dcf96eb7ec406cedd6c8a203c..d62ae48ac112f327b55b2d6c933f2d90764dca98 100644 (file)
@@ -1,14 +1,14 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-     status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"/>
+     status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-                   status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+                   status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
   <rules_parameters id="1" rule_id="2" default_value="default value one" description="parameter one" name="param1" param_type="STRING"/>
   <rules_parameters id="2" rule_id="2" default_value="default value two" description="parameter two" name="param2" param_type="STRING"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="rule2" name="Two" description="Description of Two"
-                   status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+                   status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
   
 </dataset>
index 087452bdcde44228620e7f3da9af71fa232d7a81..e1b4cda397ae17dded4001b35040bab9f01a76f6 100644 (file)
@@ -1,20 +1,20 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="deprecated" plugin_name="fake" plugin_config_key="[null]" name="Deprecated fake" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"/>
 
   <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="STRING" default_value="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules_parameters id="2" rule_id="3" default_value="default value one" description="parameter one" name="param1" param_type="STRING"/>
   <rules_parameters id="3" rule_id="3" default_value="default value two" description="parameter two" name="param2" param_type="STRING"/>
 
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index af0ddfeb01f63a5f49cdd5a40959f1fc782e6484..41988d668759c817ecb4dfac9d558895704b93e5 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="deprecated" plugin_name="fake" plugin_config_key="[null]" name="Deprecated fake" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]"/>
 
   <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="STRING"/>
 
index 09aa970523476882c28a39ce90c0b47da51197ac..9e18d87e870962be4f42a887c38079b02517bfba 100644 (file)
@@ -1,21 +1,21 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="disabled_rule" plugin_name="fake" plugin_config_key="[null]" name="Disabled rule" description="[null]"
-         status="REMOVED" priority="4" cardinality="MULTIPLE" template_id="[null]" language="[null]"/>
+         status="REMOVED" priority="4" is_template="[true]" template_id="[null]" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="user_rule" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="1" language="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="1" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="disabled_rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="REMOVED" priority="1" cardinality="SINGLE" template_id="[null]"  language="[null]"/>
+         status="REMOVED" priority="1" is_template="[false]" template_id="[null]"  language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="template_rule2" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="3" language="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="3" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index 90d1de6d1a9401aac5d3dc96e1f6888ea048ee71..74ea4cd3b37917ee46c3131795ecc0abceb5ed49 100644 (file)
@@ -2,18 +2,18 @@
 
   <!-- Rule as been removed -->
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="disabled_rule" plugin_name="fake" plugin_config_key="[null]" name="Disabled rule" description="[null]"
-         status="REMOVED" priority="4" cardinality="MULTIPLE" template_id="[null]"/>
+         status="REMOVED" priority="4" is_template="[true]" template_id="[null]"/>
 
   <!-- user rule duplicated from rule 1. It is currently enabled. -->
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="user_rule" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="1"/>
+         status="READY" priority="4" is_template="[false]" template_id="1"/>
 
   <!-- This rule will be removed... -->
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="disabled_rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="READY" priority="1" cardinality="SINGLE" template_id="[null]" />
+         status="READY" priority="1" is_template="[false]" template_id="[null]" />
 
   <!-- ...so this template will be removed too -->
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="template_rule2" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="3"/>
+         status="READY" priority="4" is_template="[false]" template_id="3"/>
 
 </dataset>
index 5bd5d56dbb184b195f604fbb40a97c3489cfdab0..b1bc93c12f7f7d5306d412b5590777e490d35538 100644 (file)
@@ -3,7 +3,7 @@
   <characteristics id="2" kee="MEMORY_EFFICIENCY" name="Efficiency" parent_id="[null]" characteristic_order="[null]" enabled="[true]"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
-         status="READY" priority="2" cardinality="SINGLE" template_id="[null]"
+         status="READY" priority="2" is_template="[false]" template_id="[null]"
          characteristic_id="[null]" default_characteristic_id="200"
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="14min"
@@ -11,7 +11,7 @@
          effort_to_fix_description="squid.S1115.effortTotFix"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="READY" priority="1" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="1" is_template="[false]" template_id="[null]"/>
 
 
 </dataset>
index 09691908bcd867834803a48f3e3d829761662853..c5d6e2c5c66fbf8dddf077ef18d2e5b08f2e30b1 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="findbugs" plugin_config_key="[null]" name="Rule One" description="Description of Rule One"
-     status="READY" priority="2" cardinality="SINGLE" template_id="[null]" language="java"/>
+     status="READY" priority="2" is_template="[false]" template_id="[null]" language="java"/>
 
     <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="findbugs" plugin_config_key="[null]" name="Rule Two" description="Description of Rule Two"
-         status="READY" priority="2" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="READY" priority="2" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index 0a4ff8b8b9916cec95f1f4df312fca008a4b1422..3cca2fcdee9591996fd9816d74a52bdb00d6dfc6 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -9,7 +9,7 @@
          effort_to_fix_description="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="2"
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
@@ -20,7 +20,7 @@
   <rules_parameters id="2" rule_id="2" default_value="default value two" description="parameter two" name="param2" param_type="STRING"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index e4c051c4fbc307e71e8471cf51afa4f02f0db3fa..2ce2804926c5b82365e38b1fcb9fc056fc176830 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -10,7 +10,7 @@
          updated_at="2014-03-16"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="deprecated" plugin_name="fake" plugin_config_key="[null]" name="Deprecated fake" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -20,7 +20,7 @@
 
  <!-- New rules -->
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="2"
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
@@ -29,7 +29,7 @@
          updated_at="2014-03-17 19:10:03.0"/>
 
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index f5a605951f739b93051a97293ebc8576b9f5aec7..8f1a5ba3428b639ba4e08d9a97a2bf5b39d57cdd 100644 (file)
@@ -3,7 +3,7 @@
   <characteristics id="2" kee="MEMORY_EFFICIENCY" name="Memory Efficiency" parent_id="1" characteristic_order="1" enabled="[true]"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]"
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -12,7 +12,7 @@
          updated_at="2014-03-16"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="deprecated" plugin_name="fake" plugin_config_key="[null]" name="Deprecated fake" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]"
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index 6399c16e74f6b97e2b70cf390e041a149b5f76d9..794dbc04f649cdf09e03674bfc60d5566009f4d9 100644 (file)
@@ -1,15 +1,15 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="PerformanceIssue" plugin_name="manual" plugin_config_key="[null]" name="Performance Issue" description="[null]"
-         status="READY" priority="[null]" cardinality="SINGLE" template_id="[null]" language="[null]"/>
+         status="READY" priority="[null]" is_template="[false]" template_id="[null]" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="IllegalExceptionCheck" plugin_name="checkstyle" plugin_config_key="[null]" name="Illegal Exception" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index c3592559fbd5fbf300b88ceb835300448d26b3a8..67827a4ca28dad331bc76e540e0f3124796abc15 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="PerformanceIssue" plugin_name="manual" plugin_config_key="[null]" name="Performance Issue" description="[null]"
-         status="READY" priority="[null]" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="[null]" is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="IllegalExceptionCheck" plugin_name="checkstyle" plugin_config_key="[null]" name="Illegal Exception" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]"/>
 
 </dataset>
index cd33c09cd2a75fc1d222a4e2f8493833ef92598a..8cd094da18ac29c4ec89bd78d62e7a5d862615a3 100644 (file)
@@ -1,12 +1,12 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-     status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+     status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="user_rule" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-     status="READY" priority="4" cardinality="SINGLE" template_id="1" language="java"/>
+     status="READY" priority="4" is_template="[false]" template_id="1" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-     status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+     status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index 964e8e11c24f0abefb666fca10104c9899bc31b3..c1f1aa3cbc5c0ce59fde1fbe83ba11181bad81d1 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="[null]" name="Rule one" description="[null]"
-         status="READY" priority="4" cardinality="MULTIPLE" template_id="[null]"/>
+         status="READY" priority="4" is_template="[true]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="user_rule" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="1"/>
+         status="READY" priority="4" is_template="[false]" template_id="1"/>
 
 </dataset>
index 6cd647db95d5b22ee71f81b6fab80d12bb62b39f..53c4e4c0fcc78870e11d5b5b5015677c751a55b3 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="rule2" name="Two" description="Description of Two"
-                   status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+                   status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index 50fdcfd3acdfc8940820b365008aa785048b33f9..4d52bc1851c5df9cc2297b9252b4a44af2de03c6 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]"/>
 
 </dataset>
index a0ed38c97ade313968d924f6a658ad6c9cd7dd0b..30e830d1b4d71a5c97b2b5cdd266c30f929212b5 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="fake" plugin_config_key="[null]" name="Deprecated" description="[null]"
-                   status="READY" priority="4" cardinality="SINGLE" template_id="[null]"/>
+                   status="READY" priority="4" is_template="[false]" template_id="[null]"/>
 
 </dataset>
index fcbfa8247281b8d71fe52f9aed742bb8375fa101..cbc6272949a971b8802cc0c4c7037d6ea08c5712 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-                   status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+                   status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-                   status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+                   status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index 0bf6ba212eed0636df63bdb777a323949df97cd0..cab88754511fea8f871e413e5f9c63ddf5d0fe61 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="[null]" name="Old name" description="Old description"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]"/>
 
 </dataset>
index 5f05090ced8c07807b79995874ede4279ef1e078..d72df9366bc217277b191c6756d0082081f14402 100644 (file)
@@ -1,12 +1,12 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="user_rule" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="1" language="java"/>
+         status="READY" priority="4" is_template="[false]" template_id="1" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index dc99296bc5a8261d25e1e8b7c0e1dfd6fa2dfe9c..c8fbd93623e2960bebed3753c45b8952b8179e40 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="user_rule" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="REMOVED" priority="4" cardinality="SINGLE" template_id="1" language="java"/>
+         status="REMOVED" priority="4" is_template="[false]" template_id="1" language="java"/>
 
 </dataset>
index 059f6155947825c3c61cd711d5f16f5a2d7556e5..8ac9dcc49b5c810af67834c7b7e26b83b098526a 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -9,7 +9,7 @@
          effort_to_fix_description="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index 265c3cf9e196e8f0a69c1605b13628b21e331930..0fa7b448bbeba390d56b60aa0183bd8a2632ed88 100644 (file)
@@ -3,7 +3,7 @@
   <characteristics id="999" kee="NEW" name="New" parent_id="1" characteristic_order="1" enabled="[true]"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
-         status="READY" priority="2" cardinality="SINGLE" template_id="[null]"
+         status="READY" priority="2" is_template="[false]" template_id="[null]"
          characteristic_id="[null]" default_characteristic_id="200"
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="14min"
@@ -11,7 +11,7 @@
          effort_to_fix_description="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="READY" priority="1" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="1" is_template="[false]" template_id="[null]"/>
 
 
 </dataset>
index 7fed56bec3969f42157e64e314752173d379d0d4..ae15f74dbc0b2f22ac7fcbaca7ecb0f3ffc3c915 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="-1" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -9,7 +9,7 @@
          effort_to_fix_description="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index 26ec9838778c01aaf9354df1921ab387e41003fb..4a04efdab2c8cdecfb91298bfd9df4710867435b 100644 (file)
@@ -3,7 +3,7 @@
   <characteristics id="999" kee="NEW" name="New" parent_id="1" characteristic_order="1" enabled="[true]"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
-         status="READY" priority="2" cardinality="SINGLE" template_id="[null]"
+         status="READY" priority="2" is_template="[false]" template_id="[null]"
          characteristic_id="-1" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -11,7 +11,7 @@
          effort_to_fix_description="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="READY" priority="1" cardinality="SINGLE" template_id="[null]"
+         status="READY" priority="1" is_template="[false]" template_id="[null]"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index aa13804b225e39ca62adb0177f0b87fce50be3be..a25e936d78bbcf8efe9e71b53d72ff183bd0dcb3 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="3" default_characteristic_id="[null]"
          remediation_function="LINEAR_OFFSET" default_remediation_function="[null]"
          remediation_coeff="5d" default_remediation_coeff="[null]"
@@ -9,7 +9,7 @@
          effort_to_fix_description="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index 0b48ae8706ad9ac7d7b33cc193885171c4a83974..22c14edfda1cd83cded307cf7e4441cef70419a0 100644 (file)
@@ -5,7 +5,7 @@
   <characteristics id="3" kee="COMPILER" name="Compiler" parent_id="1" characteristic_order="1" enabled="[true]"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
-         status="READY" priority="2" cardinality="SINGLE" template_id="[null]"
+         status="READY" priority="2" is_template="[false]" template_id="[null]"
          characteristic_id="3" default_characteristic_id="[null]"
          remediation_function="LINEAR_OFFSET" default_remediation_function="[null]"
          remediation_coeff="5d" default_remediation_coeff="[null]"
@@ -13,7 +13,7 @@
          effort_to_fix_description="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="READY" priority="1" cardinality="SINGLE" template_id="[null]"
+         status="READY" priority="1" is_template="[false]" template_id="[null]"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index 959dbed9d99fa2363b5e6c1c8550fca0896ee699..f77f680b5eaa67193f832eb623049321ee91abb7 100644 (file)
@@ -3,6 +3,6 @@
   <characteristics id="2" kee="MEMORY_EFFICIENCY" name="Memory Efficiency" parent_id="1" characteristic_order="1" enabled="[true]"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
-                   status="READY" priority="4" cardinality="SINGLE" template_id="[null]"/>
+                   status="READY" priority="4" is_template="[false]" template_id="[null]"/>
 
 </dataset>
index c4f598054c384691a63df620d5c2555fb37d6590..20f143ee8c43fd4d6dfe617e54dbb75967f68b66 100644 (file)
@@ -1,9 +1,9 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="The One" description="The Description of One"
-     status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+     status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="rule2" name="Two" description="Description of Two"
-     status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+     status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index 5a9f52126ea87d71c071c4413ca633656cadccd8..755ef324b32df267ffbf268bfd0454ca4e807239 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="200"
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
@@ -12,7 +12,7 @@
   <rules_parameters id="2" rule_id="1" default_value="default value two" description="parameter two" name="param2" param_type="STRING"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index 7b60459392d74a7802855959e554a8812f711add..946c1f6437a0227ad20ddbaa1afd50754d917238 100644 (file)
@@ -3,7 +3,7 @@
   <characteristics id="200" kee="MEMORY_EFFICIENCY" name="Memory Efficiency" parent_id="1" characteristic_order="1" enabled="[true]"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
-         status="READY" priority="2" cardinality="SINGLE" template_id="[null]"
+         status="READY" priority="2" is_template="[false]" template_id="[null]"
          characteristic_id="[null]" default_characteristic_id="200"
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="14min"
@@ -13,7 +13,7 @@
   <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="STRING"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="READY" priority="1" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="1" is_template="[false]" template_id="[null]"/>
 
 
 </dataset>
index 4e36cb745d63bb19c5aeee1f21620c0737ed92c4..4ad36980c7a521455f8a6e17cad32b47cd98e3b9 100644 (file)
@@ -1,11 +1,11 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-                   status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"/>
+                   status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"/>
   <rules_parameters id="1" rule_id="1" default_value="default value one" description="parameter one" name="param1" param_type="STRING"/>
   <rules_parameters id="3" rule_id="1" default_value="default value two" description="parameter two" name="param2" param_type="STRING"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-                   status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"/>
+                   status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"/>
 
 </dataset>
index c990f615639e00627416bc5b4db17dea7309d5fd..af78000975b68949a07a0ce057bdf76a95eb067d 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
-         status="READY" priority="2" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="2" is_template="[false]" template_id="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="READY" priority="1" cardinality="SINGLE" template_id="[null]"/>
+         status="READY" priority="1" is_template="[false]" template_id="[null]"/>
 
   <rules_parameters id="1" rule_id="1" name="param1" description="old description" param_type="STRING"/>
   <rules_parameters id="2" rule_id="1" name="deprecated_param" description="deprecated param to be removed" param_type="STRING"/>
index d79778b15707c6c6bf76509d13caad88ce967b11..1597fb339fd80600f1d50d8fcfb941d4bc59a488 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="config1" name="One" description="Description of One"
-         status="READY" priority="4" cardinality="SINGLE" template_id="[null]" language="java"
+         status="READY" priority="4" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="100"
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
@@ -10,7 +10,7 @@
 
   <!-- Instance of old rule 1 :/ -->
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="template_rule1" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="1" language="java"
+         status="READY" priority="4" is_template="[false]" template_id="1" language="java"
          characteristic_id="[null]" default_characteristic_id="100"
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
@@ -18,7 +18,7 @@
          effort_to_fix_description="squid.S115.effortToFix" />
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="[null]" name="Two" description="Description of Two"
-         status="DEPRECATED" priority="0" cardinality="SINGLE" template_id="[null]" language="java"
+         status="DEPRECATED" priority="0" is_template="[false]" template_id="[null]" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -27,7 +27,7 @@
 
   <!-- Template of old rule 3 :/ -->
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="template_rule2" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="DEPRECATED" priority="4" cardinality="SINGLE" template_id="3" language="java"
+         status="DEPRECATED" priority="4" is_template="[false]" template_id="3" language="java"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index 83933f37e2f6e188a05b397fcf96b20c5f1c9cfb..02bb79cc732edc5bed255bca624dbc268bdc7e68 100644 (file)
@@ -3,7 +3,7 @@
   <characteristics id="100" kee="MEMORY_EFFICIENCY" name="Memory Efficiency" parent_id="1" characteristic_order="1" enabled="[true]"/>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="[null]" name="Rule one" description="[null]"
-         status="READY" priority="4" cardinality="MULTIPLE" template_id="[null]" language="[null]"
+         status="READY" priority="4" is_template="[true]" template_id="[null]" language="[null]"
          characteristic_id="[null]" default_characteristic_id="100"
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
@@ -12,7 +12,7 @@
 
   <!-- Instance of rule 1 -->
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="template_rule1" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="1" language="[null]"
+         status="READY" priority="4" is_template="[false]" template_id="1" language="[null]"
          characteristic_id="[null]" default_characteristic_id="200"
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="1h"
@@ -20,7 +20,7 @@
          effort_to_fix_description="squid.S115.effortToFix2" />
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
-         status="DEPRECATED" priority="1" cardinality="MULTIPLE" template_id="[null]"
+         status="DEPRECATED" priority="1" is_template="[true]" template_id="[null]"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
@@ -29,7 +29,7 @@
 
   <!-- Instance of rule 3 -->
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="template_rule2" plugin_name="fake" plugin_config_key="[null]" name="User rule" description="[null]"
-         status="READY" priority="4" cardinality="SINGLE" template_id="3"
+         status="READY" priority="4" is_template="[false]" template_id="3"
          characteristic_id="[null]" default_characteristic_id="[null]"
          remediation_function="[null]" default_remediation_function="[null]"
          remediation_coeff="[null]" default_remediation_coeff="[null]"
index c11e881f027174c5aecee2bbe0b9525775a6f657..766dcf93a1b2ef4cdbbe5bd15ec4b660575e2811 100644 (file)
@@ -21,7 +21,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
-         plugin_config_key="NewConfigKey" priority="0" cardinality="MULTIPLE" language="dart" created_at="2013-12-16" updated_at="2013-12-16" template_id="3"
+         plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" created_at="2013-12-16" updated_at="2013-12-16" template_id="3"
          note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
          characteristic_id="100" default_characteristic_id="101"
          remediation_function="LINEAR" default_remediation_function="LINEAR_OFFSET"
index c2ecf0d74b2888a1ba0d59509ce5677221c0748c..e687f135fbe90868729cd42aca69736b76aab63b 100644 (file)
@@ -21,7 +21,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
-         plugin_config_key="NewConfigKey" priority="0" cardinality="MULTIPLE" language="dart" created_at="2013-12-16" updated_at="2013-12-16" template_id="3"
+         plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" created_at="2013-12-16" updated_at="2013-12-16" template_id="3"
          note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
          characteristic_id="100" default_characteristic_id="101"
          remediation_function="LINEAR" default_remediation_function="LINEAR_OFFSET"
@@ -31,7 +31,7 @@
       />
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="NewRuleKey2" plugin_name="plugin2" name="new name2" description="new description2" status="BETA"
-         plugin_config_key="NewConfigKey2" priority="2" cardinality="SINGLE" language="js" created_at="2013-12-16" updated_at="2013-12-16" template_id="[null]"
+         plugin_config_key="NewConfigKey2" priority="2" is_template="[false]" language="js" created_at="2013-12-16" updated_at="2013-12-16" template_id="[null]"
          note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
          characteristic_id="102" default_characteristic_id="103"
          remediation_function="LINEAR_OFFSET" default_remediation_function="LINEAR"
index 7a0aaaddef1b411f57262e645b10b6d86dff7014..52d587b2b0f73935720c4424e228ff95eef7d94d 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
     <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
-           plugin_config_key="NewConfigKey" priority="0" cardinality="MULTIPLE" language="dart" created_at="2013-12-16" updated_at="2013-12-17" template_id="3"
+           plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" created_at="2013-12-16" updated_at="2013-12-17" template_id="3"
            note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
            characteristic_id="100" default_characteristic_id="101"
            remediation_function="linear" default_remediation_function="linear_offset"
index 0fb0739a1e5d673a3265c0bf06e46886c3f2da86..149ebb938ae49db5e8b538c6f6f985ee5cd3f3a4 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
     <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
-           plugin_config_key="NewConfigKey" priority="0" cardinality="MULTIPLE" language="dart" created_at="2013-12-16" updated_at="2013-12-17" template_id="3"
+           plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" created_at="2013-12-16" updated_at="2013-12-17" template_id="3"
            note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
            characteristic_id="100" default_characteristic_id="101"
            remediation_function="linear" default_remediation_function="linear_offset"
index 53a8892d45ef5fedfd8f5befb21ae59aed0d5c6e..dafb78a0056d646736ccb1823288bf33c8988b2e 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
-    plugin_config_key="NewConfigKey" priority="0" cardinality="MULTIPLE" language="dart" created_at="2011-04-25 01:05:00" updated_at="2014-01-01" template_id="3"
+    plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" created_at="2011-04-25 01:05:00" updated_at="2014-01-01" template_id="3"
     note_data="My note" note_user_login="admin" note_created_at="2013-12-19" note_updated_at="2013-12-20"
     characteristic_id="100" default_characteristic_id="101"
     remediation_function="LINEAR" default_remediation_function="LINEAR_OFFSET"
   />
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="Parent1" plugin_name="checkstyle" name="Parent Rule 1" description="Parent Rule 1" status="READY"
-    plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" updated_at="[null]" template_id="[null]"
+    plugin_config_key="Parent1" priority="2" is_template="[false]" language="golo" created_at="1981-10-24 15:20:00" updated_at="[null]" template_id="[null]"
     note_created_at="[null]" note_data="[null]" note_updated_at="[null]" note_user_login="[null]"/>
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="Parent2" plugin_name="checkstyle" name="Parent Rule 2" description="Parent Rule 2" status="READY"
-    plugin_config_key="Parent2" priority="2" cardinality="SINGLE" language="dart" created_at="1982-12-14 03:15:00" updated_at="[null]" template_id="[null]"
+    plugin_config_key="Parent2" priority="2" is_template="[false]" language="dart" created_at="1982-12-14 03:15:00" updated_at="[null]" template_id="[null]"
     note_created_at="[null]" note_data="[null]" note_updated_at="[null]" note_user_login="[null]"/>
 
 </dataset>
index ff2d0c693f41f18a61a3dee0e468265d68379dcb..d4979390cdf9c7670863b146827f72174c6d9e1d 100644 (file)
@@ -1,12 +1,12 @@
 <dataset>
 
   <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY"
-    plugin_config_key="AvoidNull" priority="2" cardinality="SINGLE" language="golo" created_at="2011-04-25 01:05:00" template_id="2"/>
+    plugin_config_key="AvoidNull" priority="2" is_template="[false]" language="golo" created_at="2011-04-25 01:05:00" template_id="2"/>
 
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="Parent1" plugin_name="checkstyle" name="Parent Rule 1" description="Parent Rule 1" status="READY"
-    plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" />
+    plugin_config_key="Parent1" priority="2" is_template="[false]" language="golo" created_at="1981-10-24 15:20:00" />
 
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="Parent2" plugin_name="checkstyle" name="Parent Rule 2" description="Parent Rule 2" status="READY"
-    plugin_config_key="Parent2" priority="2" cardinality="SINGLE" language="dart" created_at="1982-12-14 03:15:00" />
+    plugin_config_key="Parent2" priority="2" is_template="[false]" language="dart" created_at="1982-12-14 03:15:00" />
 
 </dataset>
index 82f1cc1c115810de1b46b1ac34fc9d0c4c25af84..0dd12e8beede9b15313d32c77194bb544a2f3697 100644 (file)
@@ -9,7 +9,7 @@
          updated_at="2014-02-19"
          tags="[null]" system_tags="[null]"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-         cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
+         is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
       />
 
   <!-- Constant/issue with coefficient and offset -> Update rule to Constant/issue with only offset -->
@@ -21,7 +21,7 @@
          updated_at="2014-02-19"
          tags="[null]" system_tags="[null]"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-         cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
+         is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
       />
 
   <!-- Constant/issue with coefficient but having same value as default -> No update -->
@@ -33,7 +33,7 @@
          updated_at="2014-02-19"
          tags="[null]" system_tags="[null]"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-         cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
+         is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
       />
 
   <!-- Requirements of rule 1 -->
index a5515cbf26c7f8883382b2f92b9c7b5cac352d84..a1587e6c13cfcaa5606eeb628cb3545533212b9a 100644 (file)
@@ -9,7 +9,7 @@
          updated_at="2014-03-13"
          tags="[null]" system_tags="[null]"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-         cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
+         is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
       />
 
   <!-- Constant/issue with coefficient and offset -> Update rule to Constant/issue with only offset -->
@@ -21,7 +21,7 @@
          updated_at="2014-03-13"
          tags="[null]" system_tags="[null]"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-         cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
+         is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
       />
 
   <!-- Constant/issue with coefficient but having same value as default -> No update -->
@@ -33,7 +33,7 @@
          updated_at="2014-02-19"
          tags="[null]" system_tags="[null]"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-         cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
+         is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
       />
 
 </dataset>
index 8e6279e1b0e35d28731c99ab968fb28f0d8b6239..9641153d3a5be6043db12278cd75bf394becaa19 100644 (file)
@@ -7,7 +7,7 @@
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-    cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to a disabled requirement -> Update rule to disable characteristic -->
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="LeftCurlyBraceStartLineCheck" plugin_name="squid" name="LeftCurlyBraceStartLineCheck" description="Left curly braces should be located at the beginning of lines of code" status="READY"
@@ -15,7 +15,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Removed rule linked to a disabled requirement -> Do nothing -->
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="CallToFileDeleteOnExitMethod" plugin_name="squid" name="CallToFileDeleteOnExitMethod" description="CallToFileDeleteOnExitMethod" status="REMOVED"
@@ -23,7 +23,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement="[null]" with same value of debt -> Nothing to do -->
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="ObjectFinalizeOverridenCallsSuperFinalizeCheck" plugin_name="squid" name="ObjectFinalizeOverridenCallsSuperFinalizeCheck" description="super.finalize() should be called at the end of Object.finalize() implementations" status="READY"
@@ -31,7 +31,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5min"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
@@ -39,7 +39,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Constant per issue function (with a coefficient of 0d -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
@@ -47,7 +47,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0min -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="7" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
@@ -55,7 +55,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear with offset function (with a offset of 0h -> should be replaced by 0d)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="8" plugin_rule_key="ClassVariableVisibilityCheck" plugin_name="squid" name="ClassVariableVisibilityCheck" description="ClassVariableVisibilityCheck" status="READY"
@@ -63,7 +63,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0d -> should keep 0d)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="9" plugin_rule_key="SwitchLastCaseIsDefaultCheck" plugin_name="squid" name="SwitchLastCaseIsDefaultCheck" description="SwitchLastCaseIsDefaultCheck" status="READY"
@@ -71,7 +71,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- No requirement for rule 1 -->
 
index db6603d525bf458fd6376205160fd03bfb5ecf59..c9b877c1d93bd30608a3d1ac5d4510ce85f8c6ec 100644 (file)
@@ -7,7 +7,7 @@
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-         cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to a disabled requirements -> Update rule to disable characteristic -->
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="LeftCurlyBraceStartLineCheck" plugin_name="squid" name="LeftCurlyBraceStartLineCheck" description="Left curly braces should be located at the beginning of lines of code" status="READY"
@@ -15,7 +15,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-03-13"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Removed rule linked to a disabled requirement -> Do nothing -->
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="CallToFileDeleteOnExitMethod" plugin_name="squid" name="CallToFileDeleteOnExitMethod" description="CallToFileDeleteOnExitMethod" status="REMOVED"
@@ -23,7 +23,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement, with same value of debt -> Nothing to do -->
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="ObjectFinalizeOverridenCallsSuperFinalizeCheck" plugin_name="squid" name="ObjectFinalizeOverridenCallsSuperFinalizeCheck" description="super.finalize() should be called at the end of Object.finalize() implementations" status="READY"
@@ -31,7 +31,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5min"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement, with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
@@ -39,7 +39,7 @@
          remediation_function="LINEAR_OFFSET" default_remediation_function="LINEAR"
          remediation_coeff="20min" default_remediation_coeff="5d"
          remediation_offset="30h" default_remediation_offset="[null]" updated_at="2014-03-13"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Constant per issue function (with a coefficient of 0d -> to be replaced by null), with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
@@ -47,7 +47,7 @@
          remediation_function="CONSTANT_ISSUE" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="15min" default_remediation_offset="[null]" updated_at="2014-03-13"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0min -> to be replaced by null), with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="7" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
@@ -55,7 +55,7 @@
          remediation_function="LINEAR" default_remediation_function="LINEAR"
          remediation_coeff="0min" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-03-13"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear with offset function (with a offset of 0h -> should keep 0h), with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="8" plugin_rule_key="ClassVariableVisibilityCheck" plugin_name="squid" name="ClassVariableVisibilityCheck" description="ClassVariableVisibilityCheck" status="READY"
@@ -63,7 +63,7 @@
          remediation_function="LINEAR_OFFSET" default_remediation_function="LINEAR"
          remediation_coeff="5d" default_remediation_coeff="5d"
          remediation_offset="0h" default_remediation_offset="[null" updated_at="2014-03-13"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0d -> should keep 0d), with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="9" plugin_rule_key="SwitchLastCaseIsDefaultCheck" plugin_name="squid" name="SwitchLastCaseIsDefaultCheck" description="SwitchLastCaseIsDefaultCheck" status="READY"
@@ -71,7 +71,7 @@
          remediation_function="LINEAR" default_remediation_function="LINEAR"
          remediation_coeff="0d" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-03-13"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <loaded_templates id="1" kee="CopyRequirementsFromCharacteristicsToRules" template_type="ONE_SHOT_TASK"/>
 
index 461157ade196f27139434c8bfa06b244b8d86a8b..da4a48c354c7a562fe1729549ce8acbe674f297e 100644 (file)
@@ -10,7 +10,7 @@
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-    cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+    is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to a disabled requirement -> Update rule to disable characteristic -->
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="LeftCurlyBraceStartLineCheck" plugin_name="squid" name="LeftCurlyBraceStartLineCheck" description="Left curly braces should be located at the beginning of lines of code" status="READY"
@@ -18,7 +18,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Removed rule linked to a disabled requirement -> Do nothing -->
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="CallToFileDeleteOnExitMethod" plugin_name="squid" name="CallToFileDeleteOnExitMethod" description="CallToFileDeleteOnExitMethod" status="REMOVED"
@@ -26,7 +26,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement="[null]" with same value of debt -> Nothing to do -->
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="ObjectFinalizeOverridenCallsSuperFinalizeCheck" plugin_name="squid" name="ObjectFinalizeOverridenCallsSuperFinalizeCheck" description="super.finalize() should be called at the end of Object.finalize() implementations" status="READY"
@@ -34,7 +34,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5min"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
@@ -42,7 +42,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Constant per issue function (with a coefficient of 0d -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
@@ -50,7 +50,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0min -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="7" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
@@ -58,7 +58,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear with offset function (with a offset of 0h -> should be replaced by 0d)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="8" plugin_rule_key="ClassVariableVisibilityCheck" plugin_name="squid" name="ClassVariableVisibilityCheck" description="ClassVariableVisibilityCheck" status="READY"
@@ -66,7 +66,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0d -> should keep 0d)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="9" plugin_rule_key="SwitchLastCaseIsDefaultCheck" plugin_name="squid" name="SwitchLastCaseIsDefaultCheck" description="SwitchLastCaseIsDefaultCheck" status="READY"
@@ -74,7 +74,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- No requirement for rule 1 -->
 
index 8e6279e1b0e35d28731c99ab968fb28f0d8b6239..dd9318dadd403b491281941a97d16ff3727ba7b0 100644 (file)
@@ -7,7 +7,7 @@
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
          NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
-    cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+    is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to a disabled requirement -> Update rule to disable characteristic -->
   <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="LeftCurlyBraceStartLineCheck" plugin_name="squid" name="LeftCurlyBraceStartLineCheck" description="Left curly braces should be located at the beginning of lines of code" status="READY"
@@ -15,7 +15,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Removed rule linked to a disabled requirement -> Do nothing -->
   <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="CallToFileDeleteOnExitMethod" plugin_name="squid" name="CallToFileDeleteOnExitMethod" description="CallToFileDeleteOnExitMethod" status="REMOVED"
@@ -23,7 +23,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement="[null]" with same value of debt -> Nothing to do -->
   <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="ObjectFinalizeOverridenCallsSuperFinalizeCheck" plugin_name="squid" name="ObjectFinalizeOverridenCallsSuperFinalizeCheck" description="super.finalize() should be called at the end of Object.finalize() implementations" status="READY"
@@ -31,7 +31,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
          remediation_coeff="[null]" default_remediation_coeff="5min"
          remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
@@ -39,7 +39,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Constant per issue function (with a coefficient of 0d -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
@@ -47,7 +47,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0min -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="7" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
@@ -55,7 +55,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear with offset function (with a offset of 0h -> should be replaced by 0d)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="8" plugin_rule_key="ClassVariableVisibilityCheck" plugin_name="squid" name="ClassVariableVisibilityCheck" description="ClassVariableVisibilityCheck" status="READY"
@@ -63,7 +63,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0d -> should keep 0d)="[null]" with different value of debt -> Update rule -->
   <rules tags="[null]" system_tags="[null]" id="9" plugin_rule_key="SwitchLastCaseIsDefaultCheck" plugin_name="squid" name="SwitchLastCaseIsDefaultCheck" description="SwitchLastCaseIsDefaultCheck" status="READY"
@@ -71,7 +71,7 @@
          remediation_function="[null]" default_remediation_function="LINEAR"
          remediation_coeff="[null]" default_remediation_coeff="5d"
          remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
-         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" cardinality="[null]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
+         NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
 
   <!-- No requirement for rule 1 -->