Package ch.qos.logback.core.util

Examples of ch.qos.logback.core.util.PropertySetter


    try {
      DataSource ds =
        (DataSource) OptionHelper.instantiateByClassName(dsClassName, DataSource.class, context);

      PropertySetter setter = new PropertySetter(ds);

      if (!OptionHelper.isEmpty(urlStr)) {
        setter.setProperty("url", urlStr);
      }

      if (!OptionHelper.isEmpty(userStr)) {
        setter.setProperty("user", userStr);
      }

      if (!OptionHelper.isEmpty(passwordStr)) {
        setter.setProperty("password", passwordStr);
      }

      Context ctx = new InitialContext();
      ctx.rebind("dataSource", ds);
    } catch (Exception oops) {
View Full Code Here


    // remove both leading and trailing spaces
    value = value.trim();

    Object o = ec.peekObject();
    PropertySetter propSetter = new PropertySetter(o);
    value = ec.subst(value);

    // allow for variable substitution for name as well
    name = ec.subst(name);

    //getLogger().debug(
    //  "In ParamAction setting parameter [{}] to value [{}].", name, value);
    propSetter.setProperty(name, value);
  }
View Full Code Here

    try {
      DataSource ds =
        (DataSource) OptionHelper.instantiateByClassName(dsClassName, DataSource.class);

      PropertySetter setter = new PropertySetter(ds);

      if (!OptionHelper.isEmpty(urlStr)) {
        setter.setProperty("url", urlStr);
      }

      if (!OptionHelper.isEmpty(userStr)) {
        setter.setProperty("user", userStr);
      }

      if (!OptionHelper.isEmpty(passwordStr)) {
        setter.setProperty("password", passwordStr);
      }

      Context ctx = new InitialContext();
      ctx.rebind("dataSource", ds);
    } catch (Exception oops) {
View Full Code Here

    // remove both leading and trailing spaces
    value = value.trim();

    Object o = ec.peekObject();
    PropertySetter propSetter = new PropertySetter(o);
    propSetter.setContext(context);
    value = ec.subst(value);

    // allow for variable substitution for name as well
    name = ec.subst(name);

    //getLogger().debug(
    //  "In ParamAction setting parameter [{}] to value [{}].", name, value);
    propSetter.setProperty(name, value);
  }
View Full Code Here

    if (ec.isEmpty()) {
      return false;
    }

    Object o = ec.peekObject();
    PropertySetter parentBean = new PropertySetter(o);
    parentBean.setContext(context);

    ContainmentType containmentType = parentBean
        .canContainComponent(nestedElementTagName);

    switch (containmentType) {
    case NOT_FOUND:
    case AS_SINGLE_PROPERTY:
View Full Code Here

    if (actionData.inError) {
      return;
    }

    PropertySetter nestedBean = new PropertySetter(actionData.nestedComponent);
    nestedBean.setContext(context);

    if (nestedBean.canContainComponent("parent") == ContainmentType.AS_SINGLE_COMPONENT) {
      nestedBean.setComponent("parent", actionData.parentBean.getObj());
    }
    if (actionData.nestedComponent instanceof LifeCycle) {
      ((LifeCycle) actionData.nestedComponent).start();
    }
View Full Code Here

    if(ec.isEmpty()) {
      return false;
    }
   
    Object o = ec.peekObject();
    PropertySetter parentBean = new PropertySetter(o);
    parentBean.setContext(context);
   
    ContainmentType containmentType = parentBean.canContainComponent(nestedElementTagName);

    switch (containmentType) {
    case NOT_FOUND:
    case AS_SINGLE_COMPONENT:
    case AS_COMPONENT_COLLECTION:
View Full Code Here

    try {
      DataSource ds =
        (DataSource) OptionHelper.instantiateByClassName(dsClassName, DataSource.class, context);

      PropertySetter setter = new PropertySetter(ds);
      setter.setContext(context);

      if (!OptionHelper.isEmpty(urlStr)) {
        setter.setProperty("url", urlStr);
      }

      if (!OptionHelper.isEmpty(userStr)) {
        setter.setProperty("user", userStr);
      }

      if (!OptionHelper.isEmpty(passwordStr)) {
        setter.setProperty("password", passwordStr);
      }

      Context ctx = new InitialContext();
      ctx.rebind("dataSource", ds);
    } catch (Exception oops) {
View Full Code Here

    // remove both leading and trailing spaces
    value = value.trim();

    Object o = ec.peekObject();
    PropertySetter propSetter = new PropertySetter(o);
    value = ec.subst(value);

    // allow for variable substitution for name as well
    name = ec.subst(name);

    //getLogger().debug(
    //  "In ParamAction setting parameter [{}] to value [{}].", name, value);
    propSetter.setProperty(name, value);
  }
View Full Code Here

    Pattern pattern, Attributes attributes, ExecutionContext ec) {
    //LogLog.debug("in NestComponentIA.isApplicable <" + pattern + ">");
    String nestedElementTagName = pattern.peekLast();

    Object o = ec.peekObject();
    PropertySetter parentBean = new PropertySetter(o);

    int containmentType = parentBean.canContainComponent(nestedElementTagName);

    switch (containmentType) {
    case PropertySetter.NOT_FOUND:
      return false;
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.util.PropertySetter

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.