Examples of Rule


Examples of org.sonar.check.Rule

    return null;
  }

  private String getRuleKey(Object annotatedClassOrObject) {
    String key = null;
    Rule ruleAnnotation = AnnotationUtils.getAnnotation(annotatedClassOrObject, Rule.class);
    if (ruleAnnotation != null) {
      key = ruleAnnotation.key();
    }
    Class clazz = annotatedClassOrObject.getClass();
    if (annotatedClassOrObject instanceof Class) {
      clazz = (Class) annotatedClassOrObject;
    }
View Full Code Here

Examples of org.sonar.server.rule.Rule

  public void getByKey() throws InterruptedException {
    RuleDto ruleDto = RuleTesting.newDto(RuleKey.of("javascript", "S001"));
    dao.insert(dbSession, ruleDto);
    dbSession.commit();

    Rule rule = index.getByKey(RuleKey.of("javascript", "S001"));

    assertThat(rule.htmlDescription()).isEqualTo(ruleDto.getDescription());
    assertThat(rule.key()).isEqualTo(ruleDto.getKey());

    assertThat(rule.debtRemediationFunction().type().name())
      .isEqualTo(ruleDto.getRemediationFunction());

    assertThat(Sets.newHashSet(rule.tags())).isEqualTo(ruleDto.getTags());
    assertThat(Sets.newHashSet(rule.systemTags())).isEqualTo(ruleDto.getSystemTags());
  }
View Full Code Here

Examples of org.sonar.wsclient.rule.Rule

  private void parseRules(DefaultIssues result, Map jsonRoot) {
    List<Map> jsonRules = (List<Map>) jsonRoot.get("rules");
    if (jsonRules != null) {
      for (Map jsonRule : jsonRules) {
        result.add(new Rule(jsonRule));
      }
    }
  }
View Full Code Here

Examples of org.sonar.wsclient.services.Rule

            int pageIndex=1;
            do{
                query.pageIndex(pageIndex);
                result = issueClient.find(query);
                for(Issue issue:result.list()) {
                    Rule rule = rulesCache.get(issue.ruleKey());
                    if(rule == null) {
                        rule=getRule(userCredentials, issue.ruleKey());
                        if(rule == null){
                            throw new IllegalStateException("No such rule in server: "+issue.ruleKey());
                        }
View Full Code Here

Examples of org.w3c.www.protocol.http.proxy.Rule

  protected void replace() {
      if (selected == -1) {
    error("No rule selected");
    return;
      }
      Rule replaced = null;
      try {
    String tokens[] = getTokens();
    if (tokens != null)
        replaced = editor.replaceRule(tokens, selected);
      } catch (RuleParserException ex) {
    error(ex);
      }
      if (replaced != null) {
    lrules.replaceItem(replaced.toString(), selected);
    setModified(true);
      }
  }
View Full Code Here

Examples of org.wso2.carbon.rule.common.Rule

                    ruleBackendRuntimeFactory.getRuleBackendRuntime(ruleEngineProvider.getProperties(),
                                                                    Thread.currentThread().getContextClassLoader());

            // create a rule set to add
            RuleSet ruleSet = new RuleSet();
            Rule rule = new Rule();
            rule.setResourceType(Constants.RULE_RESOURCE_TYPE_REGULAR);

            rule.setSourceType(Constants.RULE_SOURCE_TYPE_REGISTRY);
            rule.setValue("gov:" + StratosConstants.THROTTLING_RULES_PATH);
            ruleSet.addRule(rule);

            ruleBackendRuntime.addRuleSet(ruleSet);

            this.session = ruleBackendRuntime.createSession(Constants.RULE_STATEFUL_SESSION);
View Full Code Here

Examples of our.apache.commons.digester.Rule

        addRule(pattern, new BogusCallParamLiteralRule(paramIndex, value));
    }

    // Inherit Javadoc
    public void addObjectCreate(String pattern, Class clazz) {
        Rule objectCreateRule;
        if (Enabled.class.isAssignableFrom(clazz)) {
            // Create Enabled objects specially.
            objectCreateRule = new EnabledObjectCreateRule(clazz,
                AlwaysEnabled.class.isAssignableFrom(clazz));
        } else {
View Full Code Here

Examples of rocket.style.client.Rule

    }-*/;

  public Rule getRule(final StyleSheet styleSheet, final int index) {
    Checker.notNull("parameter:styleSheet", styleSheet);
   
    final Rule rule = this.getRule0(styleSheet, index);
    if (null == rule) {
      throw new IllegalArgumentException("The parameter:index is outside the range of actual stylesheets, index: " + index);
    }
    return rule;
  }
View Full Code Here

Examples of ru.bmstu.datalog.data.Rule

   * Rule ::= Predicate :- Predicate (',' Predicate)*
   * @return {@link Rule}
   * @throws Exception
   */
  private static Rule parseRule() throws Exception {   
    Rule rule = new Rule();
    rule.setHead(parsePredicate());
   
    parseString(":-");
   
    rule.addToBody(parsePredicate());
   
    while (skipSymbol(','))
      rule.addToBody(parsePredicate());
   
    parseSymbol('.');
   
    return rule;
  }
View Full Code Here

Examples of rulesystem.Rule

                inputMap.put(this.uniqueIdColumnName,
                        resultSet.getString(this.uniqueIdColumnName));
                inputMap.put(this.uniqueOutputColumnName,
                        resultSet.getString(this.uniqueOutputColumnName));

                rules.add(new Rule(this.inputColumnList, inputMap, this.uniqueIdColumnName, this.uniqueOutputColumnName));
            }
        }

        return rules;
    }
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.