From eb736d244351be91e519a11d51217a3183329dd9 Mon Sep 17 00:00:00 2001 From: mojahidi Date: Mon, 30 Jul 2018 17:01:26 +0530 Subject: Alligned operation ui model Alligned operation ui model Change-Id: I88f8a443f1a7a7d2e5258ff0dee0f5dc9809d050 Issue-ID: SDC-1535 Signed-off-by: mojahidi --- .../datamodel/utils/InterfaceUIDataConverter.java | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'catalog-be') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/InterfaceUIDataConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/InterfaceUIDataConverter.java index 98a49b023d..f0cdf3ec70 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/InterfaceUIDataConverter.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/InterfaceUIDataConverter.java @@ -37,16 +37,23 @@ public class InterfaceUIDataConverter { ListDataDefinition inputs = new ListDataDefinition<>(); if (inputParams != null) { List inputList = inputParams.getListToscaDataDefinition().stream() - .map(interfaceOperationParamDataDefinition -> new OperationInputDefinition(interfaceOperationParamDataDefinition.getParamName(), - interfaceOperationParamDataDefinition.getParamId())).collect(Collectors.toList()); + .map(interfaceOperationParamDataDefinition -> new OperationInputDefinition( + interfaceOperationParamDataDefinition.getName(), + interfaceOperationParamDataDefinition.getProperty(), + interfaceOperationParamDataDefinition.getMandatory(), + interfaceOperationParamDataDefinition.getType() + )).collect(Collectors.toList()); inputList.forEach(inputs::add); } ListDataDefinition outputParams = interfaceOperation.getOutputParams(); ListDataDefinition outputs = new ListDataDefinition<>(); if(outputParams != null) { List outputList = outputParams.getListToscaDataDefinition().stream() - .map(interfaceOperationParamDataDefinition -> new OperationOutputDefinition(interfaceOperationParamDataDefinition.getParamName(), - interfaceOperationParamDataDefinition.getParamId())).collect(Collectors.toList()); + .map(interfaceOperationParamDataDefinition -> new OperationOutputDefinition( + interfaceOperationParamDataDefinition.getName(), + interfaceOperationParamDataDefinition.getMandatory(), + interfaceOperationParamDataDefinition.getType() + )).collect(Collectors.toList()); outputList.forEach(outputs::add); } @@ -67,7 +74,9 @@ public class InterfaceUIDataConverter { ListDataDefinition inputs = operationData.getInputs(); List inputParamList = inputs.getListToscaDataDefinition().stream() .map(operationInputDefinition -> new InterfaceOperationParamDataDefinition(operationInputDefinition.getName(), - operationInputDefinition.getInputId())).collect( + operationInputDefinition.getInputId(), + operationInputDefinition.isRequired(), + operationInputDefinition.getType())).collect( Collectors.toList()); ListDataDefinition inputParams = new ListDataDefinition<>(); inputParamList.forEach(inputParams::add); @@ -75,7 +84,8 @@ public class InterfaceUIDataConverter { ListDataDefinition outputs = operationData.getOutputs(); List outputParamList = outputs.getListToscaDataDefinition() .stream().map(operationOutputDefinition -> new InterfaceOperationParamDataDefinition(operationOutputDefinition.getName(), - operationOutputDefinition.getInputId())).collect(Collectors.toList()); + operationOutputDefinition.isRequired(), + operationOutputDefinition.getType())).collect(Collectors.toList()); ListDataDefinition outputParams = new ListDataDefinition<>(); outputParamList.forEach(outputParams::add); -- cgit 1.2.3-korg