Package org.sonar.core.qualityprofile.db

Examples of org.sonar.core.qualityprofile.db.ActiveRuleKey.ruleKey()


    ActiveRuleKey key = activeRuleDto.getKey();
    Preconditions.checkArgument(key != null, "Cannot normalize ActiveRuleDto with null key");

    Map<String, Object> newRule = new HashMap<String, Object>();
    newRule.put("_parent", key.ruleKey().toString());
    newRule.put(ActiveRuleField.RULE_KEY.field(), key.ruleKey().toString());
    newRule.put(ActiveRuleField.KEY.field(), key.toString());
    newRule.put(ActiveRuleField.INHERITANCE.field(),
      (activeRuleDto.getInheritance() != null) ?
        activeRuleDto.getInheritance() :
View Full Code Here


    ActiveRuleKey key = activeRuleDto.getKey();
    Preconditions.checkArgument(key != null, "Cannot normalize ActiveRuleDto with null key");

    Map<String, Object> newRule = new HashMap<String, Object>();
    newRule.put("_parent", key.ruleKey().toString());
    newRule.put(ActiveRuleField.RULE_KEY.field(), key.ruleKey().toString());
    newRule.put(ActiveRuleField.KEY.field(), key.toString());
    newRule.put(ActiveRuleField.INHERITANCE.field(),
      (activeRuleDto.getInheritance() != null) ?
        activeRuleDto.getInheritance() :
        ActiveRule.Inheritance.NONE.name());
View Full Code Here

      }

      /* Creating updateRequest */
      requests.add(new UpdateRequest()
        .replicationType(ReplicationType.ASYNC)
        .routing(key.ruleKey().toString())
        .id(activeRuleDto.getKey().toString())
        .parent(activeRuleDto.getKey().ruleKey().toString())
        .doc(newRule)
        .upsert(getUpsertFor(ActiveRuleField.ALL_FIELDS, newRule)));

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.