01: package org.concern.controller.spring;
02:
03: import org.concern.controller.ParameterResolver;
04: import org.concern.model.EnvironmentEntry;
05:
06: import java.util.*;
07:
08: /**
09: * @author hengels
10: * @version $Revision$
11: */
12: public class LocalParameterResolver implements ParameterResolver {
13: Map parameters;
14:
15: public LocalParameterResolver(Map parameters) {
16: this .parameters = parameters;
17: }
18:
19: public Object resolve(String process, String name, String type) {
20: Object value = parameters.get(name);
21: if (value != null && !value.getClass().getName().equals(type)
22: && value instanceof String)
23: value = EnvironmentEntry.createInstance(type,
24: (String) value);
25: return value;
26: }
27: }
|