/** * Find a method with the right name If found, call the method ( if param is * int or boolean we'll convert value to the right type before) - that means * you can have setDebug(1). */ public static boolean setProperty(Object o, String name, String value) { return setProperty(o,name,value,true); } public static boolean setProperty(Object o, String name, String value,
/** * Find a method with the right name If found, call the method ( if param is * int or boolean we'll convert value to the right type before) - that means * you can have setDebug(1). * @param o The object to set a property on * @param name The property name * @param value The property value * @return <code>true</code> if operation was successful */ public static boolean setProperty(Object o, String name, String value) { return setProperty(o,name,value,true); }
/** * Find a method with the right name If found, call the method ( if param is * int or boolean we'll convert value to the right type before) - that means * you can have setDebug(1). */ public static boolean setProperty(Object o, String name, String value) { return setProperty(o,name,value,true); }
/** * Set a configured property. */ public boolean setProperty(String name, String value) { String repl = name; if (replacements.get(name) != null) { repl = replacements.get(name); } return IntrospectionUtils.setProperty(protocolHandler, repl, value); }
/** * Set a configured property. */ public boolean setProperty(String name, String value) { String repl = name; if (replacements.get(name) != null) { repl = replacements.get(name); } return IntrospectionUtils.setProperty(protocolHandler, repl, value); }
/** * Set a configured property. */ public boolean setProperty(String name, String value) { String repl = name; if (replacements.get(name) != null) { repl = (String) replacements.get(name); } return IntrospectionUtils.setProperty(protocolHandler, repl, value); }
/** * Set a configured property. */ public boolean setProperty(String name, String value) { String repl = name; if (replacements.get(name) != null) { repl = replacements.get(name); } return IntrospectionUtils.setProperty(protocolHandler, repl, value); }
/** * Set a configured property. */ public boolean setProperty(String name, String value) { String repl = name; if (replacements.get(name) != null) { repl = replacements.get(name); } return IntrospectionUtils.setProperty(protocolHandler, repl, value); }
/** * Set a configured property. */ public boolean setProperty(String name, String value) { String repl = name; if (replacements.get(name) != null) { repl = (String) replacements.get(name); } return IntrospectionUtils.setProperty(protocolHandler, repl, value); }
protected void setParameters(Object object, Map<String, String> map){ if (map != null){ Set<String> keySet = map.keySet(); Iterator<String> iterator = keySet.iterator(); while(iterator.hasNext()){ String name = iterator.next(); String value = map.get(name); IntrospectionUtils.setProperty(object, name, value); } } }
protected void setParameters(Object object, Map map){ if (map != null){ Set keySet = map.keySet(); Iterator iterator = keySet.iterator(); while(iterator.hasNext()){ String name = (String)iterator.next(); String value = (String)map.get(name); IntrospectionUtils.setProperty(object, name, value); } } }
public void handle(Object managerObject, Map<String, String> nameValueMap) throws Exception { for (Iterator<String> it = nameValueMap.keySet().iterator(); it.hasNext();) { String sCurrentParameterName = it.next(); String sCurrentParameterValue = nameValueMap.get(sCurrentParameterName); if (sCurrentParameterValue != null) { sCurrentParameterValue = sCurrentParameterValue.trim(); } IntrospectionUtils.setProperty(managerObject, sCurrentParameterName, sCurrentParameterValue); } } }
public void init(FilterConfig filterConfig) throws ServletException { Enumeration<String> paramNames = filterConfig.getInitParameterNames(); while (paramNames.hasMoreElements()) { String paramName = paramNames.nextElement(); if (!IntrospectionUtils.setProperty(this, paramName, filterConfig.getInitParameter(paramName))) { filterConfig.getServletContext().log(sm.getString("filterbase.noSuchProperty", paramName, this.getClass().getName())); } } }
public void init(FilterConfig filterConfig) throws ServletException { Enumeration<String> paramNames = filterConfig.getInitParameterNames(); while (paramNames.hasMoreElements()) { String paramName = paramNames.nextElement(); if (!IntrospectionUtils.setProperty(this, paramName, filterConfig.getInitParameter(paramName))) { filterConfig.getServletContext().log(MESSAGES.propertyNotFound(paramName, this.getClass().getName())); } } }
@Override public void init(FilterConfig filterConfig) throws ServletException { Enumeration<String> paramNames = filterConfig.getInitParameterNames(); while (paramNames.hasMoreElements()) { String paramName = paramNames.nextElement(); if (!IntrospectionUtils.setProperty(this, paramName, filterConfig.getInitParameter(paramName))) { getLogger().warn(sm.getString("filterbase.noSuchProperty", paramName, this.getClass().getName())); } } }
@Override public void init(FilterConfig filterConfig) throws ServletException { Enumeration<String> paramNames = filterConfig.getInitParameterNames(); while (paramNames.hasMoreElements()) { String paramName = paramNames.nextElement(); if (!IntrospectionUtils.setProperty(this, paramName, filterConfig.getInitParameter(paramName))) { getLogger().warn(sm.getString("filterbase.noSuchProperty", paramName, this.getClass().getName())); } } }
private void setClassLoaderProperty(String name, boolean value) { ClassLoader cl = getLoader().getClassLoader(); if (!IntrospectionUtils.setProperty(cl, name, Boolean.toString(value))) { // Failed to set log.info(sm.getString( "standardContext.webappClassLoader.missingProperty", name, Boolean.toString(value))); } }
private void setClassLoaderProperty(String name, boolean value) { ClassLoader cl = getLoader().getClassLoader(); if (!IntrospectionUtils.setProperty(cl, name, Boolean.toString(value))) { // Failed to set log.info(sm.getString( "standardContext.webappClassLoader.missingProperty", name, Boolean.toString(value))); } }
private void setClassLoaderProperty(String name, boolean value) { ClassLoader cl = getLoader().getClassLoader(); if (!IntrospectionUtils.setProperty(cl, name, Boolean.toString(value))) { // Failed to set log.info(sm.getString( "standardContext.webappClassLoader.missingProperty", name, Boolean.toString(value))); } }
public void setBeanProperty( Object target, String name, String val ) { if( val!=null ) val=IntrospectionUtils.replaceProperties( val, props, null ); if( log.isDebugEnabled()) log.debug( "setProperty " + target + " " + name + "=" + val ); IntrospectionUtils.setProperty( target, name, val ); }