X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FDefaultExecutionFlowDescriptorConverter.java;h=b2b613494c5c5d90be063d418b0290236447db90;hb=af874b12bcb864e1ee2b48e8d6e1fea3a584c53d;hp=baa9b86a1d9a1daec12d0a44fa9884206ff87800;hpb=b2531c398b51dde19d6ceb4952fc5bdcc4c9e1e2;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java index baa9b86a1..b2b613494 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlowDescriptorConverter.java @@ -27,6 +27,9 @@ public class DefaultExecutionFlowDescriptorConverter implements ExecutionFlowDescriptorConverter, ApplicationContextAware { public final static String REF_VALUE_TYPE_BEAN_NAME = "beanName"; + /** Workaround for https://www.spartadn.com/bugzilla/show_bug.cgi?id=206 */ + private final static String REF_VALUE_IS_FROZEN = "__frozen"; + private final static Log log = LogFactory .getLog(DefaultExecutionFlowDescriptorConverter.class); @@ -38,7 +41,13 @@ public class DefaultExecutionFlowDescriptorConverter implements Map convertedValues = new HashMap(); if (values != null) { - for (String key : values.keySet()) { + values: for (String key : values.keySet()) { + ExecutionSpecAttribute attribute = executionFlowDescriptor + .getExecutionSpec().getAttributes().get(key); + + if (attribute.getIsFrozen()) + continue values; + Object value = values.get(key); if (value instanceof PrimitiveValue) { PrimitiveValue primitiveValue = (PrimitiveValue) value; @@ -95,8 +104,12 @@ public class DefaultExecutionFlowDescriptorConverter implements // all necessary information is in the spec } } else if (attribute instanceof RefSpecAttribute) { - values.put(key, buildRefValue((RefSpecAttribute) attribute, - executionFlow, key)); + if (attribute.getIsFrozen()) { + values.put(key, new RefValue(REF_VALUE_IS_FROZEN)); + } else + values.put(key, buildRefValue( + (RefSpecAttribute) attribute, executionFlow, + key)); } else { throw new SlcException("Unkown spec attribute type " + attribute.getClass()); @@ -158,10 +171,11 @@ public class DefaultExecutionFlowDescriptorConverter implements } } } - if (ref == null) - log.warn("Cannot define reference for ref spec attribute " - + key + " in " + executionFlow + " (" + rsa + ")"); - else if (log.isDebugEnabled()) + if (ref == null) { + if (log.isTraceEnabled()) + log.warn("Cannot define reference for ref spec attribute " + + key + " in " + executionFlow + " (" + rsa + ")"); + } else if (log.isDebugEnabled()) log.debug(ref + " is the reference for ref spec attribute " + key + " in " + executionFlow + " (" + rsa + ")"); refValue.setRef(ref);