2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. 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=========================================================
21 package org.openecomp.vid.mso;
23 import com.fasterxml.jackson.annotation.JsonInclude;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
26 import org.apache.commons.lang.builder.ToStringBuilder;
29 * This wrapper encapsulates the MSO response in the format expected by the pages.
31 @JsonInclude(JsonInclude.Include.NON_NULL)
37 public class MsoResponseWrapper {
40 @JsonProperty("status")
44 @JsonProperty("entity")
45 private String entity;
52 @JsonProperty("entity")
53 public String getEntity() {
62 @JsonProperty("status")
63 public int getStatus() {
70 * @param v the new status
72 @JsonProperty("status")
73 public void setStatus(int v) {
80 * @param v the new entity
82 @JsonProperty("entity")
83 public void setEntity(String v) {
88 * @see java.lang.Object#toString()
91 public String toString() {
92 return ToStringBuilder.reflectionToString(this);
98 * @return the response
100 public String getResponse () {
102 StringBuilder b = new StringBuilder ("{ \"status\": ");
103 b.append(getStatus()).append(", \"entity\": " ).append(this.getEntity()).append("}");
104 return (b.toString());