import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
-import org.argeo.slc.UnsupportedException;
import org.argeo.slc.execution.ExecutionFlow;
import org.argeo.slc.execution.ExecutionFlowDescriptor;
import org.argeo.slc.execution.ExecutionFlowDescriptorConverter;
.getAttributes().get(key);
if (attribute == null)
- throw new SlcException("No spec attribute defined for '"
- + key + "'");
+ throw new FlowConfigurationException(
+ "No spec attribute defined for '" + key + "'");
if (attribute.getIsConstant())
continue values;
Object obj = PrimitiveUtils.convert(type, ref);
convertedValues.put(key, obj);
} else {
- throw new UnsupportedException("Ref value type",
- refValue.getType());
+ throw new FlowConfigurationException(
+ "Ref value type not supported: "
+ + refValue.getType());
}
} else {
// default is to take the value as is
public ExecutionFlowDescriptor getExecutionFlowDescriptor(
ExecutionFlow executionFlow) {
if (executionFlow.getName() == null)
- throw new SlcException("Flow name is null: " + executionFlow);
+ throw new FlowConfigurationException("Flow name is null: "
+ + executionFlow);
String name = executionFlow.getName();
ExecutionSpec executionSpec = executionFlow.getExecutionSpec();
if (executionSpec == null)
- throw new SlcException("Execution spec is null: " + executionFlow);
+ throw new FlowConfigurationException("Execution spec is null: "
+ + executionFlow);
if (executionSpec.getName() == null)
- throw new SlcException("Execution spec name is null: "
- + executionSpec);
+ throw new FlowConfigurationException(
+ "Execution spec name is null: " + executionSpec);
Map<String, Object> values = new TreeMap<String, Object>();
for (String key : executionSpec.getAttributes().keySet()) {
buildRefValue((RefSpecAttribute) attribute,
executionFlow, key));
} else {
- throw new SlcException("Unkown spec attribute type "
- + attribute.getClass());
+ throw new FlowConfigurationException(
+ "Unkown spec attribute type " + attribute.getClass());
}
}