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.oam.messageadapter;
24 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
29 * This class represents a message being sent out to DMaaP by APPC as async response.
30 * note the structure of this class must be adapted to the sync message sent to DMaaP represented in org.openecomp.appc.listener.LCM.domainmodel.DmaapOutgoingMessage
33 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
34 @JsonIgnoreProperties(ignoreUnknown = true)
35 public class DmaapOutgoingMessage {
40 @JsonProperty("correlation-id")
41 private String correlationID;
43 private final static String defaultCambriaPartition = "MSO";
44 @JsonProperty("cambria.partition")
45 private String cambriaPartition = defaultCambriaPartition;
47 @JsonProperty("rpc-name")
48 private String rpcName;
53 public DmaapOutgoingMessage() {
56 public String getType() {
60 public void setType(String type) {
64 public String getCorrelationID() {
68 public void setCorrelationID(String correlationID) {
69 this.correlationID = correlationID;
72 public String getCambriaPartition() {
73 return cambriaPartition;
76 public void setCambriaPartition(String cambriaPartition) {
77 this.cambriaPartition = cambriaPartition;
80 public String getRpcName() {
84 public void setRpcName(String rpcName) {
85 this.rpcName = rpcName;
88 public Body getBody() {
92 public void setBody(Body body) {
97 public String toString() {
98 return "DmaapOutgoingMessage{" +
99 "cambriaPartition='" + cambriaPartition + '\'' +
100 ", rpcName='" + rpcName + '\'' +
105 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
106 @JsonIgnoreProperties(ignoreUnknown = true)
107 public static class Body {
111 public Body(Object output) {
112 this.output = output;
115 @JsonProperty("output")
116 private Object output;
118 public Object getOutput() {
122 public void setOutput(Object body) {
127 public String toString() {