Examples of RuleInvoker


Examples of com.lewisd.maven.lint.RuleInvoker

        return outputReportList;
    }

    private void executeRules(ResultCollector resultCollector) throws MojoExecutionException {
        ModelFactory modelFactory = getContext().getBean(ModelFactory.class);
        RuleInvoker ruleInvoker = new RuleInvoker(getProject(), modelFactory);

        Set<Rule> rulesToRun = new RulesSelector(getRules()).selectRules(rules, onlyRunRules);

        for (Rule rule : rulesToRun) {
            executeRule(resultCollector, ruleInvoker, rule);
View Full Code Here

Examples of com.lewisd.maven.lint.RuleInvoker

        ruleInvoker = getRuleInvokerWithPom(filename);
    }

    protected RuleInvoker getRuleInvokerWithPom(String filename) throws IOException, XmlPullParserException {
        MavenProject mavenProject = MavenProjectUtil.getMavenProjectFromPOM(filename);
        return new RuleInvoker(mavenProject, new CachingModelFactory());
    }
View Full Code Here

Examples of org.apache.stratos.throttling.manager.rules.RuleInvoker

            List<ThrottlingTaskDataProviderConfiguration> dataProviderConfigs)
            throws ThrottlingException {
        this.parameters = parameters;
        this.dataProviderIterator = new DataProviderIterator(dataProviderConfigs);
        // initialize the rule invokers
        ruleInvoker = new RuleInvoker();
    }
View Full Code Here

Examples of org.apache.stratos.throttling.manager.rules.RuleInvoker

            log.error(msg, e);
            throw new JobExecutionException(msg, e);
        }

        // invoke the rule.
        RuleInvoker ruleInvoker = task.getRuleInvoker();
        try {
            //updating the rule. this is important if we are having more than one managers running
            ruleInvoker.updateRules();
            ruleInvoker.invoke(knowledgeBase);
            log.info("Throttling rules executed successfully");
        } catch (ThrottlingException e) {
            String msg = "Error in invoking the throttling rule invoker.";
            log.error(msg, e);
            throw new JobExecutionException(msg, e);
View Full Code Here

Examples of org.apache.stratos.throttling.manager.rules.RuleInvoker

            ruleContentResource.setContent(ruleContent);
            systemRegistry.put(StratosConstants.THROTTLING_RULES_PATH, ruleContentResource);

            List<Task> tasks = Util.getTasks();
            for (Task task : tasks) {
                RuleInvoker ruleInvoker = task.getRuleInvoker();
                ruleInvoker.updateRules();
            }
            updateSuccess = true;
        } finally {
            if (updateSuccess) {
                systemRegistry.commitTransaction();
View Full Code Here

Examples of org.apache.stratos.throttling.manager.rules.RuleInvoker

            // initialize the knowledge base
            List<Object> knowledgeBase = new ArrayList<Object>();
            ThrottlingDataContext throttlingDataContext =
                    KnowledgeBaseManager.feedKnowledgeBase(currentTenantId, task, knowledgeBase);

            RuleInvoker ruleInvoker = task.getRuleInvoker();
            ruleInvoker.invoke(knowledgeBase);

            log.info("Throttling rules executed for tenant id: " + currentTenantId);
           
            ValidationInfoManager.persistValidationDetails(throttlingDataContext);
        }
View Full Code Here

Examples of org.wso2.carbon.throttling.manager.rules.RuleInvoker

            ruleContentResource.setContent(ruleContent);
            systemRegistry.put(StratosConstants.THROTTLING_RULES_PATH, ruleContentResource);

            List<Task> tasks = Util.getTasks();
            for (Task task : tasks) {
                RuleInvoker ruleInvoker = task.getRuleInvoker();
                ruleInvoker.updateRules();
            }
            updateSuccess = true;
        } finally {
            if (updateSuccess) {
                systemRegistry.commitTransaction();
View Full Code Here

Examples of org.wso2.carbon.throttling.manager.rules.RuleInvoker

            // initialize the knowledge base
            List<Object> knowledgeBase = new ArrayList<Object>();
            ThrottlingDataContext throttlingDataContext =
                    KnowledgeBaseManager.feedKnowledgeBase(tenantId, task, knowledgeBase);

            RuleInvoker ruleInvoker = task.getRuleInvoker();
            ruleInvoker.invoke(knowledgeBase);

            ValidationInfoManager.persistValidationDetails(throttlingDataContext);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.throttling.manager.rules.RuleInvoker

            log.error(msg, e);
            throw new JobExecutionException(msg, e);
        }

        // invoke the rule.
        RuleInvoker ruleInvoker = task.getRuleInvoker();
        try {
            ruleInvoker.invoke(knowledgeBase);
        } catch (ThrottlingException e) {
            String msg = "Error in invoking the ruleInvoker.";
            log.error(msg, e);
            throw new JobExecutionException(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.throttling.manager.rules.RuleInvoker

            List<ThrottlingTaskDataProviderConfiguration> dataProviderConfigs)
            throws ThrottlingException {
        this.parameters = parameters;
        this.dataProviderIterator = new DataProviderIterator(dataProviderConfigs);
        // initialize the rule invokers
        ruleInvoker = new RuleInvoker();
    }
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.