class SeverityPolicyEvaluator extends AbstractPolicyEvaluator {

    private static final Logger LOGGER = Logger.getLogger(SeverityPolicyEvaluator.class);

    /**
     * {@inheritDoc}
     */
    @Override
    public PolicyCondition.Subject supportedSubject() {
        return PolicyCondition.Subject.SEVERITY;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<PolicyConditionViolation> evaluate(final Policy policy, final Component component) {<FILL_FUNCTION_BODY>}

}

        final List<PolicyConditionViolation> violations = new ArrayList<>();
        final List<PolicyCondition> policyConditions = super.extractSupportedConditions(policy);
        if (policyConditions.isEmpty()) {
            return violations;
        }
        //final Component component = qm.getObjectById(Component.class, c.getId());
        for (final Vulnerability vulnerability : qm.getAllVulnerabilities(component, false)) {
            for (final PolicyCondition condition: policyConditions) {
                LOGGER.debug("Evaluating component (" + component.getUuid() + ") against policy condition (" + condition.getUuid() + ")");
                if (PolicyCondition.Operator.IS == condition.getOperator()) {
                    if (vulnerability.getSeverity().name().equals(condition.getValue())) {
                        violations.add(new PolicyConditionViolation(condition, component));
                    }
                } else if (PolicyCondition.Operator.IS_NOT == condition.getOperator()) {
                    if (! vulnerability.getSeverity().name().equals(condition.getValue())) {
                        violations.add(new PolicyConditionViolation(condition, component));
                    }
                }
            }
        }
        return violations;
    
<methods>public non-sealed void <init>() ,public void setQueryManager(org.dependencytrack.persistence.QueryManager) <variables>protected org.dependencytrack.persistence.QueryManager qm