use of com.plumdo.flow.rest.variable.RestVariableConverter in project plumdo-work by wengwh.
the class RestResponseFactory method getVariableValue.
public Object getVariableValue(RestVariable restVariable) {
Object value = null;
if (restVariable.getType() != null) {
RestVariableConverter converter = null;
for (RestVariableConverter conv : variableConverters) {
if (conv.getRestTypeName().equals(restVariable.getType())) {
converter = conv;
break;
}
}
if (converter == null) {
throw new FlowableIllegalArgumentException("Variable '" + restVariable.getName() + "' has unsupported type: '" + restVariable.getType() + "'.");
}
value = converter.getVariableValue(restVariable);
} else {
value = restVariable.getValue();
}
return value;
}
Aggregations