- if (executionSpec.getAttributes().containsKey(name)) {
- ExecutionSpecAttribute esa = executionSpec.getAttributes().get(
- name);
- if (esa.getValue() != null)
- return esa.getValue();
+ throw new SlcException("Key " + parameterName
+ + " is not defined in the specifications of " + toString());
+ }
+
+ if (parameters.containsKey(parameterName)) {
+ Object paramValue = parameters.get(parameterName);
+ if (specAttr instanceof ResourceSpecAttribute) {
+ // deal with resources
+ Resource resource = resourceLoader.getResource(paramValue
+ .toString());
+ return ((ResourceSpecAttribute) specAttr)
+ .convertResource(resource);