2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright (C) 2017 Amdocs
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=========================================================
20 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 package org.openecomp.appc.oam.messageadapter;
25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
26 import com.fasterxml.jackson.annotation.JsonProperty;
27 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
30 * This class represents a message being sent out to DMaaP by APPC as async response.
31 * 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
34 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
35 @JsonIgnoreProperties(ignoreUnknown = true)
36 public class DmaapOutgoingMessage {
41 @JsonProperty("correlation-id")
42 private String correlationID;
44 private final static String defaultCambriaPartition = "MSO";
45 @JsonProperty("cambria.partition")
46 private String cambriaPartition = defaultCambriaPartition;
48 @JsonProperty("rpc-name")
49 private String rpcName;
54 public DmaapOutgoingMessage() {
57 public String getType() {
61 public void setType(String type) {
65 public String getCorrelationID() {
69 public void setCorrelationID(String correlationID) {
70 this.correlationID = correlationID;
73 public String getCambriaPartition() {
74 return cambriaPartition;
77 public void setCambriaPartition(String cambriaPartition) {
78 this.cambriaPartition = cambriaPartition;
81 public String getRpcName() {
85 public void setRpcName(String rpcName) {
86 this.rpcName = rpcName;
89 public Body getBody() {
93 public void setBody(Body body) {
98 public String toString() {
99 return "DmaapOutgoingMessage{" +
100 "cambriaPartition='" + cambriaPartition + '\'' +
101 ", rpcName='" + rpcName + '\'' +
106 @JsonSerialize(include = JsonSerialize.Inclusion.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() {