2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 * ============LICENSE_END=========================================================
25 package org.onap.appc.requesthandler.impl;
29 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
30 import com.fasterxml.jackson.annotation.JsonProperty;
31 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
34 * This class represents a message being sent out to DMaaP by APPC as async response.
35 * 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
38 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
39 @JsonIgnoreProperties(ignoreUnknown = true)
40 public class DmaapOutgoingMessage {
42 @JsonProperty("version")
43 private String version;
48 @JsonProperty("correlation-id")
49 private String correlationID;
51 private final static String defaultCambriaPartition = "MSO";
52 @JsonProperty("cambria.partition")
53 private String cambriaPartition = defaultCambriaPartition;
55 @JsonProperty("rpc-name")
56 private String rpcName;
61 public DmaapOutgoingMessage() {
64 public String getVersion() {
68 public void setVersion(String version) {
69 this.version = version;
72 public String getType() {
76 public void setType(String type) {
80 public String getCorrelationID() {
84 public void setCorrelationID(String correlationID) {
85 this.correlationID = correlationID;
88 public String getCambriaPartition() {
89 return cambriaPartition;
92 public void setCambriaPartition(String cambriaPartition) {
93 this.cambriaPartition = cambriaPartition;
96 public String getRpcName() {
100 public void setRpcName(String rpcName) {
101 this.rpcName = rpcName;
104 public Body getBody() {
108 public void setBody(Body body) {
113 public String toString() {
114 return "DmaapOutgoingMessage{" +
115 "cambriaPartition='" + cambriaPartition + '\'' +
116 ", rpcName='" + rpcName + '\'' +
121 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
122 @JsonIgnoreProperties(ignoreUnknown = true)
123 public static class Body {
127 public Body(Object output) {
128 this.output = output;
131 @JsonProperty("output")
132 private Object output;
134 public Object getOutput() {
138 public void setOutput(Object body) {
143 public String toString() {