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.mso.adapters.vnfrest;
 
  26 import javax.xml.bind.annotation.XmlRootElement;
 
  28 import org.codehaus.jackson.map.ObjectMapper;
 
  29 import org.jboss.resteasy.annotations.providers.NoJackson;
 
  31 import org.openecomp.mso.openstack.beans.VnfStatus;
 
  33 @XmlRootElement(name = "queryVfModuleResponse")
 
  35 public class QueryVfModuleResponse {
 
  37         private String vfModuleId;
 
  38         private String vfModuleStackId;
 
  39         private VnfStatus vnfStatus;
 
  40         private Map<String,String> vfModuleOutputs;
 
  42         public QueryVfModuleResponse() {
 
  46         public QueryVfModuleResponse(String vnfId, String vfModuleId,
 
  47                         String vfModuleStackId, VnfStatus vnfStatus,
 
  48                         Map<String, String> vfModuleOutputs) {
 
  51                 this.vfModuleId = vfModuleId;
 
  52                 this.vfModuleStackId = vfModuleStackId;
 
  53                 this.vnfStatus = vnfStatus;
 
  54                 this.vfModuleOutputs = vfModuleOutputs;
 
  57         public String getVnfId() {
 
  61         public void setVnfId(String vnfId) {
 
  65         public String getVfModuleId() {
 
  69         public void setVfModuleId(String vfModuleId) {
 
  70                 this.vfModuleId = vfModuleId;
 
  73         public String getVfModuleStackId() {
 
  74                 return vfModuleStackId;
 
  77         public void setVfModuleStackId(String vfModuleStackId) {
 
  78                 this.vfModuleStackId = vfModuleStackId;
 
  81         public VnfStatus getVnfStatus() {
 
  85         public void setVnfStatus(VnfStatus vnfStatus) {
 
  86                 this.vnfStatus = vnfStatus;
 
  89         public Map<String, String> getVfModuleOutputs() {
 
  90                 return vfModuleOutputs;
 
  93         public void setVfModuleOutputs(Map<String, String> vfModuleOutputs) {
 
  94                 this.vfModuleOutputs = vfModuleOutputs;
 
  97         public String toJsonString() {
 
  98                 String jsonString = null;
 
 100                         ObjectMapper mapper = new ObjectMapper();
 
 101                         jsonString = mapper.writeValueAsString(this);
 
 103                 catch (Exception e) {}