2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.openecomp.mso.requestsdb;
22 import java.io.Serializable;
25 * The Resource operation status
31 * @version ONAP Amsterdam Release 2017-08-28
33 public class ResourceOperationStatus implements Serializable{
38 private static final long serialVersionUID = 1L;
40 private String serviceId = null;
42 private String operationId = null;
44 private String resourceTemplateUUID = null;
46 private String operType = null;
48 private String resourceInstanceID = null;
50 private String jobId = null;
52 private String status = null;
54 private String progress = "0";
56 private String errorCode = null;
58 private String statusDescription = null;
60 public ResourceOperationStatus(){
64 public ResourceOperationStatus(String serviceId, String operationId, String resourceTemplateUUID)
66 this.serviceId = serviceId;
67 this.operationId = operationId;
68 this.resourceTemplateUUID = resourceTemplateUUID;
71 public String getServiceId() {
76 public void setServiceId(String serviceId) {
77 this.serviceId = serviceId;
81 public String getOperationId() {
86 public void setOperationId(String operationId) {
87 this.operationId = operationId;
91 public String getResourceTemplateUUID() {
92 return resourceTemplateUUID;
96 public void setResourceTemplateUUID(String resourceTemplateUUId) {
97 this.resourceTemplateUUID = resourceTemplateUUId;
101 public String getJobId() {
106 public void setJobId(String jobId) {
111 public String getStatus() {
116 public void setStatus(String status) {
117 this.status = status;
121 public String getProgress() {
126 public void setProgress(String progress) {
127 this.progress = progress;
131 public String getErrorCode() {
136 public void setErrorCode(String errorCode) {
137 this.errorCode = errorCode;
141 public String getStatusDescription() {
142 return statusDescription;
146 public void setStatusDescription(String statusDescription) {
147 this.statusDescription = statusDescription;
152 public String getResourceInstanceID() {
153 return resourceInstanceID;
158 public void setResourceInstanceID(String resourceInstanceID) {
159 this.resourceInstanceID = resourceInstanceID;
163 public String getOperType() {
168 public void setOperType(String operType) {
169 this.operType = operType;
176 * @since ONAP Amsterdam Release
179 public int hashCode() {
180 final int prime = 31;
182 result = prime * result + ((operationId == null) ? 0 : operationId.hashCode());
183 result = prime * result + ((resourceTemplateUUID == null) ? 0 : resourceTemplateUUID.hashCode());
184 result = prime * result + ((serviceId == null) ? 0 : serviceId.hashCode());
193 * @since ONAP Amsterdam Release
196 public boolean equals(Object obj) {
201 if(getClass() != obj.getClass())
203 ResourceOperationStatus other = (ResourceOperationStatus)obj;
204 if(operationId == null) {
205 if(other.operationId != null)
207 } else if(!operationId.equals(other.operationId))
209 if(resourceTemplateUUID == null) {
210 if(other.resourceTemplateUUID != null)
212 } else if(!resourceTemplateUUID.equals(other.resourceTemplateUUID))
214 if(serviceId == null) {
215 if(other.serviceId != null)
217 } else if(!serviceId.equals(other.serviceId))