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.requesthandler.impl;
28 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
29 import com.fasterxml.jackson.annotation.JsonInclude;
30 import com.fasterxml.jackson.annotation.JsonProperty;
33 * This class represents a message being sent out to DMaaP by APPC as async response.
34 * note the structure of this class must be adapted to the sync message sent to DMaaP represened in org.onap.appc.listener.LCM.domainmodel.DmaapOutgoingMessage
37 @JsonInclude(JsonInclude.Include.NON_NULL)
38 @JsonIgnoreProperties(ignoreUnknown = true)
39 public class DmaapOutgoingMessage {
41 @JsonProperty("version")
42 private String version;
47 @JsonProperty("correlation-id")
48 private String correlationID;
50 private final static String defaultCambriaPartition = "MSO";
51 @JsonProperty("cambria.partition")
52 private String cambriaPartition = defaultCambriaPartition;
54 @JsonProperty("rpc-name")
55 private String rpcName;
60 public DmaapOutgoingMessage() {
63 public String getVersion() {
67 public void setVersion(String version) {
68 this.version = version;
71 public String getType() {
75 public void setType(String type) {
79 public String getCorrelationID() {
83 public void setCorrelationID(String correlationID) {
84 this.correlationID = correlationID;
87 public String getCambriaPartition() {
88 return cambriaPartition;
91 public void setCambriaPartition(String cambriaPartition) {
92 this.cambriaPartition = cambriaPartition;
95 public String getRpcName() {
99 public void setRpcName(String rpcName) {
100 this.rpcName = rpcName;
103 public Body getBody() {
107 public void setBody(Body body) {
112 public String toString() {
113 return "DmaapOutgoingMessage{" +
114 "cambriaPartition='" + cambriaPartition + '\'' +
115 ", rpcName='" + rpcName + '\'' +
120 @JsonInclude(JsonInclude.Include.NON_NULL)
121 @JsonIgnoreProperties(ignoreUnknown = true)
122 public static class Body {
126 public Body(Object output) {
127 this.output = output;
130 @JsonProperty("output")
131 private Object output;
133 public Object getOutput() {
137 public void setOutput(Object body) {
142 public String toString() {