Correct Catalog DB beans 82/86582/1
authorElena Kuleshov <evn@att.com>
Sat, 27 Apr 2019 11:43:35 +0000 (07:43 -0400)
committerElena Kuleshov <evn@att.com>
Sat, 27 Apr 2019 11:45:44 +0000 (07:45 -0400)
Correct Catalog DB beans

Change-Id: Ie9bb4aef606da8c87e5960c95b564fb2fc299869
Issue-ID: SO-1828
Signed-off-by: Kuleshov, Elena <evn@att.com>
34 files changed:
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence1_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence2_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence3_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters1_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters2_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters3_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters1_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters2_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters3_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters4_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters5_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters6_Response.json [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowActivitySpecSequence_Response.json
mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecificationsQuery_Response.json
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java [deleted file]
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java [deleted file]
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java [deleted file]
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java [deleted file]
mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java
mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java

index c480bdf..890b547 100644 (file)
@@ -50,6 +50,8 @@ import org.onap.so.db.catalog.beans.WorkflowActivitySpecSequence;
 import org.onap.so.db.catalog.client.CatalogDbClient;
 import org.onap.so.logger.ErrorCode;
 import org.onap.so.logger.MessageEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -69,6 +71,7 @@ public class WorkflowSpecificationsHandler {
     @Autowired
     private CatalogDbClient catalogDbClient;
 
+    private static Logger logger = LoggerFactory.getLogger(WorkflowSpecificationsHandler.class);
     private static final String ARTIFACT_TYPE_WORKFLOW = "workflow";
 
     @Path("/{version:[vV]1}/workflows")
@@ -153,6 +156,7 @@ public class WorkflowSpecificationsHandler {
                 if (activitySpec != null) {
                     ActivitySequence activitySequence = new ActivitySequence();
                     activitySequence.setName(activitySpec.getName());
+                    logger.debug("Adding activity: " + activitySpec.getName());
                     activitySequence.setDescription(activitySpec.getDescription());
                     activitySequences.add(activitySequence);
                 }
index 48abeac..915018f 100644 (file)
@@ -87,6 +87,66 @@ public class WorkflowSpecificationsHandlerTest extends BaseTest {
                         .withBody(getWiremockResponseForCatalogdb("WorkflowActivitySpecSequence_Response.json"))
                         .withStatus(org.apache.http.HttpStatus.SC_OK)));
 
+        wireMockServer.stubFor(get(urlMatching("/workflowActivitySpecSequence/1/activitySpec"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("ActivitySpecSequence1_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/workflowActivitySpecSequence/2/activitySpec"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("ActivitySpecSequence2_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/workflowActivitySpecSequence/3/activitySpec"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("ActivitySpecSequence3_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpec/1/activitySpecUserParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("ActivitySpecUserParameters1_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpec/2/activitySpecUserParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("ActivitySpecUserParameters2_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpec/3/activitySpecUserParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("ActivitySpecUserParameters3_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpecUserParameters/1/userParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("UserParameters1_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpecUserParameters/2/userParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("UserParameters2_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpecUserParameters/3/userParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("UserParameters3_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpecUserParameters/4/userParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("UserParameters4_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpecUserParameters/5/userParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("UserParameters5_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlMatching("/activitySpecUserParameters/6/userParameters"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("UserParameters6_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
         UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(basePath))
                 .queryParam("vnfModelVersionId", "b5fa707a-f55a-11e7-a796-005056856d52");
 
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence1_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence1_Response.json
new file mode 100644 (file)
index 0000000..37e3263
--- /dev/null
@@ -0,0 +1,20 @@
+{
+       "name": "VNFQuiesceTrafficActivity",
+       "description": "Activity to QuiesceTraffic on VNF",
+       "version": null,
+       "created": null,
+       "activitySpecActivitySpecCategories": null,
+       "activitySpecActivitySpecParameters": null,
+       "id": null,
+       "_links": {
+               "self": {
+                       "href": "http://localhost:8090/activitySpec/1"
+               },
+               "activitySpec": {
+                       "href": "http://localhost:8090/activitySpec/1"
+               },
+               "activitySpecUserParameters": {
+                       "href": "http://localhost:8090/activitySpec/1/activitySpecUserParameters"
+               }
+       }
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence2_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence2_Response.json
new file mode 100644 (file)
index 0000000..ee2a02b
--- /dev/null
@@ -0,0 +1,20 @@
+{
+       "name": "VNFHealthCheckActivity",
+       "description": "Activity to HealthCheck VNF",
+       "version": null,
+       "created": null,
+       "activitySpecActivitySpecCategories": null,
+       "activitySpecActivitySpecParameters": null,
+       "id": null,
+       "_links": {
+               "self": {
+                       "href": "http://localhost:8090/activitySpec/2"
+               },
+               "activitySpec": {
+                       "href": "http://localhost:8090/activitySpec/2"
+               },
+               "activitySpecUserParameters": {
+                       "href": "http://localhost:8090/activitySpec/2/activitySpecUserParameters"
+               }
+       }
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence3_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence3_Response.json
new file mode 100644 (file)
index 0000000..69390ee
--- /dev/null
@@ -0,0 +1,20 @@
+{
+       "name": "FlowCompleteActivity",
+       "description": "Activity to Complete the BPMN Flow",
+       "version": null,
+       "created": null,
+       "activitySpecActivitySpecCategories": null,
+       "activitySpecActivitySpecParameters": null,
+       "id": null,
+       "_links": {
+               "self": {
+                       "href": "http://localhost:8090/activitySpec/3"
+               },
+               "activitySpec": {
+                       "href": "http://localhost:8090/activitySpec/3"
+               },
+               "activitySpecUserParameters": {
+                       "href": "http://localhost:8090/activitySpec/3/activitySpecUserParameters"
+               }
+       }
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters1_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters1_Response.json
new file mode 100644 (file)
index 0000000..e88691b
--- /dev/null
@@ -0,0 +1,103 @@
+{
+       "_embedded": {
+               "activitySpecUserParameters": [
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 1,
+                               "activitySpec": null,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 2,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 3,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 4,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 5,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 6,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6/userParameters"
+                                       }
+                               }
+                       }
+               ]
+       }
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters2_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters2_Response.json
new file mode 100644 (file)
index 0000000..e88691b
--- /dev/null
@@ -0,0 +1,103 @@
+{
+       "_embedded": {
+               "activitySpecUserParameters": [
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 1,
+                               "activitySpec": null,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 2,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 3,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 4,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 5,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 6,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6/userParameters"
+                                       }
+                               }
+                       }
+               ]
+       }
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters3_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters3_Response.json
new file mode 100644 (file)
index 0000000..e88691b
--- /dev/null
@@ -0,0 +1,103 @@
+{
+       "_embedded": {
+               "activitySpecUserParameters": [
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 1,
+                               "activitySpec": null,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/1/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 2,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/2/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 3,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/3/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 4,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/4/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 5,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/5/userParameters"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 1,
+                               "userParametersId": 6,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6"
+                                       },
+                                       "activitySpecUserParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6"
+                                       },
+                                       "userParameters": {
+                                               "href": "http://localhost:8090/activitySpecUserParameters/6/userParameters"
+                                       }
+                               }
+                       }
+               ]
+       }
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters1_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters1_Response.json
new file mode 100644 (file)
index 0000000..017add4
--- /dev/null
@@ -0,0 +1,13 @@
+{
+       "name": "operations_timeout",
+       "payloadLocation": "userParams",
+       "label": "Operations Timeout",
+       "type": "text",
+       "description": null,
+       "isRequried": true,
+       "maxLength": 50,
+       "allowableChars": "someRegEx",
+       "created": null,
+       "activitySpecUserParameters": null,
+       "id": null
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters2_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters2_Response.json
new file mode 100644 (file)
index 0000000..655d659
--- /dev/null
@@ -0,0 +1,13 @@
+{
+       "name": "existing_software_version",
+       "payloadLocation": "userParams",
+       "label": "Existing Software Version",
+       "type": "text",
+       "description": null,
+       "isRequried": true,
+       "maxLength": 50,
+       "allowableChars": "someRegEx",
+       "created": null,
+       "activitySpecUserParameters": null,
+       "id": null
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters3_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters3_Response.json
new file mode 100644 (file)
index 0000000..13e02e7
--- /dev/null
@@ -0,0 +1,13 @@
+{
+       "name": "cloudOwner",
+       "payloadLocation": "cloudConfiguration",
+       "label": "Cloud Owner",
+       "type": "text",
+       "description": null,
+       "isRequried": true,
+       "maxLength": 7,
+       "allowableChars": "someRegEx",
+       "created": null,
+       "activitySpecUserParameters": null,
+       "id": null
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters4_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters4_Response.json
new file mode 100644 (file)
index 0000000..e30ec0d
--- /dev/null
@@ -0,0 +1,13 @@
+{
+       "name": "tenantId",
+       "payloadLocation": "cloudConfiguration",
+       "label": "Tenant/Project ID",
+       "type": "text",
+       "description": null,
+       "isRequried": true,
+       "maxLength": 36,
+       "allowableChars": "someRegEx",
+       "created": null,
+       "activitySpecUserParameters": null,
+       "id": null
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters5_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters5_Response.json
new file mode 100644 (file)
index 0000000..98b1852
--- /dev/null
@@ -0,0 +1,13 @@
+{
+       "name": "new_software_version",
+       "payloadLocation": "userParams",
+       "label": "New Software Version",
+       "type": "text",
+       "description": null,
+       "isRequried": true,
+       "maxLength": 50,
+       "allowableChars": "someRegEx",
+       "created": null,
+       "activitySpecUserParameters": null,
+       "id": null
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters6_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters6_Response.json
new file mode 100644 (file)
index 0000000..4d8d03b
--- /dev/null
@@ -0,0 +1,13 @@
+{
+       "name": "lcpCloudRegionId",
+       "payloadLocation": "cloudConfiguration",
+       "label": "Cloud Region ID",
+       "type": "text",
+       "description": null,
+       "isRequried": true,
+       "maxLength": 7,
+       "allowableChars": "someRegEx",
+       "created": null,
+       "activitySpecUserParameters": null,
+       "id": null
+}
\ No newline at end of file
index 3192865..3df1738 100644 (file)
 {
        "_embedded": {
-       
-    "workflowActivitySpecSequence": [
-      {
-        "activitySpecId": null,
-        "workflowId": null,
-        "activitySpec": {
-          "name": "VNFQuiesceTrafficActivity",
-          "description": "Activity to QuiesceTraffic on VNF",
-          "version": null,
-          "created": null,
-          "workflowActivitySpecSequence": null,
-          "activitySpecActivitySpecCategories": null,
-          "activitySpecUserParameters": [
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "operations_timeout",
-                "payloadLocation": "userParams",
-                "label": "Operations Timeout",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "existing_software_version",
-                "payloadLocation": "userParams",
-                "label": "Existing Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "cloudOwner",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Owner",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "tenantId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Tenant/Project ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 36,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "new_software_version",
-                "payloadLocation": "userParams",
-                "label": "New Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "lcpCloudRegionId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Region ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            }
-          ],
-          "activitySpecActivitySpecParameters": null,
-          "id": null
-        },
-        "workflow": null,
-        "id": null,
-        "_links": {
-    "self": {
-      "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
-    },    
-    "workflowActivitySpecSequence": {
-      "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
-    }
-  
-  }
-        
-      },
-      {
-        "activitySpecId": null,
-        "workflowId": null,
-        "activitySpec": {
-          "name": "VNFHealthCheckActivity",
-          "description": "Activity to HealthCheck VNF",
-          "version": null,
-          "created": null,
-          "workflowActivitySpecSequence": null,
-          "activitySpecActivitySpecCategories": null,
-          "activitySpecUserParameters": [
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "operations_timeout",
-                "payloadLocation": "userParams",
-                "label": "Operations Timeout",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "existing_software_version",
-                "payloadLocation": "userParams",
-                "label": "Existing Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "cloudOwner",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Owner",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "tenantId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Tenant/Project ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 36,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "new_software_version",
-                "payloadLocation": "userParams",
-                "label": "New Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "lcpCloudRegionId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Region ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            }
-          ],
-          "activitySpecActivitySpecParameters": null,
-          "id": null
-        },
-        "workflow": null,
-        "id": null,
-        "_links": {
-    "self": {
-      "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
-    },    
-    "workflowActivitySpecSequence": {
-      "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
-    }
-  
-  }
-      },
-      {
-        "activitySpecId": null,
-        "workflowId": null,
-        "activitySpec": {
-          "name": "FlowCompleteActivity",
-          "description": "Activity to Complete the BPMN Flow",
-          "version": null,
-          "created": null,
-          "workflowActivitySpecSequence": null,
-          "activitySpecActivitySpecCategories": null,
-          "activitySpecUserParameters": [
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "operations_timeout",
-                "payloadLocation": "userParams",
-                "label": "Operations Timeout",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "existing_software_version",
-                "payloadLocation": "userParams",
-                "label": "Existing Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "cloudOwner",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Owner",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "tenantId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Tenant/Project ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 36,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "new_software_version",
-                "payloadLocation": "userParams",
-                "label": "New Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "lcpCloudRegionId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Region ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            }
-          ],
-          "activitySpecActivitySpecParameters": null,
-          "id": null
-        },
-        "workflow": null,
-        "id": null,
-        "_links": {
-    "self": {
-      "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
-    },    
-    "workflowActivitySpecSequence": {
-      "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
-    }
-  
-  }
-      }
-    ]
-  
-}
+               "workflowActivitySpecSequence": [
+                       {
+                               "activitySpecId": 1,
+                               "workflowId": 1,                                
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence//1/workflowActivitySpecSequence"
+                                       },
+                                       "workflowActivitySpecSequence": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence/1/workflowActivitySpecSequence"
+                                       },
+                                       "activitySpec": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence/1/activitySpec"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 2,
+                               "workflowId": 1,                                
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence/2/workflowActivitySpecSequence"
+                                       },
+                                       "workflowActivitySpecSequence": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence/2/workflowActivitySpecSequence"
+                                       },
+                                       "activitySpec": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence/2/activitySpec"
+                                       }
+                               }
+                       },
+                       {
+                               "activitySpecId": 3,
+                               "workflowId": 1,
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence/3"
+                                       },
+                                       "workflowActivitySpecSequence": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence/3/workflowActivitySpecSequence"
+                                       },
+                                       "activitySpec": {
+                                               "href": "http://localhost:8090/workflowActivitySpecSequence/3/activitySpec"
+                                       }
+                               }
+                       }
+               ]
+       }
 }
\ No newline at end of file
index c123656..cbbf0b6 100644 (file)
 {
        "_embedded": {
-       "workflows" :[
-  {
-    "artifactUUID": "ab6478e4-ea33-3346-ac12-ab121484a333",
-    "artifactName": "inPlaceSoftwareUpdate-1_0.bpmn",
-    "name": "inPlaceSoftwareUpdate",
-    "operationName": "inPlaceSoftwareUpdate",
-    "version": 1,
-    "description": "xyz xyz",
-    "body": null,
-    "resourceTarget": "vnf",
-    "source": "sdc",
-    "timeoutMinutes": null,
-    "artifactChecksum": null,
-    "created": null,
-    "vnfResourceWorkflow": null,
-    "workflowActivitySpecSequence": [
-      {
-        "activitySpecId": null,
-        "workflowId": null,
-        "activitySpec": {
-          "name": "VNFQuiesceTrafficActivity",
-          "description": "Activity to QuiesceTraffic on VNF",
-          "version": null,
-          "created": null,
-          "workflowActivitySpecSequence": null,
-          "activitySpecActivitySpecCategories": null,
-          "activitySpecUserParameters": [
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "operations_timeout",
-                "payloadLocation": "userParams",
-                "label": "Operations Timeout",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "existing_software_version",
-                "payloadLocation": "userParams",
-                "label": "Existing Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "cloudOwner",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Owner",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "tenantId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Tenant/Project ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 36,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "new_software_version",
-                "payloadLocation": "userParams",
-                "label": "New Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "lcpCloudRegionId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Region ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            }
-          ],
-          "activitySpecActivitySpecParameters": null,
-          "id": null
-        },
-        "workflow": null,
-        "id": null,
-        "_links": {
-    "self": {
-      "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID[?]vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
-    },    
-    "workflowActivitySpecSequence": {
-      "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
-    }
-  
-  }
-        
-      },
-      {
-        "activitySpecId": null,
-        "workflowId": null,
-        "activitySpec": {
-          "name": "VNFHealthCheckActivity",
-          "description": "Activity to HealthCheck VNF",
-          "version": null,
-          "created": null,
-          "workflowActivitySpecSequence": null,
-          "activitySpecActivitySpecCategories": null,
-          "activitySpecUserParameters": [
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "operations_timeout",
-                "payloadLocation": "userParams",
-                "label": "Operations Timeout",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "existing_software_version",
-                "payloadLocation": "userParams",
-                "label": "Existing Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "cloudOwner",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Owner",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "tenantId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Tenant/Project ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 36,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "new_software_version",
-                "payloadLocation": "userParams",
-                "label": "New Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "lcpCloudRegionId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Region ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            }
-          ],
-          "activitySpecActivitySpecParameters": null,
-          "id": null
-        },
-        "workflow": null,
-        "id": null,
-        "_links": {
-    "self": {
-      "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
-    },    
-    "workflowActivitySpecSequence": {
-      "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
-    }
-  
-  }
-      },
-      {
-        "activitySpecId": null,
-        "workflowId": null,
-        "activitySpec": {
-          "name": "FlowCompleteActivity",
-          "description": "Activity to Complete the BPMN Flow",
-          "version": null,
-          "created": null,
-          "workflowActivitySpecSequence": null,
-          "activitySpecActivitySpecCategories": null,
-          "activitySpecUserParameters": [
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "operations_timeout",
-                "payloadLocation": "userParams",
-                "label": "Operations Timeout",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "existing_software_version",
-                "payloadLocation": "userParams",
-                "label": "Existing Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "cloudOwner",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Owner",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "tenantId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Tenant/Project ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 36,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "new_software_version",
-                "payloadLocation": "userParams",
-                "label": "New Software Version",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 50,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            },
-            {
-              "activitySpecId": null,
-              "userParametersId": null,
-              "activitySpec": null,
-              "userParameters": {
-                "name": "lcpCloudRegionId",
-                "payloadLocation": "cloudConfiguration",
-                "label": "Cloud Region ID",
-                "type": "text",
-                "description": null,
-                "isRequried": true,
-                "maxLength": 7,
-                "allowableChars": "someRegEx",
-                "created": null,
-                "activitySpecUserParameters": null,
-                "id": null
-              },
-              "id": null
-            }
-          ],
-          "activitySpecActivitySpecParameters": null,
-          "id": null
-        },
-        "workflow": null,
-        "id": null,
-        "_links": {
-    "self": {
-      "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
-    },    
-    "workflowActivitySpecSequence": {
-      "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
-    }
-  
-  }
-      }
-    ],
-    "id": null,
-  "_links": {
-    "self": {
-      "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
-    },    
-    "workflowActivitySpecSequence": {
-      "href": "http://localhost:8090/workflow/1/workflowActivitySpecSequence"
-    }
-    
-   }
-  
-  }
-]
-},
-"_links": {
-    "self": {
-      "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
-    },    
-    "workflowActivitySpecSequence": {
-      "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
-    }
-  
-  }
+               "workflows": [
+                       {
+                               "artifactUUID": "ab6478e4-ea33-3346-ac12-ab121484a333",
+                               "artifactName": "inPlaceSoftwareUpdate-1_0.bpmn",
+                               "name": "inPlaceSoftwareUpdate",
+                               "operationName": "inPlaceSoftwareUpdate",
+                               "version": 1,
+                               "description": "xyz xyz",
+                               "body": null,
+                               "resourceTarget": "vnf",
+                               "source": "sdc",
+                               "timeoutMinutes": null,
+                               "artifactChecksum": null,
+                               "created": null,
+                               "vnfResourceWorkflow": null,
+                               "workflowActivitySpecSequence": [
+                                       {
+                                               "activitySpecId": null,
+                                               "workflowId": null,
+                                               "activitySpec": {
+                                                       "name": "VNFQuiesceTrafficActivity",
+                                                       "description": "Activity to QuiesceTraffic on VNF",
+                                                       "version": null,
+                                                       "created": null,
+                                                       "workflowActivitySpecSequence": null,
+                                                       "activitySpecActivitySpecCategories": null,
+                                                       "activitySpecUserParameters": [
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "operations_timeout",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "Operations Timeout",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "existing_software_version",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "Existing Software Version",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "cloudOwner",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Cloud Owner",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 7,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "tenantId",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Tenant/Project ID",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 36,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "new_software_version",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "New Software Version",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "lcpCloudRegionId",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Cloud Region ID",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 7,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               }
+                                                       ],
+                                                       "activitySpecActivitySpecParameters": null,
+                                                       "id": null
+                                               },
+                                               "workflow": null,
+                                               "id": null,
+                                               "_links": {
+                                                       "self": {
+                                                               "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID[?]vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
+                                                       },
+                                                       "workflowActivitySpecSequence": {
+                                                               "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
+                                                       },
+                                                       "activitySpec": {
+                                                               "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/activitySpec"
+                                                       }
+                                               }
+                                       },
+                                       {
+                                               "activitySpecId": null,
+                                               "workflowId": null,
+                                               "activitySpec": {
+                                                       "name": "VNFHealthCheckActivity",
+                                                       "description": "Activity to HealthCheck VNF",
+                                                       "version": null,
+                                                       "created": null,
+                                                       "workflowActivitySpecSequence": null,
+                                                       "activitySpecActivitySpecCategories": null,
+                                                       "activitySpecUserParameters": [
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "operations_timeout",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "Operations Timeout",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "existing_software_version",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "Existing Software Version",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "cloudOwner",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Cloud Owner",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 7,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "tenantId",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Tenant/Project ID",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 36,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "new_software_version",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "New Software Version",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "lcpCloudRegionId",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Cloud Region ID",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 7,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               }
+                                                       ],
+                                                       "activitySpecActivitySpecParameters": null,
+                                                       "id": null
+                                               },
+                                               "workflow": null,
+                                               "id": null,
+                                               "_links": {
+                                                       "self": {
+                                                               "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
+                                                       },
+                                                       "workflowActivitySpecSequence": {
+                                                               "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
+                                                       },
+                                                       "activitySpec": {
+                                                               "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/activitySpec"
+                                                       }
+                                               }
+                                       },
+                                       {
+                                               "activitySpecId": null,
+                                               "workflowId": null,
+                                               "activitySpec": {
+                                                       "name": "FlowCompleteActivity",
+                                                       "description": "Activity to Complete the BPMN Flow",
+                                                       "version": null,
+                                                       "created": null,
+                                                       "workflowActivitySpecSequence": null,
+                                                       "activitySpecActivitySpecCategories": null,
+                                                       "activitySpecUserParameters": [
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "operations_timeout",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "Operations Timeout",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "existing_software_version",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "Existing Software Version",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "cloudOwner",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Cloud Owner",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 7,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "tenantId",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Tenant/Project ID",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 36,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "new_software_version",
+                                                                               "payloadLocation": "userParams",
+                                                                               "label": "New Software Version",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 50,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               },
+                                                               {
+                                                                       "activitySpecId": null,
+                                                                       "userParametersId": null,
+                                                                       "activitySpec": null,
+                                                                       "userParameters": {
+                                                                               "name": "lcpCloudRegionId",
+                                                                               "payloadLocation": "cloudConfiguration",
+                                                                               "label": "Cloud Region ID",
+                                                                               "type": "text",
+                                                                               "description": null,
+                                                                               "isRequried": true,
+                                                                               "maxLength": 7,
+                                                                               "allowableChars": "someRegEx",
+                                                                               "created": null,
+                                                                               "activitySpecUserParameters": null,
+                                                                               "id": null
+                                                                       },
+                                                                       "id": null
+                                                               }
+                                                       ],
+                                                       "activitySpecActivitySpecParameters": null,
+                                                       "id": null
+                                               },
+                                               "workflow": null,
+                                               "id": null,
+                                               "_links": {
+                                                       "self": {
+                                                               "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
+                                                       },
+                                                       "workflowActivitySpecSequence": {
+                                                               "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
+                                                       },
+                                                       "activitySpec": {
+                                                               "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/activitySpec"
+                                                       }
+                                               }
+                                       }
+                               ],
+                               "id": null,
+                               "_links": {
+                                       "self": {
+                                               "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
+                                       },
+                                       "workflowActivitySpecSequence": {
+                                               "href": "http://localhost:8090/workflow/1/workflowActivitySpecSequence"
+                                       },
+                                       "activitySpec": {
+                                               "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/activitySpec"
+                                       }
+                               }
+                       }
+               ]
+       },
+       "_links": {
+               "self": {
+                       "href": "http://localhost:8090/workflow/search/findWorkflowByModelUUID?vnfResourceModelUUID=b5fa707a-f55a-11e7-a796-005056856d52"
+               },
+               "workflowActivitySpecSequence": {
+                       "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/workflowActivitySpecSequence"
+               },
+               "activitySpec": {
+                       "href": "http://localhost:8090/workflow/b5fa707a-f55a-11e7-a796-005056856d52/activitySpec"
+               }
+       }
 }
\ No newline at end of file
index 00eff8f..20c1074 100644 (file)
@@ -1,7 +1,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import javax.persistence.Column;
@@ -10,9 +9,6 @@ import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
 import javax.persistence.PrePersist;
 import javax.persistence.Table;
@@ -22,12 +18,10 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
 import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
-@Table(name = "ACTIVITY_SPEC")
+@Table(name = "activity_spec")
 public class ActivitySpec implements Serializable {
 
     private static final long serialVersionUID = 6902290480087262973L;
index 3518805..64c77d2 100644 (file)
@@ -21,7 +21,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.Date;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -29,13 +28,9 @@ import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.IdClass;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
-import javax.persistence.PrePersist;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -43,7 +38,6 @@ import com.openpojo.business.annotation.BusinessKey;
 import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
-@IdClass(ActivitySpecActivitySpecCategoriesId.class)
 @Table(name = "activity_spec_to_activity_spec_categories")
 public class ActivitySpecActivitySpecCategories implements Serializable {
 
@@ -121,6 +115,7 @@ public class ActivitySpecActivitySpecCategories implements Serializable {
         this.activitySpec = activitySpec;
     }
 
+    @LinkedResource
     public ActivitySpecCategories getActivitySpecCategories() {
         return activitySpecCategories;
     }
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java
deleted file mode 100644 (file)
index e3dcd35..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-
-public class ActivitySpecActivitySpecCategoriesId implements Serializable {
-
-    private static final long serialVersionUID = 1563771827209840959L;
-    private Integer ID;
-    @BusinessKey
-    private Integer activitySpecId;
-    @BusinessKey
-    private Integer activitySpecCategoriesId;
-
-    public Integer getID() {
-        return ID;
-    }
-
-    public void setID(Integer iD) {
-        ID = iD;
-    }
-
-    public Integer getActivitySpecCategoriesId() {
-        return activitySpecCategoriesId;
-    }
-
-    public void setActivitySpecCategoriesId(Integer activitySpecCategoriesId) {
-        this.activitySpecCategoriesId = activitySpecCategoriesId;
-    }
-
-    public Integer getActivitySpecId() {
-        return activitySpecId;
-    }
-
-    public void setActivitySpecId(Integer activitySpecId) {
-        this.activitySpecId = activitySpecId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("activitySpecId", activitySpecId)
-                .append("activitySpecCategoriesId", activitySpecCategoriesId).toString();
-    }
-
-    @Override
-    public boolean equals(final Object other) {
-        if (!(other instanceof ActivitySpecActivitySpecCategoriesId)) {
-            return false;
-        }
-        ActivitySpecActivitySpecCategoriesId castOther = (ActivitySpecActivitySpecCategoriesId) other;
-        return new EqualsBuilder().append(activitySpecId, castOther.activitySpecId)
-                .append(activitySpecCategoriesId, castOther.activitySpecCategoriesId).isEquals();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(activitySpecId).append(activitySpecCategoriesId).toHashCode();
-    }
-}
index f0c9bd9..f3e6a09 100644 (file)
@@ -21,7 +21,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.Date;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -29,13 +28,9 @@ import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.IdClass;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
-import javax.persistence.PrePersist;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -43,7 +38,6 @@ import com.openpojo.business.annotation.BusinessKey;
 import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
-@IdClass(ActivitySpecActivitySpecParametersId.class)
 @Table(name = "activity_spec_to_activity_spec_parameters")
 public class ActivitySpecActivitySpecParameters implements Serializable {
 
@@ -55,12 +49,10 @@ public class ActivitySpecActivitySpecParameters implements Serializable {
     private Integer ID;
 
     @BusinessKey
-    @Id
     @Column(name = "ACTIVITY_SPEC_ID")
     private Integer activitySpecId;
 
     @BusinessKey
-    @Id
     @Column(name = "ACTIVITY_SPEC_PARAMETERS_ID")
     private Integer activitySpecParametersId;
 
@@ -75,7 +67,7 @@ public class ActivitySpecActivitySpecParameters implements Serializable {
     @Override
     public String toString() {
         return new ToStringBuilder(this).append("activitySpecId", activitySpecId)
-                .append("activitySpecCategoriesId", activitySpecParametersId).toString();
+                .append("activitySpecParametersId", activitySpecParametersId).toString();
     }
 
     @Override
@@ -113,6 +105,7 @@ public class ActivitySpecActivitySpecParameters implements Serializable {
         this.activitySpecParametersId = activitySpecParametersId;
     }
 
+    @LinkedResource
     public ActivitySpec getActivitySpec() {
         return activitySpec;
     }
@@ -121,6 +114,7 @@ public class ActivitySpecActivitySpecParameters implements Serializable {
         this.activitySpec = activitySpec;
     }
 
+    @LinkedResource
     public ActivitySpecParameters getActivitySpecParameters() {
         return activitySpecParameters;
     }
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java
deleted file mode 100644 (file)
index 8f4cc6d..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-
-public class ActivitySpecActivitySpecParametersId implements Serializable {
-
-    private static final long serialVersionUID = 1563771827209840959L;
-
-    private Integer ID;
-    @BusinessKey
-    private Integer activitySpecId;
-    @BusinessKey
-    private Integer activitySpecParametersId;
-
-    public Integer getID() {
-        return ID;
-    }
-
-    public void setID(Integer iD) {
-        ID = iD;
-    }
-
-    public Integer getActivitySpecParametersId() {
-        return activitySpecParametersId;
-    }
-
-    public void setActivitySpecParametersId(Integer activitySpecParametersId) {
-        this.activitySpecParametersId = activitySpecParametersId;
-    }
-
-    public Integer getActivitySpecId() {
-        return activitySpecId;
-    }
-
-    public void setActivitySpecId(Integer activitySpecId) {
-        this.activitySpecId = activitySpecId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("activitySpecId", activitySpecId)
-                .append("activitySpecCategoriesId", activitySpecParametersId).toString();
-    }
-
-    @Override
-    public boolean equals(final Object other) {
-        if (!(other instanceof ActivitySpecActivitySpecParametersId)) {
-            return false;
-        }
-        ActivitySpecActivitySpecParametersId castOther = (ActivitySpecActivitySpecParametersId) other;
-        return new EqualsBuilder().append(activitySpecId, castOther.activitySpecId)
-                .append(activitySpecParametersId, castOther.activitySpecParametersId).isEquals();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(activitySpecId).append(activitySpecParametersId).toHashCode();
-    }
-}
index a42a73a..e7ace2c 100644 (file)
@@ -41,9 +41,6 @@ public class ActivitySpecCategories implements Serializable {
     @Column(name = "NAME")
     private String name;
 
-    @OneToMany(fetch = FetchType.LAZY, mappedBy = "activitySpecCategories")
-    private List<ActivitySpecActivitySpecCategories> activitySpecActivitySpecCategories;
-
     public Integer getID() {
         return ID;
     }
@@ -56,20 +53,9 @@ public class ActivitySpecCategories implements Serializable {
         this.name = name;
     }
 
-    @LinkedResource
-    public List<ActivitySpecActivitySpecCategories> getActivitySpecActivitySpecCategories() {
-        return activitySpecActivitySpecCategories;
-    }
-
-    public void setActivitySpecActivitySpecCategories(
-            List<ActivitySpecActivitySpecCategories> activitySpecActivitySpecCategories) {
-        this.activitySpecActivitySpecCategories = activitySpecActivitySpecCategories;
-    }
-
     @Override
     public String toString() {
-        return new ToStringBuilder(this).append("name", name)
-                .append("activitySpecActivitySpecCategories", activitySpecActivitySpecCategories).toString();
+        return new ToStringBuilder(this).append("name", name).toString();
     }
 
     @Override
index 49e0f3f..5173f27 100644 (file)
@@ -1,20 +1,12 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Date;
-import java.util.List;
 import javax.persistence.Column;
 import javax.persistence.Entity;
-import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
 import javax.persistence.PrePersist;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
@@ -23,9 +15,6 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
 @Table(name = "ACTIVITY_SPEC_PARAMETERS")
@@ -56,28 +45,14 @@ public class ActivitySpecParameters implements Serializable {
     @Temporal(TemporalType.TIMESTAMP)
     private Date created;
 
-    @OneToMany(fetch = FetchType.LAZY, mappedBy = "activitySpecParameters")
-    private List<ActivitySpecActivitySpecParameters> activitySpecActivitySpecParameters;
-
     @PrePersist
     protected void onCreate() {
         this.created = new Date();
     }
 
-    @LinkedResource
-    public List<ActivitySpecActivitySpecParameters> getActivitySpecActivitySpecParameters() {
-        return activitySpecActivitySpecParameters;
-    }
-
-    public void setActivitySpecActivitySpecParameters(
-            List<ActivitySpecActivitySpecParameters> activitySpecActivitySpecParameters) {
-        this.activitySpecActivitySpecParameters = activitySpecActivitySpecParameters;
-    }
-
     @Override
     public String toString() {
-        return new ToStringBuilder(this).append("name", name).append("direction", direction)
-                .append("activitySpecActivitySpecParameters", activitySpecActivitySpecParameters).toString();
+        return new ToStringBuilder(this).append("name", name).append("direction", direction).toString();
     }
 
     @Override
index be32da3..d23c782 100644 (file)
@@ -21,7 +21,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.Date;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -29,13 +28,9 @@ import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.IdClass;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
-import javax.persistence.PrePersist;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -43,7 +38,6 @@ import com.openpojo.business.annotation.BusinessKey;
 import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
-@IdClass(ActivitySpecUserParametersId.class)
 @Table(name = "activity_spec_to_user_parameters")
 public class ActivitySpecUserParameters implements Serializable {
 
@@ -55,12 +49,10 @@ public class ActivitySpecUserParameters implements Serializable {
     private Integer ID;
 
     @BusinessKey
-    @Id
     @Column(name = "ACTIVITY_SPEC_ID")
     private Integer activitySpecId;
 
     @BusinessKey
-    @Id
     @Column(name = "USER_PARAMETERS_ID")
     private Integer userParametersId;
 
@@ -113,6 +105,7 @@ public class ActivitySpecUserParameters implements Serializable {
         this.userParametersId = userParametersId;
     }
 
+    @LinkedResource
     public ActivitySpec getActivitySpec() {
         return activitySpec;
     }
@@ -121,6 +114,7 @@ public class ActivitySpecUserParameters implements Serializable {
         this.activitySpec = activitySpec;
     }
 
+    @LinkedResource
     public UserParameters getUserParameters() {
         return userParameters;
     }
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java
deleted file mode 100644 (file)
index fd55d6e..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-
-public class ActivitySpecUserParametersId implements Serializable {
-
-    private static final long serialVersionUID = 1563771827209840959L;
-
-    private Integer ID;
-    @BusinessKey
-    private Integer activitySpecId;
-    @BusinessKey
-    private Integer userParametersId;
-
-    public Integer getID() {
-        return ID;
-    }
-
-    public void setID(Integer iD) {
-        ID = iD;
-    }
-
-    public Integer getUserParametersId() {
-        return userParametersId;
-    }
-
-    public void setUserParametersId(Integer userParametersId) {
-        this.userParametersId = userParametersId;
-    }
-
-    public Integer getActivitySpecId() {
-        return activitySpecId;
-    }
-
-    public void setActivitySpecId(Integer activitySpecId) {
-        this.activitySpecId = activitySpecId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("activitySpecId", activitySpecId)
-                .append("userParametersId", userParametersId).toString();
-    }
-
-    @Override
-    public boolean equals(final Object other) {
-        if (!(other instanceof ActivitySpecUserParametersId)) {
-            return false;
-        }
-        ActivitySpecUserParametersId castOther = (ActivitySpecUserParametersId) other;
-        return new EqualsBuilder().append(activitySpecId, castOther.activitySpecId)
-                .append(userParametersId, castOther.userParametersId).isEquals();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(activitySpecId).append(userParametersId).toHashCode();
-    }
-
-}
index a20647d..c2cf2d7 100644 (file)
@@ -1,19 +1,12 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Date;
-import java.util.List;
 import javax.persistence.Column;
 import javax.persistence.Entity;
-import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
 import javax.persistence.PrePersist;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
@@ -22,9 +15,6 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
 @Table(name = "USER_PARAMETERS")
@@ -66,10 +56,6 @@ public class UserParameters implements Serializable {
     @Temporal(TemporalType.TIMESTAMP)
     private Date created;
 
-
-    @OneToMany(fetch = FetchType.LAZY, mappedBy = "userParameters")
-    private List<ActivitySpecUserParameters> activitySpecUserParameters;
-
     @PrePersist
     protected void onCreate() {
         this.created = new Date();
@@ -87,19 +73,9 @@ public class UserParameters implements Serializable {
         this.name = name;
     }
 
-    @LinkedResource
-    public List<ActivitySpecUserParameters> getActivitySpecUserParameters() {
-        return activitySpecUserParameters;
-    }
-
-    public void setActivitySpecUserParameters(List<ActivitySpecUserParameters> activitySpecUserParameters) {
-        this.activitySpecUserParameters = activitySpecUserParameters;
-    }
-
     @Override
     public String toString() {
-        return new ToStringBuilder(this).append("name", name)
-                .append("ActivitySpecUserParameters", activitySpecUserParameters).toString();
+        return new ToStringBuilder(this).append("name", name).toString();
     }
 
     public String getPayloadLocation() {
index 1f46bc0..d1e60a0 100644 (file)
@@ -1,7 +1,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import javax.persistence.Column;
@@ -10,9 +9,7 @@ import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
 import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
 import javax.persistence.PrePersist;
 import javax.persistence.Table;
@@ -21,9 +18,6 @@ import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
 import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
index 4b497cc..f25be45 100644 (file)
@@ -21,7 +21,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.Date;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -29,21 +28,17 @@ import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.IdClass;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
-import javax.persistence.PrePersist;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
 import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
+
 @Entity
-@IdClass(WorkflowActivitySpecSequenceId.class)
 @Table(name = "workflow_activity_spec_sequence")
 public class WorkflowActivitySpecSequence implements Serializable {
 
@@ -55,12 +50,10 @@ public class WorkflowActivitySpecSequence implements Serializable {
     private Integer ID;
 
     @BusinessKey
-    @Id
     @Column(name = "ACTIVITY_SPEC_ID")
     private Integer activitySpecId;
 
     @BusinessKey
-    @Id
     @Column(name = "WORKFLOW_ID")
     private Integer workflowId;
 
@@ -113,6 +106,7 @@ public class WorkflowActivitySpecSequence implements Serializable {
         this.workflowId = workflowId;
     }
 
+    @LinkedResource
     public ActivitySpec getActivitySpec() {
         return activitySpec;
     }
@@ -121,6 +115,7 @@ public class WorkflowActivitySpecSequence implements Serializable {
         this.activitySpec = activitySpec;
     }
 
+    @LinkedResource
     public Workflow getWorkflow() {
         return workflow;
     }
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java
deleted file mode 100644 (file)
index 41af2ed..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-
-public class WorkflowActivitySpecSequenceId implements Serializable {
-
-    private static final long serialVersionUID = -8987314754011453123L;
-
-    private Integer ID;
-
-    @BusinessKey
-    private Integer workflowId;
-    @BusinessKey
-    private Integer activitySpecId;
-
-    public Integer getID() {
-        return ID;
-    }
-
-    public void setID(Integer ID) {
-        this.ID = ID;
-    }
-
-    public Integer getWorkflowId() {
-        return workflowId;
-    }
-
-    public void setWorkflowId(Integer workflowId) {
-        this.workflowId = workflowId;
-    }
-
-    public Integer getActivitySpecId() {
-        return activitySpecId;
-    }
-
-    public void setActivitySpecId(Integer activitySpecId) {
-        this.activitySpecId = activitySpecId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("workflowId", workflowId).append("activitySpecId", activitySpecId)
-                .toString();
-    }
-
-    @Override
-    public boolean equals(final Object other) {
-        if (!(other instanceof WorkflowActivitySpecSequenceId)) {
-            return false;
-        }
-        WorkflowActivitySpecSequenceId castOther = (WorkflowActivitySpecSequenceId) other;
-        return new EqualsBuilder().append(workflowId, castOther.workflowId)
-                .append(activitySpecId, castOther.activitySpecId).isEquals();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(workflowId).append(activitySpecId).toHashCode();
-    }
-}
index aa47423..f86ae14 100644 (file)
@@ -25,7 +25,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.rest.core.annotation.RepositoryRestResource;
 
 @RepositoryRestResource(collectionResourceRel = "activitySpec", path = "activitySpec")
-public interface ActivitySpecRepository extends JpaRepository<ActivitySpec, String> {
+public interface ActivitySpecRepository extends JpaRepository<ActivitySpec, Integer> {
 
     ActivitySpec findByName(String name);
 
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java
new file mode 100644 (file)
index 0000000..5e4340e
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.data.repository;
+
+import org.onap.so.db.catalog.beans.ActivitySpecUserParameters;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+
+@RepositoryRestResource(collectionResourceRel = "activitySpecUserParameters", path = "activitySpecUserParameters")
+public interface ActivitySpecUserParametersRepository extends JpaRepository<ActivitySpecUserParameters, Integer> {
+
+}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java
new file mode 100644 (file)
index 0000000..0dfbbb9
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.data.repository;
+
+import org.onap.so.db.catalog.beans.WorkflowActivitySpecSequence;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+
+@RepositoryRestResource(collectionResourceRel = "workflowActivitySpecSequence", path = "workflowActivitySpecSequence")
+public interface WorkflowActivitySpecSequenceRepository extends JpaRepository<WorkflowActivitySpecSequence, Integer> {
+
+}
index fb5f202..89df521 100644 (file)
@@ -24,11 +24,10 @@ import java.util.List;
 import org.onap.so.db.catalog.beans.Workflow;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.query.Param;
 import org.springframework.data.rest.core.annotation.RepositoryRestResource;
 
 @RepositoryRestResource(collectionResourceRel = "workflow", path = "workflow")
-public interface WorkflowRepository extends JpaRepository<Workflow, String> {
+public interface WorkflowRepository extends JpaRepository<Workflow, Integer> {
 
     Workflow findByArtifactUUID(String artifactUUID);
 
index 4f31e4b..547b8e5 100644 (file)
@@ -15,8 +15,6 @@
 package org.onap.so.db.catalog.data.repository;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import java.util.List;
 import org.junit.Assert;
 import org.junit.Test;