diff options
Diffstat (limited to 'mso-api-handlers/mso-requests-db/src')
5 files changed, 63 insertions, 6 deletions
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java index b66e027a35..aa7b79765b 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java @@ -85,7 +85,8 @@ public class ArchivedInfraRequests extends InfraRequests { .append("networkName", getNetworkName()).append("networkType", getNetworkType()) .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) - .append("operationalEnvName", getOperationalEnvName()).toString(); + .append("operationalEnvName", getOperationalEnvName()) + .append("requestUrl", getRequestUrl()).toString(); } } diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java index 348fc524ef..08aaeb9960 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java @@ -89,6 +89,7 @@ public class InfraActiveRequests extends InfraRequests { .append("networkName", getNetworkName()).append("networkType", getNetworkType()) .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) - .append("operationalEnvName", getOperationalEnvName()).toString(); + .append("operationalEnvName", getOperationalEnvName()) + .append("requestUrl", getRequestUrl()).toString(); } } diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java index 4a46a0d00d..0f41d4f79b 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java @@ -57,6 +57,8 @@ public abstract class InfraRequests implements java.io.Serializable { private String requestStatus; @Column(name = "STATUS_MESSAGE", length = 2000) private String statusMessage; + @Column(name = "ROLLBACK_STATUS_MESSAGE", length = 2000) + private String rollbackStatusMessage; @Column(name = "PROGRESS", precision = 11) private Long progress; @@ -137,7 +139,9 @@ public abstract class InfraRequests implements java.io.Serializable { private String operationalEnvId; @Column(name = "OPERATIONAL_ENV_NAME", length = 200) private String operationalEnvName; - + @Column(name = "REQUEST_URL", length = 500) + private String requestUrl; + @ResourceId public URI getRequestURI() { return URI.create(this.requestId); @@ -182,6 +186,14 @@ public abstract class InfraRequests implements java.io.Serializable { public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } + + public String getRollbackStatusMessage() { + return this.rollbackStatusMessage; + } + + public void setRollbackStatusMessage(String rollbackStatusMessage) { + this.rollbackStatusMessage = rollbackStatusMessage; + } public Long getProgress() { return this.progress; @@ -493,6 +505,14 @@ public abstract class InfraRequests implements java.io.Serializable { this.operationalEnvName = operationalEnvName; } + public String getRequestUrl() { + return this.requestUrl; + } + + public void setRequestUrl(String requestUrl) { + this.requestUrl = requestUrl; + } + @PrePersist protected void onCreate() { if (requestScope == null) @@ -532,7 +552,7 @@ public abstract class InfraRequests implements java.io.Serializable { public String toString() { return new ToStringBuilder(this).append("requestId", getRequestId()) .append("clientRequestId", getClientRequestId()).append("action", getAction()) - .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage()) + .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage()).append("rollbackStatusMessage", getRollbackStatusMessage()) .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime()) .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName()) .append("vnfType", getVnfType()).append("serviceType", getServiceType()) @@ -551,6 +571,7 @@ public abstract class InfraRequests implements java.io.Serializable { .append("networkName", getNetworkName()).append("networkType", getNetworkType()) .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) - .append("operationalEnvName", getOperationalEnvName()).toString(); + .append("operationalEnvName", getOperationalEnvName()) + .append("requestUrl", getRequestUrl()).toString(); } } diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/exceptions/NoEntityFoundException.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/exceptions/NoEntityFoundException.java new file mode 100644 index 0000000000..76418629e1 --- /dev/null +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/exceptions/NoEntityFoundException.java @@ -0,0 +1,34 @@ +/*- + * ============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.request.exceptions; +public class NoEntityFoundException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 545820289784366486L; + + public NoEntityFoundException(String errorMessage) { + super(errorMessage); + } + + +} diff --git a/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml b/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml index c4dd60356b..670d16b6c7 100644 --- a/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml +++ b/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml @@ -16,7 +16,7 @@ mso: # H2 spring: datasource: - url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1; + jdbc-url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1; username: sa password: sa driver-class-name: org.h2.Driver |