2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.openecomp.mso.adapters.vnfrest;
27 import javax.xml.bind.annotation.XmlRootElement;
29 import org.codehaus.jackson.map.ObjectMapper;
30 import org.codehaus.jackson.map.SerializationConfig;
31 import org.jboss.resteasy.annotations.providers.NoJackson;
33 import org.openecomp.mso.logger.MsoLogger;
35 import org.openecomp.mso.openstack.beans.VnfStatus;
37 @XmlRootElement(name = "queryVolumeGroupResponse")
39 public class QueryVolumeGroupResponse {
40 private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
41 private String volumeGroupId;
42 private String volumeGroupStackId;
43 private VnfStatus volumeGroupStatus;
44 private Map<String,String> volumeGroupOutputs;
46 public QueryVolumeGroupResponse() {
49 public QueryVolumeGroupResponse(
51 String volumeGroupStackId,
52 VnfStatus volumeGroupStatus,
53 Map<String, String> volumeGroupOutputs)
56 this.volumeGroupId = volumeGroupId;
57 this.volumeGroupStackId = volumeGroupStackId;
58 this.volumeGroupStatus = volumeGroupStatus;
59 this.volumeGroupOutputs = volumeGroupOutputs;
62 public String getVolumeGroupId() {
66 public void setVolumeGroupId(String volumeGroupId) {
67 this.volumeGroupId = volumeGroupId;
70 public String getVolumeGroupStackId() {
71 return volumeGroupStackId;
74 public void setVolumeGroupStackId(String volumeGroupStackId) {
75 this.volumeGroupStackId = volumeGroupStackId;
78 public VnfStatus getVolumeGroupStatus() {
79 return volumeGroupStatus;
82 public void setVolumeGroupStatus(VnfStatus volumeGroupStatus) {
83 this.volumeGroupStatus = volumeGroupStatus;
86 public Map<String, String> getVolumeGroupOutputs() {
87 return volumeGroupOutputs;
90 public void setVolumeGroupOutputs(Map<String, String> volumeGroupOutputs) {
91 this.volumeGroupOutputs = volumeGroupOutputs;
94 public String toJsonString() {
95 String jsonString = null;
97 ObjectMapper mapper = new ObjectMapper();
98 mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
99 jsonString = mapper.writeValueAsString(this);
101 catch (Exception e) {
102 LOGGER.debug("Exception :",e);