2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights
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.appc.requesthandler.impl;
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
31 * This class represents a message being sent out to DMaaP by APPC as async response.
32 * note the structure of this class must be adapted to the sync message sent to DMaaP represened in org.openecomp.appc.listener.LCM.domainmodel.DmaapOutgoingMessage
35 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
36 @JsonIgnoreProperties(ignoreUnknown = true)
37 public class DmaapOutgoingMessage {
39 private final static String defaultCambriaPartition = "MSO";
40 @JsonProperty("cambria.partition")
41 private String cambriaPartition = defaultCambriaPartition;
43 @JsonProperty("rpc-name")
44 private String rpcName;
49 public DmaapOutgoingMessage() {
52 public String getCambriaPartition() {
53 return cambriaPartition;
56 public void setCambriaPartition(String cambriaPartition) {
57 this.cambriaPartition = cambriaPartition;
60 public String getRpcName() {
64 public void setRpcName(String rpcName) {
65 this.rpcName = rpcName;
68 public Body getBody() {
72 public void setBody(Body body) {
77 public String toString() {
78 return "DmaapOutgoingMessage{" +
79 "cambriaPartition='" + cambriaPartition + '\'' +
80 ", rpcName='" + rpcName + '\'' +
85 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
86 @JsonIgnoreProperties(ignoreUnknown = true)
87 public static class Body {
91 public Body(Object output) {
95 @JsonProperty("output")
96 private Object output;
98 public Object getOutput() {
102 public void setOutput(Object body) {
107 public String toString() {