aboutsummaryrefslogtreecommitdiffstats
path: root/common-be/src
diff options
context:
space:
mode:
authormojahidi <mojahidul.islam@amdocs.com>2018-07-19 12:35:31 +0530
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-07-30 10:03:24 +0000
commita8480d1fec5b5696be04eb887f4cbed6b56238be (patch)
tree59f3e71a9f780e3aee6519cfda4080a4ef356729 /common-be/src
parent734d54df49905998d1952a8a3b1a5caf38a05fa0 (diff)
Add support for workflowId and workflowVersionId
Enhance operation data model and APIs to support workflowId and workflowVersionId Change-Id: Ib8772027a3e0147ae0bb59811a9b31fe46975ac6 Issue-ID: SDC-1535 Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'common-be/src')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java26
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java20
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java1
3 files changed, 46 insertions, 1 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java
index 4607364f53..bbc3164f50 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java
@@ -22,7 +22,15 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
import java.io.Serializable;
-import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.*;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.ARTIFACT_UUID;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.DESCRIPTION;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_INPUT_PARAMETERS;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_OPERATION_TYPE;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_OUTPUT_PARAMETERS;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ID;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION_ID;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.TOSCA_RESOURCE_NAME;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.UNIQUE_ID;
public class InterfaceOperationDataDefinition extends ToscaDataDefinition implements Serializable {
@@ -40,6 +48,8 @@ public class InterfaceOperationDataDefinition extends ToscaDataDefinition implem
setToscaResourceName(iodd.getToscaResourceName());
setOperationType(iodd.getOperationType());
setArtifactUUID(iodd.getArtifactUUID());
+ setWorkflowId(iodd.getWorkflowId());
+ setWorkflowVersionId(iodd.getWorkflowVersionId());
}
public ListDataDefinition<InterfaceOperationParamDataDefinition> getInputParams() {
@@ -88,6 +98,20 @@ public class InterfaceOperationDataDefinition extends ToscaDataDefinition implem
setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);
}
+ public String getWorkflowId(){
+ return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
+ }
+ public void setWorkflowId(String workflowId) {
+ setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
+ }
+
+ public String getWorkflowVersionId() {
+ return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
+ }
+ public void setWorkflowVersionId(String workflowVersionId) {
+ setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
+ }
+
public String getArtifactUUID() {
return (String) getToscaPresentationValue(ARTIFACT_UUID);
}
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 5363cbbb2a..49c8ba24a5 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
@@ -26,6 +26,9 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
import java.io.Serializable;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ID;
+import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_VERSION_ID;
+
public class OperationDataDefinition extends ToscaDataDefinition implements Serializable {
@@ -46,6 +49,8 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri
setOutputs(p.getOutputs());
setName(p.getName());
setUniqueId(p.getUniqueId());
+ setWorkflowId(p.getWorkflowId());
+ setWorkflowVersionId(p.getWorkflowVersionId());
}
@@ -114,4 +119,19 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri
public void setName(String name) {
setToscaPresentationValue(JsonPresentationFields.NAME, name);
}
+
+ public String getWorkflowId(){
+ return (String) getToscaPresentationValue(IO_WORKFLOW_ID);
+ }
+ public void setWorkflowId(String workflowId) {
+ setToscaPresentationValue(IO_WORKFLOW_ID, workflowId);
+ }
+
+ public String getWorkflowVersionId() {
+ return (String) getToscaPresentationValue(IO_WORKFLOW_VERSION_ID);
+ }
+ public void setWorkflowVersionId(String workflowVersionId) {
+ setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
+ }
+
}
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 98b91c1628..912e3d94b1 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
@@ -221,6 +221,7 @@ public enum JsonPresentationFields {
IO_PARAM_NAME("paramName", null),
IO_PARAM_ID("paramId", null),
IO_WORKFLOW_ID("workflowId", null),
+ IO_WORKFLOW_VERSION_ID("workflowVersionId", null),
//Interface
INTERFACE ("interface", null),