use of org.jbpm.process.core.datatype.impl.type.FloatDataType in project drools-wb by kiegroup.
the class WorkItemsEditorServiceImpl method convertWorkItemParameters.
private Set<PortableParameterDefinition> convertWorkItemParameters(final Set<ParameterDefinition> parameters) {
final Set<PortableParameterDefinition> pps = new HashSet<PortableParameterDefinition>();
for (ParameterDefinition pd : parameters) {
final DataType pdt = pd.getType();
PortableParameterDefinition ppd = null;
if (pdt instanceof BooleanDataType) {
ppd = new PortableBooleanParameterDefinition();
} else if (pdt instanceof FloatDataType) {
ppd = new PortableFloatParameterDefinition();
} else if (pdt instanceof IntegerDataType) {
ppd = new PortableIntegerParameterDefinition();
} else if (pdt instanceof ObjectDataType) {
ppd = new PortableObjectParameterDefinition();
final PortableObjectParameterDefinition oppd = (PortableObjectParameterDefinition) ppd;
final ObjectDataType odt = (ObjectDataType) pdt;
oppd.setClassName(odt.getClassName());
} else if (pd.getType() instanceof StringDataType) {
ppd = new PortableStringParameterDefinition();
}
if (ppd != null) {
ppd.setName(pd.getName());
pps.add(ppd);
}
}
return pps;
}
Aggregations