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.logger.MsoLogger;
34 import org.openecomp.mso.openstack.beans.VnfStatus;
36 @XmlRootElement(name = "queryVfModuleResponse")
38 public class QueryVfModuleResponse {
39 private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
41 private String vfModuleId;
42 private String vfModuleStackId;
43 private VnfStatus vnfStatus;
44 private Map<String,String> vfModuleOutputs;
46 public QueryVfModuleResponse() {
50 public QueryVfModuleResponse(String vnfId, String vfModuleId,
51 String vfModuleStackId, VnfStatus vnfStatus,
52 Map<String, String> vfModuleOutputs) {
55 this.vfModuleId = vfModuleId;
56 this.vfModuleStackId = vfModuleStackId;
57 this.vnfStatus = vnfStatus;
58 this.vfModuleOutputs = vfModuleOutputs;
61 public String getVnfId() {
65 public void setVnfId(String vnfId) {
69 public String getVfModuleId() {
73 public void setVfModuleId(String vfModuleId) {
74 this.vfModuleId = vfModuleId;
77 public String getVfModuleStackId() {
78 return vfModuleStackId;
81 public void setVfModuleStackId(String vfModuleStackId) {
82 this.vfModuleStackId = vfModuleStackId;
85 public VnfStatus getVnfStatus() {
89 public void setVnfStatus(VnfStatus vnfStatus) {
90 this.vnfStatus = vnfStatus;
93 public Map<String, String> getVfModuleOutputs() {
94 return vfModuleOutputs;
97 public void setVfModuleOutputs(Map<String, String> vfModuleOutputs) {
98 this.vfModuleOutputs = vfModuleOutputs;
101 public String toJsonString() {
102 String jsonString = null;
104 ObjectMapper mapper = new ObjectMapper();
105 jsonString = mapper.writeValueAsString(this);
107 catch (Exception e) {
108 LOGGER.debug("Exception :",e);