Package org.openhab.model.rule.rules

Examples of org.openhab.model.rule.rules.UpdateEventTrigger


      if(newType instanceof State) {
        State state = (State) newType;
        for(Rule rule : rules) {
          for(EventTrigger t : rule.getEventtrigger()) {
            if (t instanceof UpdateEventTrigger) {
              UpdateEventTrigger ut = (UpdateEventTrigger) t;
              if(ut.getItem().equals(item.getName())) {
                if(ut.getState()!=null) {
                  State triggerState = TypeParser.parseState(item.getAcceptedDataTypes(), ut.getState());
                  if(!state.equals(triggerState)) {
                    continue;
                  }
                }
                result.add(rule);
View Full Code Here


          rules = new HashSet<Rule>();
          commandEventTriggeredRules.put(ceTrigger.getItem(), rules);
        }
        rules.add(rule);
      } else if(t instanceof UpdateEventTrigger) {
        UpdateEventTrigger ueTrigger = (UpdateEventTrigger) t;
        Set<Rule> rules = updateEventTriggeredRules.get(ueTrigger.getItem());
        if(rules==null) {
          rules = new HashSet<Rule>();
          updateEventTriggeredRules.put(ueTrigger.getItem(), rules);
        }
        rules.add(rule);
      } else if(t instanceof ChangedEventTrigger) {
        ChangedEventTrigger ceTrigger = (ChangedEventTrigger) t;
        Set<Rule> rules = changedEventTriggeredRules.get(ceTrigger.getItem());
View Full Code Here

TOP

Related Classes of org.openhab.model.rule.rules.UpdateEventTrigger

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.