2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Copyright (C) 2017 Amdocs
8 * =============================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * ============LICENSE_END=========================================================
24 package org.onap.appc.oam.messageadapter;
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
27 import com.fasterxml.jackson.annotation.JsonInclude;
28 import com.fasterxml.jackson.annotation.JsonProperty;
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 represented in org.onap.appc.listener.LCM.domainmodel.DmaapOutgoingMessage
35 @JsonInclude(JsonInclude.Include.NON_NULL)
36 @JsonIgnoreProperties(ignoreUnknown = true)
37 public class DmaapOutgoingMessage {
42 @JsonProperty("correlation-id")
43 private String correlationID;
45 private static final String defaultCambriaPartition = "MSO";
46 @JsonProperty("cambria.partition")
47 private String cambriaPartition = defaultCambriaPartition;
49 @JsonProperty("rpc-name")
50 private String rpcName;
55 public DmaapOutgoingMessage() {
58 public String getType() {
62 public void setType(String type) {
66 public String getCorrelationID() {
70 public void setCorrelationID(String correlationID) {
71 this.correlationID = correlationID;
74 public String getCambriaPartition() {
75 return cambriaPartition;
78 public void setCambriaPartition(String cambriaPartition) {
79 this.cambriaPartition = cambriaPartition;
82 public String getRpcName() {
86 public void setRpcName(String rpcName) {
87 this.rpcName = rpcName;
90 public Body getBody() {
94 public void setBody(Body body) {
99 public String toString() {
100 return "DmaapOutgoingMessage{" +
101 "cambriaPartition='" + cambriaPartition + '\'' +
102 ", rpcName='" + rpcName + '\'' +
106 @JsonInclude(JsonInclude.Include.NON_NULL)
107 @JsonIgnoreProperties(ignoreUnknown = true)
108 public static class Body {
112 public Body(Object output) {
113 this.output = output;
116 @JsonProperty("output")
117 private Object output;
119 public Object getOutput() {
123 public void setOutput(Object body) {
128 public String toString() {