Added support for AssociateWorkflowType 66/70466/2
authormojahidi <mojahidul.islam@amdocs.com>
Mon, 15 Oct 2018 11:05:13 +0000 (16:35 +0530)
committerAvi Gaffa <avi.gaffa@amdocs.com>
Tue, 16 Oct 2018 07:34:33 +0000 (07:34 +0000)
Added support for AssociateWorkflowType

Change-Id: I9ddda919dc51457ad57c69abdc95b7b188915f9b
Issue-ID: SDC-1814
Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/InterfaceUIDataConverter.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceOperationDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java

index bdbf20a..2c05879 100644 (file)
@@ -65,6 +65,7 @@ public class InterfaceUIDataConverter {
     operationData.setOutputs(outputs);
     operationData.setWorkflowId(interfaceOperation.getWorkflowId());
     operationData.setWorkflowVersionId(interfaceOperation.getWorkflowVersionId());
+    operationData.setWorkflowAssociationType(interfaceOperation.getWorkflowAssociationType());
 
     return operationData;
   }
@@ -97,6 +98,7 @@ public class InterfaceUIDataConverter {
     interfaceOperationDataDefinition.setArtifactUUID(operationData.getImplementation().getArtifactUUID());
     interfaceOperationDataDefinition.setWorkflowId(operationData.getWorkflowId());
     interfaceOperationDataDefinition.setWorkflowVersionId(operationData.getWorkflowVersionId());
+    interfaceOperationDataDefinition.setWorkflowAssociationType(operationData.getWorkflowAssociationType());
 
     return interfaceOperationDataDefinition;
   }
index bbc3164..29093e9 100644 (file)
@@ -27,6 +27,7 @@ import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.DESCRI
 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_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_VERSION_ID;
 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.TOSCA_RESOURCE_NAME;
@@ -50,6 +51,7 @@ public class InterfaceOperationDataDefinition extends ToscaDataDefinition implem
         setArtifactUUID(iodd.getArtifactUUID());
         setWorkflowId(iodd.getWorkflowId());
         setWorkflowVersionId(iodd.getWorkflowVersionId());
+        setWorkflowAssociationType(iodd.getWorkflowAssociationType());
     }
 
     public ListDataDefinition<InterfaceOperationParamDataDefinition> getInputParams() {
@@ -118,4 +120,12 @@ public class InterfaceOperationDataDefinition extends ToscaDataDefinition implem
     public void setArtifactUUID(String artifactUUID) {
         setToscaPresentationValue(ARTIFACT_UUID, artifactUUID);
     }
+
+    public String getWorkflowAssociationType() {
+        return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
+    }
+
+    public void setWorkflowAssociationType(String workflowAssociationType) {
+        setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);
+    }
 }
index 49c8ba2..722d605 100644 (file)
@@ -26,6 +26,7 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 
 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_VERSION_ID;
 
@@ -51,6 +52,7 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri
                setUniqueId(p.getUniqueId());
                setWorkflowId(p.getWorkflowId());
                setWorkflowVersionId(p.getWorkflowVersionId());
+               setWorkflowAssociationType(p.getWorkflowAssociationType());
        }
 
 
@@ -134,4 +136,11 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri
                setToscaPresentationValue(IO_WORKFLOW_VERSION_ID, workflowVersionId);
        }
 
+       public String getWorkflowAssociationType() {
+               return (String) getToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE);
+       }
+
+       public void setWorkflowAssociationType(String workflowAssociationType) {
+               setToscaPresentationValue(IO_WORKFLOW_ASSOCIATION_TYPE, workflowAssociationType);
+       }
 }
index 83cbd18..d5283c6 100644 (file)
@@ -220,6 +220,7 @@ public enum JsonPresentationFields {
        IO_PROPERTY("property", null),
        IO_WORKFLOW_ID("workflowId", null),
        IO_WORKFLOW_VERSION_ID("workflowVersionId", null),
+    IO_WORKFLOW_ASSOCIATION_TYPE("workflowAssociationType", null),
 
     //Interface
     INTERFACE ("interface", null),