/** * Delegating DynamicGBean setAttribute method. * * @param name of attribute. * @param value of attribute to be set. * @throws Exception */ public void setAttribute(final String name, final Object value) throws Exception { delegate.setAttribute(name, value); }
/** * Delegating DynamicGBean setAttribute method. * @param name of attribute. * @param value of attribute to be set. * @throws Exception */ public void setAttribute(final String name, final Object value) throws Exception { delegate.setAttribute(name, value); }
public void setAttribute(String name, Object value) throws Exception { delegate.setAttribute(name, value); }
public void setAttribute(String name, Object value) throws Exception { Thread thread = Thread.currentThread(); ClassLoader oldTCL = thread.getContextClassLoader(); thread.setContextClassLoader(classLoader); try { //Convert java.util.Properties to java.lang.String if(value != null && value instanceof Properties){ Properties ps = (Properties) value; if (!ps.isEmpty()) { StringBuilder s = new StringBuilder(); for (Object o : ps.keySet()) { String k = (String) o; String v = ps.getProperty(k); s = s.append(k).append("=").append(v).append(","); } delegate.setAttribute(name, s.toString()); log.debug("Setting " + name + " value " + s); } } else { delegate.setAttribute(name, value); log.debug("Setting " + name + " value " + value); } } finally { thread.setContextClassLoader(oldTCL); } }