Package org.jibeframework.core.app.config

Examples of org.jibeframework.core.app.config.ConfigElement


    Assert.notEmpty(els, "Can not find config elements with id: " + id);
    return getConfig(els);
  }

  private ConfigElement getConfig(List<ConfigElement> els) {
    ConfigElement result = null;
    for (ConfigElement element : els) {
      if (result == null) {
        boolean applies = evaluator.applies(element.getCondition());
        if (applies) {
          result = element;
        }
      } else {
        boolean applies = evaluator.applies(element.getCondition());
        if (applies) {
          if (!element.isReplace()) {
            result = result.combine(element);
          } else {
            result = element;
          }
        }
      }
    }
    return result.createCopy();
  }
View Full Code Here


      List<ConfigElement> list = globalElements.get(configElement.getClass());
      if (configElement.getCondition() != null) {
        list.add(configElement);
      } else {
        if (!list.isEmpty() && list.get(0).getCondition() == null) {
          ConfigElement first = list.get(0);
          ConfigElement combined = first.combine(configElement);
          list.remove(0);
          list.add(0, combined);
        } else {
          list.add(configElement);
        }
View Full Code Here

TOP

Related Classes of org.jibeframework.core.app.config.ConfigElement

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.