diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java | 10 | ||||
-rw-r--r-- | src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java | 24 | ||||
-rw-r--r-- | src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReferences.java (renamed from src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReference.java) | 4 | ||||
-rw-r--r-- | src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java | 7 |
5 files changed, 32 insertions, 15 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java index bfda46e..590bace 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java @@ -17,13 +17,13 @@ package org.onap.nbi.apis.serviceorder.model.consumer; public class CreateServiceInstanceResponse { - public RequestReference getRequestReference() { - return requestReference; + public RequestReferences getRequestReferences() { + return requestReferences; } - public void setRequestReference(RequestReference requestReference) { - this.requestReference = requestReference; + public void setRequestReferences(RequestReferences requestReferences) { + this.requestReferences = requestReferences; } - private RequestReference requestReference; + private RequestReferences requestReferences; } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java index 3479f85..bef4183 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java @@ -21,6 +21,8 @@ public class ModelInfo { private String modelInvariantId; + private String modelVersionId; + private String modelNameVersionId; private String modelName; @@ -87,11 +89,25 @@ public class ModelInfo { this.modelCustomizationId = modelCustomizationId; } + public String getModelVersionId() { + return modelVersionId; + } + + public void setModelVersionId(String modelVersionId) { + this.modelVersionId = modelVersionId; + } + @Override public String toString() { - return "ModelInfo{" + "modelType='" + modelType + '\'' + ", modelInvariantId='" + modelInvariantId + '\'' - + ", modelNameVersionId='" + modelNameVersionId + '\'' + ", modelName='" + modelName + '\'' - + ", modelVersion='" + modelVersion + '\'' + ", modelCustomizationName='" + modelCustomizationName - + '\'' + ", modelCustomizationId='" + modelCustomizationId + '\'' + '}'; + return "ModelInfo{" + + "modelType='" + modelType + '\'' + + ", modelInvariantId='" + modelInvariantId + '\'' + + ", modelVersionId='" + modelVersionId + '\'' + + ", modelNameVersionId='" + modelNameVersionId + '\'' + + ", modelName='" + modelName + '\'' + + ", modelVersion='" + modelVersion + '\'' + + ", modelCustomizationName='" + modelCustomizationName + '\'' + + ", modelCustomizationId='" + modelCustomizationId + '\'' + + '}'; } } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java index 31a1853..e4bbfbb 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java @@ -32,7 +32,7 @@ public class RequestParameters { } public void setSubscriptionServiceType(String subscriptionServiceType) { - subscriptionServiceType = subscriptionServiceType; + this.subscriptionServiceType = subscriptionServiceType; } public List<UserParams> getUserParams() { diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReference.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReferences.java index 2d0b7c9..2f74f73 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReference.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReferences.java @@ -15,7 +15,7 @@ */ package org.onap.nbi.apis.serviceorder.model.consumer; -public class RequestReference { +public class RequestReferences { private String instanceId; @@ -39,6 +39,6 @@ public class RequestReference { @Override public String toString() { - return "RequestReference{" + "instanceId='" + instanceId + '\'' + ", requestId='" + requestId + '\'' + '}'; + return "RequestReferences{" + "instanceId='" + instanceId + '\'' + ", requestId='" + requestId + '\'' + '}'; } } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java index 94d5553..d623b89 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java @@ -103,7 +103,7 @@ public class SOTaskProcessor { updateServiceOrderItem(response.getBody(), serviceOrderItem); if (response.getStatusCode() != HttpStatus.CREATED || response.getBody() == null - || response.getBody().getRequestReference() == null) { + || response.getBody().getRequestReferences() == null) { serviceOrderItem.setState(StateType.FAILED); } else { serviceOrderItem.setState(StateType.INPROGRESS); @@ -246,6 +246,7 @@ public class SOTaskProcessor { modelInfo.setModelType("service"); modelInfo.setModelInvariantId((String) sdcInfos.get("invariantUUID")); modelInfo.setModelNameVersionId(orderItem.getService().getServiceSpecification().getId()); + modelInfo.setModelVersionId(orderItem.getService().getServiceSpecification().getId()); modelInfo.setModelName((String) sdcInfos.get("name")); modelInfo.setModelVersion((String) sdcInfos.get("version")); requestDetails.setModelInfo(modelInfo); @@ -301,8 +302,8 @@ public class SOTaskProcessor { ServiceOrderItem orderItem) { if (createServiceInstanceResponse != null && !orderItem.getState().equals(StateType.FAILED)) { - orderItem.getService().setId(createServiceInstanceResponse.getRequestReference().getInstanceId()); - orderItem.setRequestId(createServiceInstanceResponse.getRequestReference().getRequestId()); + orderItem.getService().setId(createServiceInstanceResponse.getRequestReferences().getInstanceId()); + orderItem.setRequestId(createServiceInstanceResponse.getRequestReferences().getRequestId()); } } |