Package com.buschmais.jqassistant.core.model.api.rule

Examples of com.buschmais.jqassistant.core.model.api.rule.RuleSet


* Implementation of the {@link RuleSelector}.
*/
public class RuleSelectorImpl implements RuleSelector {
    @Override
    public RuleSet getEffectiveRuleSet(RuleSet ruleSet, List<String> conceptNames, List<String> constraintNames, List<String> groupNames) throws RuleSetResolverException {
        RuleSet effectiveRuleSet = new RuleSet();
        // Use the default group if no group, constraint or concept is specified.
        List<String> selectedGroupNames;
        if (CollectionUtils.isEmpty(groupNames) && CollectionUtils.isEmpty(constraintNames) && CollectionUtils.isEmpty(conceptNames)) {
            selectedGroupNames = Arrays.asList(new String[]{DEFAULT_GROUP});
        } else {
View Full Code Here


            cacheXmlTypes(rule.getQueryDefinition(), queryDefinitionTypes);
            cacheXmlTypes(rule.getConcept(), conceptTypes);
            cacheXmlTypes(rule.getConstraint(), constraintTypes);
            cacheXmlTypes(rule.getGroup(), groupTypes);
        }
        RuleSet ruleSet = new RuleSet();
        readConcepts(queryDefinitionTypes, conceptTypes, ruleSet);
        readConstraints(queryDefinitionTypes, conceptTypes, constraintTypes, ruleSet);
        readGroups(conceptTypes, constraintTypes, groupTypes, ruleSet);
        return ruleSet;
    }
View Full Code Here

     *
     * @return The resolved rule set.
     * @throws MojoExecutionException If resolving fails.
     */
    protected RuleSet resolveEffectiveRules() throws MojoExecutionException {
        RuleSet ruleSet = readRules();
        validateRuleSet(ruleSet);
        try {
            return ruleSelector.getEffectiveRuleSet(ruleSet, concepts, constraints, groups);
        } catch (RuleSetResolverException e) {
            throw new MojoExecutionException("Cannot resolve rules.", e);
View Full Code Here

*/
public class AvailableRulesMojo extends AbstractAnalysisAggregatorMojo {

    @Override
    public void aggregate() throws MojoExecutionException, MojoFailureException {
        RuleSet ruleSet = readRules();
        logRuleSet(ruleSet);
    }
View Full Code Here

*/
public class EffectiveRulesMojo extends AbstractAnalysisAggregatorMojo {

    @Override
    public void aggregate() throws MojoExecutionException, MojoFailureException {
        RuleSet targetRuleSet = resolveEffectiveRules();
        logRuleSet(targetRuleSet);
    }
View Full Code Here

     */
    protected boolean failOnConstraintViolations;

    @Override
    public void aggregate() throws MojoExecutionException, MojoFailureException {
        final RuleSet ruleSet = resolveEffectiveRules();
        InMemoryReportWriter inMemoryReportWriter = new InMemoryReportWriter();
        FileWriter xmlReportFileWriter;
        try {
            xmlReportFileWriter = new FileWriter(getXmlReportFile());
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of com.buschmais.jqassistant.core.model.api.rule.RuleSet

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.