diff options
author | MariosIakovidis <marios.iakovidis@huawei.com> | 2018-09-05 15:39:22 +0100 |
---|---|---|
committer | MariosIakovidis <marios.iakovidis@huawei.com> | 2018-09-06 09:09:28 +0100 |
commit | 48360933b7e20f3ee9d6fe81501f001faaaad442 (patch) | |
tree | 6662beedc4880f763c52fff6dbed855c099cea4e /src/main/java | |
parent | 93e9e5a072e0cb5e15ca1b96594e9d8ffb63819e (diff) |
EXTAPI-125 Percent Progress
Change-Id: I57c9ee5f814a72aa50e716948f4e356de683b6e4
Issue-ID: EXTAPI-125
Signed-off-by: MariosIakovidis <marios.iakovidis@huawei.com>
Diffstat (limited to 'src/main/java')
-rwxr-xr-x | src/main/java/org/onap/nbi/apis/serviceorder/model/ServiceOrderItem.java | 23 | ||||
-rw-r--r-- | src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOGetStatusManager.java | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/ServiceOrderItem.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/ServiceOrderItem.java index 812e42b..c68af37 100755 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/ServiceOrderItem.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/ServiceOrderItem.java @@ -62,6 +62,9 @@ public class ServiceOrderItem { @JsonProperty("state") private StateType state = null; + @JsonProperty("percentProgress") + private String percentProgress = null; + @JsonProperty("@type") private String type = null; @@ -153,6 +156,22 @@ public class ServiceOrderItem { } /** + * Progress of the delivery in percentage + * + * @return percentProgress + **/ + @JsonProperty("percentProgress") + @ApiModelProperty(required = false, value = "Progress of the delivery in percentage") + @NotNull + public String getPercentProgress() { + return percentProgress; + } + + public void setPercentProgress(String percentProgress) { + this.percentProgress = percentProgress; + } + + /** * * @return type **/ @@ -313,6 +332,7 @@ public class ServiceOrderItem { ServiceOrderItem serviceOrderItem = (ServiceOrderItem) o; return Objects.equals(this.id, serviceOrderItem.id) && Objects.equals(this.action, serviceOrderItem.action) && Objects.equals(this.state, serviceOrderItem.state) + && Objects.equals(this.percentProgress, serviceOrderItem.percentProgress) && Objects.equals(this.type, serviceOrderItem.type) && Objects.equals(this.schemaLocation, serviceOrderItem.schemaLocation) && Objects.equals(this.baseType, serviceOrderItem.baseType) @@ -325,7 +345,7 @@ public class ServiceOrderItem { @Override public int hashCode() { - return Objects.hash(id, action, state, type, schemaLocation, baseType, orderItemRelationship, service, + return Objects.hash(id, action, state, percentProgress, type, schemaLocation, baseType, orderItemRelationship, service, requestId,orderItemMessage); } @@ -337,6 +357,7 @@ public class ServiceOrderItem { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" action: ").append(toIndentedString(action)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" percentProgress: ").append(toIndentedString(percentProgress)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOGetStatusManager.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOGetStatusManager.java index f553faf..da3029d 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOGetStatusManager.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOGetStatusManager.java @@ -62,6 +62,7 @@ public class SOGetStatusManager { while (!stopPolling) { response = soClient.callGetRequestStatus(requestId); if (response != null) { + orderItem.setPercentProgress(String.valueOf(response.getRequest().getRequestStatus().getPercentProgress())); if (response.getRequest().getRequestStatus().getPercentProgress() != 100) { nbRetries++; Thread.sleep(1000); @@ -114,6 +115,7 @@ public class SOGetStatusManager { while (!stopPolling) { response = soClient.callE2EGetRequestStatus(operationId, serviceId); if (response != null) { + orderItem.setPercentProgress(response.getOperation().getProgress()); result = response.getOperation().getResult(); if (PROCESSING.equals(result)) { nbRetries++; |