+ RefValue refValue = (RefValue) value;
+ String type = refValue.getType();
+ if (REF_VALUE_TYPE_BEAN_NAME.equals(type)) {
+ // FIXME: UI should send all information about spec
+ // - targetClass
+ // - name
+ // String executionSpecName = executionSpec.getName();
+ // ExecutionSpec localSpec = (ExecutionSpec)
+ // applicationContext
+ // .getBean(executionSpecName);
+ // RefSpecAttribute localAttr = (RefSpecAttribute)
+ // localSpec
+ // .getAttributes().get(key);
+ // Class<?> targetClass = localAttr.getTargetClass();
+ //
+ // String primitiveType = PrimitiveUtils
+ // .classAsType(targetClass);
+ String primitiveType = null;
+ if (primitiveType != null) {
+ // not active
+ String ref = refValue.getRef();
+ Object obj = PrimitiveUtils.convert(primitiveType,
+ ref);
+ convertedValues.put(key, obj);
+ } else {
+ String ref = refValue.getRef();
+ if (ref != null && !ref.equals(REF_VALUE_INTERNAL)) {
+ Object obj = null;
+ if (applicationContext.containsBean(ref)) {
+ obj = applicationContext.getBean(ref);
+ } else {
+ // FIXME: hack in order to pass primitive
+ obj = ref;
+ }
+ convertedValues.put(key, obj);
+ } else {
+ log.warn("Cannot interpret " + refValue);
+ }
+ }
+ } else if (PrimitiveUtils.typeAsClass(type) != null) {
+ String ref = refValue.getRef();
+ Object obj = PrimitiveUtils.convert(type, ref);
+ convertedValues.put(key, obj);
+ } else {
+ throw new UnsupportedException("Ref value type",
+ refValue.getType());
+ }