diff options
author | Smokowski, Steven <steve.smokowski@att.com> | 2019-04-26 21:10:25 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-04-28 10:40:57 -0400 |
commit | a10606e383ce6c872cb7c95fe1d5e65565827813 (patch) | |
tree | 2c8baf9a0ea897ee884611a332ca61ef9f1bc5ad /common/src/main/java | |
parent | 0bb58cfbe91dd7b77178f775df16d873131eb1ef (diff) |
Store Cloud Request in Database
Store Cloud Request in Database, add to request service
Add query Param to Plural to include cloud data
Change-Id: If906d28d0dc9c0c804e550e2074af3d75ba46d32
Issue-ID: SO-1807
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'common/src/main/java')
-rw-r--r-- | common/src/main/java/org/onap/so/serviceinstancebeans/CloudRequestData.java | 59 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/serviceinstancebeans/Request.java | 15 |
2 files changed, 73 insertions, 1 deletions
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/CloudRequestData.java b/common/src/main/java/org/onap/so/serviceinstancebeans/CloudRequestData.java new file mode 100644 index 0000000000..abaef26562 --- /dev/null +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/CloudRequestData.java @@ -0,0 +1,59 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2019 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.serviceinstancebeans; + +import org.apache.commons.lang3.builder.ToStringBuilder; + +public class CloudRequestData { + + Object cloudRequest; + String cloudIdentifier; + + public CloudRequestData() {} + + public CloudRequestData(Object cloudRequest, String cloudIdentifier) { + this.cloudRequest = cloudRequest; + this.cloudIdentifier = cloudIdentifier; + } + + public Object getCloudRequest() { + return cloudRequest; + } + + public void setCloudRequest(Object cloudRequest) { + this.cloudRequest = cloudRequest; + } + + public String getCloudIdentifier() { + return cloudIdentifier; + } + + public void setCloudIdentifier(String cloudIdentifier) { + this.cloudIdentifier = cloudIdentifier; + } + + @Override + public String toString() { + return new ToStringBuilder(this).append("cloudRequest", cloudRequest).append("cloudIdentifier", cloudIdentifier) + .toString(); + } +} diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/Request.java b/common/src/main/java/org/onap/so/serviceinstancebeans/Request.java index 8635af5b94..fbdb27c0ec 100644 --- a/common/src/main/java/org/onap/so/serviceinstancebeans/Request.java +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/Request.java @@ -20,7 +20,9 @@ package org.onap.so.serviceinstancebeans; +import java.util.ArrayList; import java.util.List; +import java.util.Map; import org.apache.commons.lang3.builder.ToStringBuilder; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -38,6 +40,7 @@ public class Request { protected InstanceReferences instanceReferences; protected RequestStatus requestStatus; protected List<RequestProcessingData> requestProcessingData; + protected List<CloudRequestData> cloudRequestData = new ArrayList<>(); public String getRequestId() { @@ -112,12 +115,22 @@ public class Request { this.requestProcessingData = requestProcessingData; } + + public List<CloudRequestData> getCloudRequestData() { + return cloudRequestData; + } + + public void setCloudRequestData(List<CloudRequestData> cloudRequestData) { + this.cloudRequestData = cloudRequestData; + } + @Override public String toString() { return new ToStringBuilder(this).append("requestId", requestId).append("startTime", startTime) .append("finishTime", finishTime).append("requestScope", requestScope) .append("requestType", requestType).append("requestDetails", requestDetails) .append("instanceReferences", instanceReferences).append("requestStatus", requestStatus) - .append("requestProcessingData", requestProcessingData).toString(); + .append("requestProcessingData", requestProcessingData).append("cloudRequestData", cloudRequestData) + .toString(); } } |