Package org.sonar.server.rule.index

Examples of org.sonar.server.rule.index.RuleIndex


    return value;
  }

  BulkChangeResult bulkActivate(RuleQuery ruleQuery, String profileKey, @Nullable String severity) {
    BulkChangeResult result = new BulkChangeResult();
    RuleIndex ruleIndex = index.get(RuleIndex.class);
    DbSession dbSession = db.openSession(false);
    try {
      Result<Rule> ruleSearchResult = ruleIndex.search(ruleQuery, new QueryContext().setScroll(true)
        .setFieldsToReturn(Arrays.asList(RuleNormalizer.RuleField.KEY.field())));
      Iterator<Rule> rules = ruleSearchResult.scroll();
      while (rules.hasNext()) {
        Rule rule = rules.next();
        try {
View Full Code Here


  }

  BulkChangeResult bulkDeactivate(RuleQuery ruleQuery, String profile) {
    DbSession dbSession = db.openSession(false);
    try {
      RuleIndex ruleIndex = index.get(RuleIndex.class);
      BulkChangeResult result = new BulkChangeResult();
      Result<Rule> ruleSearchResult = ruleIndex.search(ruleQuery, new QueryContext().setScroll(true)
        .setFieldsToReturn(Arrays.asList(RuleNormalizer.RuleField.KEY.field())));
      Iterator<Rule> rules = ruleSearchResult.scroll();
      while (rules.hasNext()) {
        try {
          Rule rule = rules.next();
View Full Code Here

TOP

Related Classes of org.sonar.server.rule.index.RuleIndex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.