Package org.beangle.ems.rule

Examples of org.beangle.ems.rule.Rule


    List<Rule> rules = CollectUtils.newArrayList();
    // Rule rule1 = (Rule) Model.newInstance(Rule.class);
    // rule1.setFactory(DefaultRuleExecutorBuilder.SPRING);
    // rule1.setServiceName("ruleExecutor1");

    Rule rule2 = new RuleBean();
    rule2.setFactory(DefaultRuleExecutorBuilder.BEAN);
    rule2.setServiceName("org.beangle.rule.impl.RuleExecutor2");

    // rules.add(rule1);
    rules.add(rule2);

    Context context = new SimpleContext();
View Full Code Here


*/
public class RuleAction extends SecurityActionSupport {

  @Override
  protected String saveAndForward(Entity<?> entity) {
    Rule rule = (Rule) entity;
    if (null == rule.getId()) {
      rule.setCreatedAt(new Date());
      rule.setUpdatedAt(new Date());
    } else {
      rule.setUpdatedAt(new Date());
    }
    entityDao.saveOrUpdate(rule);
    return redirect("search", "info.save.success");
  }
View Full Code Here

    RuleBase ruleBase = new TestRuleBase();
    // Rule rule1 = new BusinessRule();
    // rule1.setFactory(DefaultRuleExecutorBuilder.SPRING);
    // rule1.setServiceName("ruleExecutor1");

    Rule rule2 = new RuleBean();
    rule2.setFactory(DefaultRuleExecutorBuilder.BEAN);
    rule2.setServiceName("org.beangle.rule.impl.RuleExecutor2");

    // ruleBase.getRules().add(rule1);
    ruleBase.getRules().add(rule2);
    engine.setRuleExecutorBuilder((RuleExecutorBuilder) applicationContext.getBean("ruleExecutorBuilder"));
    engine.setRuleBase(ruleBase);
View Full Code Here

*/
public class RuleAction extends SecurityActionSupport {

  @Override
  protected String saveAndForward(Entity<?> entity) {
    Rule rule = (Rule) entity;
    if (null == rule.getId()) {
      rule.setCreatedAt(new Date());
      rule.setUpdatedAt(new Date());
    } else {
      rule.setUpdatedAt(new Date());
    }
    entityDao.saveOrUpdate(rule);
    return redirect("search", "info.save.success");
  }
View Full Code Here

TOP

Related Classes of org.beangle.ems.rule.Rule

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.