aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src
diff options
context:
space:
mode:
authormojahidi <mojahidul.islam@amdocs.com>2018-07-30 17:01:26 +0530
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-07-31 13:24:04 +0000
commiteb736d244351be91e519a11d51217a3183329dd9 (patch)
tree4698a20bacec1f7345284e800ef2d495b504d01b /catalog-be/src
parenta9fd70f3839766507a58e2eabb38c2d70b7a4330 (diff)
Alligned operation ui model
Alligned operation ui model Change-Id: I88f8a443f1a7a7d2e5258ff0dee0f5dc9809d050 Issue-ID: SDC-1535 Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'catalog-be/src')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/InterfaceUIDataConverter.java22
1 files changed, 16 insertions, 6 deletions
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<OperationInputDefinition> inputs = new ListDataDefinition<>();
if (inputParams != null) {
List<OperationInputDefinition> 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<InterfaceOperationParamDataDefinition> outputParams = interfaceOperation.getOutputParams();
ListDataDefinition<OperationOutputDefinition> outputs = new ListDataDefinition<>();
if(outputParams != null) {
List<OperationOutputDefinition> 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<OperationInputDefinition> inputs = operationData.getInputs();
List<InterfaceOperationParamDataDefinition> inputParamList = inputs.getListToscaDataDefinition().stream()
.map(operationInputDefinition -> new InterfaceOperationParamDataDefinition(operationInputDefinition.getName(),
- operationInputDefinition.getInputId())).collect(
+ operationInputDefinition.getInputId(),
+ operationInputDefinition.isRequired(),
+ operationInputDefinition.getType())).collect(
Collectors.toList());
ListDataDefinition<InterfaceOperationParamDataDefinition> inputParams = new ListDataDefinition<>();
inputParamList.forEach(inputParams::add);
@@ -75,7 +84,8 @@ public class InterfaceUIDataConverter {
ListDataDefinition<OperationOutputDefinition> outputs = operationData.getOutputs();
List<InterfaceOperationParamDataDefinition> outputParamList = outputs.getListToscaDataDefinition()
.stream().map(operationOutputDefinition -> new InterfaceOperationParamDataDefinition(operationOutputDefinition.getName(),
- operationOutputDefinition.getInputId())).collect(Collectors.toList());
+ operationOutputDefinition.isRequired(),
+ operationOutputDefinition.getType())).collect(Collectors.toList());
ListDataDefinition<InterfaceOperationParamDataDefinition> outputParams = new ListDataDefinition<>();
outputParamList.forEach(outputParams::add);