aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java60
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence1_Response.json20
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence2_Response.json20
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence3_Response.json20
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters1_Response.json103
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters2_Response.json103
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters3_Response.json103
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters1_Response.json13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters2_Response.json13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters3_Response.json13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters4_Response.json13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters5_Response.json13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters6_Response.json13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowActivitySpecSequence_Response.json480
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecificationsQuery_Response.json937
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java8
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java7
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java82
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java12
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java83
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java16
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java27
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java10
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java84
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java26
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java6
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java11
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java84
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java2
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java30
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java30
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java3
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java2
34 files changed, 1109 insertions, 1342 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
index c480bdfbd3..890b54758e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
@@ -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);
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java
index 48abeacbc5..915018f7e4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java
@@ -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
index 0000000000..37e32631fb
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence1_Response.json
@@ -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
index 0000000000..ee2a02ba33
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence2_Response.json
@@ -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
index 0000000000..69390eea6b
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecSequence3_Response.json
@@ -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
index 0000000000..e88691b4d8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters1_Response.json
@@ -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
index 0000000000..e88691b4d8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters2_Response.json
@@ -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
index 0000000000..e88691b4d8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/ActivitySpecUserParameters3_Response.json
@@ -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
index 0000000000..017add4cd5
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters1_Response.json
@@ -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
index 0000000000..655d659c16
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters2_Response.json
@@ -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
index 0000000000..13e02e7dd6
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters3_Response.json
@@ -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
index 0000000000..e30ec0da88
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters4_Response.json
@@ -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
index 0000000000..98b18522da
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters5_Response.json
@@ -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
index 0000000000..4d8d03b6a7
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/UserParameters6_Response.json
@@ -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
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowActivitySpecSequence_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowActivitySpecSequence_Response.json
index 3192865b52..3df17380d6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowActivitySpecSequence_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowActivitySpecSequence_Response.json
@@ -1,432 +1,54 @@
{
"_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
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecificationsQuery_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecificationsQuery_Response.json
index c12365649e..cbbf0b69f6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecificationsQuery_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/WorkflowSpecificationsQuery_Response.json
@@ -1,468 +1,475 @@
{
"_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
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
index 00eff8f0c9..20c10748b6 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
@@ -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;
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
index 3518805b0d..64c77d27db 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
@@ -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
index e3dcd359ec..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java
+++ /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();
- }
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
index f0c9bd99ce..f3e6a09b7f 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
@@ -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
index 8f4cc6d966..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java
+++ /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();
- }
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
index a42a73aac9..e7ace2cda5 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
@@ -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
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java
index 49e0f3fa79..5173f27a15 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java
@@ -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
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
index be32da379e..d23c782a1a 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
@@ -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
index fd55d6e961..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java
+++ /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();
- }
-
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java
index a20647d5c1..c2cf2d7cf6 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java
@@ -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() {
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java
index 1f46bc01f7..d1e60a0f76 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java
@@ -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
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java
index 4b497cc7da..f25be45bb2 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java
@@ -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
index 41af2ed3a5..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java
+++ /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();
- }
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java
index aa474238fd..f86ae14f93 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java
@@ -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
index 0000000000..5e4340e392
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java
@@ -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
index 0000000000..0dfbbb9ead
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java
@@ -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> {
+
+}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java
index fb5f202cbc..89df52182c 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java
@@ -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);
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
index 4f31e4b38c..547b8e50a4 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
@@ -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;