示例#1
0
  /** Obtain findings for a specific tool and rule-id. */
  private FindingCollection obtainFindings(String tool, String ruleIdentifier) {
    FindingReport report = NodeUtils.getFindingReport(scope);

    FindingCollection result = new FindingCollection();

    for (FindingCategory category : report.getChildren()) {
      if (!category.getName().equals(tool)) {
        continue;
      }
      for (FindingGroup group : category.getChildren()) {
        if (ruleIdentifier.equals(group.getValue(NodeConstants.RULE_IDENTIFIER_KEY))) {
          List<Finding> findings = Arrays.asList(group.getChildren());
          result.addAll(findings);
        }
      }
    }

    return result;
  }
 /** {@inheritDoc} */
 @Override
 protected void setUp(ITokenResource root) throws ConQATException {
   super.setUp(root);
   findingReport = NodeUtils.getFindingReport(root);
 }