diff options
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java | 9 | ||||
-rw-r--r-- | catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceAttribOutput.java | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java index ecab6402c6..603270ec0a 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java @@ -300,7 +300,7 @@ public class OutputsBusinessLogic extends BaseBusinessLogic { final var optionalComponentInstance = component.getComponentInstanceByName(getAttribute.get(0)); if (optionalComponentInstance.isPresent()) { final var createdOutputs - = createOutputs(component.getUniqueId(), userId, getAttribute.get(1), optionalComponentInstance.get()); + = createOutputs(component.getUniqueId(), userId, getAttribute.get(1), optionalComponentInstance.get(),outputDefinitionValue.getName()); if (createdOutputs.isRight()) { return Either.right((createdOutputs.right().value())); } @@ -318,7 +318,8 @@ public class OutputsBusinessLogic extends BaseBusinessLogic { private Either<List<OutputDefinition>, ResponseFormat> createOutputs(final String componentUniqueId, final String userId, final String attributeName, - final ComponentInstance componentInstance) { + final ComponentInstance componentInstance, + final String outputName) { // From Instance final var componentInstanceAttributes = componentInstance.getAttributes(); if (CollectionUtils.isNotEmpty(componentInstanceAttributes)) { @@ -327,7 +328,7 @@ public class OutputsBusinessLogic extends BaseBusinessLogic { if (componentInstanceAttributeOptional.isPresent()) { final var componentInstOutputsMap = new ComponentInstOutputsMap(); componentInstOutputsMap.setComponentInstanceAttributes(Collections.singletonMap(componentInstance.getUniqueId(), - Collections.singletonList(new ComponentInstanceAttribOutput(componentInstanceAttributeOptional.get())))); + Collections.singletonList(new ComponentInstanceAttribOutput(componentInstanceAttributeOptional.get(),outputName)))); return createMultipleOutputs(userId, componentUniqueId, ComponentTypeEnum.SERVICE, componentInstOutputsMap, true, false); } @@ -341,7 +342,7 @@ public class OutputsBusinessLogic extends BaseBusinessLogic { final ComponentInstOutputsMap componentInstOutputsMap = new ComponentInstOutputsMap(); ComponentInstanceAttribOutput attribute = getComponentInstanceAttribOutput(propertyDefinition); componentInstOutputsMap.setComponentInstanceAttributes(Collections.singletonMap(componentInstance.getUniqueId(), - Collections.singletonList(new ComponentInstanceAttribOutput(attribute)))); + Collections.singletonList(new ComponentInstanceAttribOutput(attribute,outputName)))); return createMultipleOutputs(userId, componentUniqueId, ComponentTypeEnum.SERVICE, componentInstOutputsMap, true, false); } } diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceAttribOutput.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceAttribOutput.java index 42ff192ac7..c59a91891a 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceAttribOutput.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceAttribOutput.java @@ -37,6 +37,10 @@ public class ComponentInstanceAttribOutput extends ComponentInstanceAttribute { public ComponentInstanceAttribOutput(ComponentInstanceAttribute p) { super(p); } + public ComponentInstanceAttribOutput(ComponentInstanceAttribute p,String outputName) { + super(p); + this.outputName = outputName; + } public String[] getParsedAttribNames() { String[] tokens = null; |