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;
24 import org.openecomp.mso.logger.MsoLogger;
29 import javax.xml.bind.annotation.XmlRootElement;
31 import org.codehaus.jackson.map.ObjectMapper;
32 import org.jboss.resteasy.annotations.providers.NoJackson;
33 import org.openecomp.mso.openstack.beans.VnfStatus;
35 @XmlRootElement(name = "queryVfModuleResponse")
37 public class QueryVfModuleResponse {
38 private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
40 private String vfModuleId;
41 private String vfModuleStackId;
42 private VnfStatus vnfStatus;
43 private Map<String,String> vfModuleOutputs;
45 public QueryVfModuleResponse() {
49 public QueryVfModuleResponse(String vnfId, String vfModuleId,
50 String vfModuleStackId, VnfStatus vnfStatus,
51 Map<String, String> vfModuleOutputs) {
54 this.vfModuleId = vfModuleId;
55 this.vfModuleStackId = vfModuleStackId;
56 this.vnfStatus = vnfStatus;
57 this.vfModuleOutputs = vfModuleOutputs;
60 public String getVnfId() {
64 public void setVnfId(String vnfId) {
68 public String getVfModuleId() {
72 public void setVfModuleId(String vfModuleId) {
73 this.vfModuleId = vfModuleId;
76 public String getVfModuleStackId() {
77 return vfModuleStackId;
80 public void setVfModuleStackId(String vfModuleStackId) {
81 this.vfModuleStackId = vfModuleStackId;
84 public VnfStatus getVnfStatus() {
88 public void setVnfStatus(VnfStatus vnfStatus) {
89 this.vnfStatus = vnfStatus;
92 public Map<String, String> getVfModuleOutputs() {
93 return vfModuleOutputs;
96 public void setVfModuleOutputs(Map<String, String> vfModuleOutputs) {
97 this.vfModuleOutputs = vfModuleOutputs;
100 public String toJsonString() {
101 String jsonString = null;
103 ObjectMapper mapper = new ObjectMapper();
104 jsonString = mapper.writeValueAsString(this);
106 catch (Exception e) {
107 LOGGER.debug("Exception :",e);