From 84a51513bca9c41c8757db017eb45b2d801da195 Mon Sep 17 00:00:00 2001 From: xuegao Date: Fri, 4 Sep 2020 15:29:15 +0200 Subject: Use meaningful workflow name When generate csar, use meaningful workflow name instead of null. Issue-ID: SDC-3230 Signed-off-by: xuegao Change-Id: I250e2f928aa33b2da86a7c458c098713c43a5074 --- .../datatypes/elements/OperationDataDefinition.java | 20 ++++++++++++++++++++ .../be/datatypes/enums/JsonPresentationFields.java | 2 ++ 2 files changed, 22 insertions(+) (limited to 'common-be') diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java index 4c14551c1b..f93e41cf51 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java @@ -28,6 +28,8 @@ import java.io.Serializable; import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ASSOCIATION_TYPE; import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ID; +import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_NAME; +import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION; import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION_ID; public class OperationDataDefinition extends ToscaDataDefinition implements Serializable { @@ -53,6 +55,8 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri setWorkflowId(p.getWorkflowId()); setWorkflowVersionId(p.getWorkflowVersionId()); setWorkflowAssociationType(p.getWorkflowAssociationType()); + setWorkflowName(p.getWorkflowName()); + setWorkflowVersion(p.getWorkflowVersion()); } public String getDescription() { @@ -109,6 +113,14 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri setToscaPresentationValue(IO_WORKFLOW_ID, workflowId); } + public String getWorkflowName() { + return (String) getToscaPresentationValue(IO_WORKFLOW_NAME); + } + + public void setWorkflowName(String workflowName) { + setToscaPresentationValue(IO_WORKFLOW_NAME, workflowName); + } + public String getWorkflowVersionId() { return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID); } @@ -117,6 +129,14 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId); } + public String getWorkflowVersion() { + return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION); + } + + public void setWorkflowVersion(String workflowVersion) { + setToscaPresentationValue(IO_WORKFLOW_VERSION, workflowVersion); + } + public String getWorkflowAssociationType() { return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE); } diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java index 58baeb549c..46a3f99abc 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java @@ -234,6 +234,8 @@ public enum JsonPresentationFields { IO_MANDATORY("mandatory", null), IO_TYPE("type", null), IO_PROPERTY("property", null), + IO_WORKFLOW_NAME("workflowName", null), + IO_WORKFLOW_VERSION("workflowVersion", null), IO_WORKFLOW_ID("workflowId", null), IO_WORKFLOW_VERSION_ID("workflowVersionId", null), IO_WORKFLOW_ASSOCIATION_TYPE("workflowAssociationType", null), -- cgit 1.2.3-korg