/** * Convert map to real values based on factory Params. * * <p>The resulting map should still be checked with factory.acceptsMap( map ) * * @param factory * @param params * @return Map with real values that may be acceptable to Factory * @throws IOException DOCUMENT ME! */ public static Map toConnectionParams(DataAccessFactory factory, Map params) throws IOException { Map map = new HashMap(params.size()); Param[] info = factory.getParametersInfo(); // Convert Params into the kind of Map we actually need for (Iterator i = params.keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); Object value = find(info, key).lookUp(params); if (value != null) { map.put(key, value); } } return map; }