Package org.openhab.binding.nikobus.internal.config

Examples of org.openhab.binding.nikobus.internal.config.AbstractNikobusItemConfig


    super.processBindingConfiguration(context, item, bindingConfig);
    String config = (bindingConfig == null) ? "" : bindingConfig.replaceAll(" ", "").toUpperCase();
    log.trace("Binding item: {} with configuration {}", item.getName(), config);

    final AbstractNikobusItemConfig itemBinding = parseItem(item, config);

    addBindingConfig(item, itemBinding);
  }
View Full Code Here


  public void internalReceiveCommand(String itemName, Command command) {

    log.trace("Received command {} for item {}", command.toString(), itemName);

    // get the item's corresponding Nikobus binding configuration
    AbstractNikobusItemConfig itemBinding = null;
    for (NikobusBindingProvider provider : providers) {
      if (provider.providesBindingFor(itemName)) {
        itemBinding = provider.getItemConfig(itemName);
        break;
      }
    }

    if (providers.size() == 0) {
      log.error("No providers");
    }
    if (itemBinding == null) {
      log.trace("No item found");
      return;
    }

    try {
      // process the command
      itemBinding.processCommand(command, this);
    } catch (Exception e) {
      log.error(
        "Error processing commmand {} for item {} : {}",
        new Object[] { command.toString(), itemBinding.getName(), e.getMessage() });
    }

  }
View Full Code Here

TOP

Related Classes of org.openhab.binding.nikobus.internal.config.AbstractNikobusItemConfig

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.