use of org.eclipse.smarthome.model.rule.rules.Rule in project smarthome by eclipse.
the class RuleEngineImpl method executeRules.
protected synchronized void executeRules(Iterable<Rule> rules, Item item, Command command) {
for (Rule rule : rules) {
RuleEvaluationContext context = new RuleEvaluationContext();
context.newValue(QualifiedName.create(RulesJvmModelInferrer.VAR_TRIGGERING_ITEM), item);
context.newValue(QualifiedName.create(RulesJvmModelInferrer.VAR_RECEIVED_COMMAND), command);
executeRule(rule, context);
}
}
use of org.eclipse.smarthome.model.rule.rules.Rule in project smarthome by eclipse.
the class RuleEngineImpl method executeRules.
protected synchronized void executeRules(Iterable<Rule> rules, ChannelTriggeredEvent event) {
for (Rule rule : rules) {
RuleEvaluationContext context = new RuleEvaluationContext();
context.newValue(QualifiedName.create(RulesJvmModelInferrer.VAR_RECEIVED_EVENT), event);
executeRule(rule, context);
}
}
use of org.eclipse.smarthome.model.rule.rules.Rule in project smarthome by eclipse.
the class RuleEngineImpl method executeRules.
protected synchronized void executeRules(Iterable<Rule> rules) {
for (Rule rule : rules) {
RuleEvaluationContext context = new RuleEvaluationContext();
executeRule(rule, context);
}
}
use of org.eclipse.smarthome.model.rule.rules.Rule in project smarthome by eclipse.
the class RuleEngineImpl method executeRules.
protected synchronized void executeRules(Iterable<Rule> rules, Item item) {
for (Rule rule : rules) {
RuleEvaluationContext context = new RuleEvaluationContext();
context.newValue(QualifiedName.create(RulesJvmModelInferrer.VAR_TRIGGERING_ITEM), item);
executeRule(rule, context);
}
}
use of org.eclipse.smarthome.model.rule.rules.Rule in project smarthome by eclipse.
the class RuleEngineImpl method executeRules.
protected synchronized void executeRules(Iterable<Rule> rules, Item item, State oldState) {
for (Rule rule : rules) {
RuleEvaluationContext context = new RuleEvaluationContext();
context.newValue(QualifiedName.create(RulesJvmModelInferrer.VAR_TRIGGERING_ITEM), item);
context.newValue(QualifiedName.create(RulesJvmModelInferrer.VAR_PREVIOUS_STATE), oldState);
executeRule(rule, context);
}
}
Aggregations