Package ch.qos.logback.core.joran.spi

Examples of ch.qos.logback.core.joran.spi.PropertySetter


    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


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

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

    AggregationType aggregationType = parentBean
        .computeAggregationType(nestedElementTagName);

    switch (aggregationType) {
    case NOT_FOUND:
    case AS_COMPLEX_PROPERTY:
View Full Code Here

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

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

    AggregationType aggregationType = parentBean
        .computeAggregationType(nestedElementTagName);

    switch (aggregationType) {
    case NOT_FOUND:
    case AS_BASIC_PROPERTY:
View Full Code Here

      if (!OptionHelper.isEmpty(className)) {
        componentClass = Loader.loadClass(className, context);
      } else {
        // guess class name via implicit rules
        PropertySetter parentBean = actionData.parentBean;
        componentClass = parentBean.getClassNameViaImplicitRules(actionData
            .getComplexPropertyName(), actionData.getAggregationType(), ec
            .getDefaultNestedComponentRegistry());
      }

      if (componentClass == null) {
View Full Code Here

    if (actionData.inError) {
      return;
    }

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

    // have the nested element point to its parent if possible
    if (nestedBean.computeAggregationType("parent") == AggregationType.AS_COMPLEX_PROPERTY) {
      nestedBean.setComplexProperty("parent", actionData.parentBean.getObj());
    }
    // start the nested complex attribute if it implements LifeCycle
    if (actionData.getNestedComplexProperty() instanceof LifeCycle) {
      ((LifeCycle) actionData.getNestedComplexProperty()).start();
    }
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

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

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

    AggregationType aggregationType = parentBean
        .computeAggregationType(nestedElementTagName);

    switch (aggregationType) {
    case NOT_FOUND:
    case AS_COMPLEX_PROPERTY:
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 (ic.isEmpty()) {
      return false;
    }

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

    AggregationType aggregationType = parentBean
        .computeAggregationType(nestedElementTagName);

    switch (aggregationType) {
    case NOT_FOUND:
    case AS_BASIC_PROPERTY:
View Full Code Here

      if (!OptionHelper.isEmpty(className)) {
        componentClass = Loader.loadClass(className, context);
      } else {
        // guess class name via implicit rules
        PropertySetter parentBean = actionData.parentBean;
        componentClass = parentBean.getClassNameViaImplicitRules(actionData
            .getComplexPropertyName(), actionData.getAggregationType(), ec
            .getDefaultNestedComponentRegistry());
      }

      if (componentClass == null) {
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.joran.spi.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.