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.openecomp.appc.oam.messageadapter;
27 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
28 import com.fasterxml.jackson.annotation.JsonProperty;
29 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
32 * This class represents a message being sent out to DMaaP by APPC as async response.
33 * 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
36 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
37 @JsonIgnoreProperties(ignoreUnknown = true)
38 public class DmaapOutgoingMessage {
43 @JsonProperty("correlation-id")
44 private String correlationID;
46 private final static String defaultCambriaPartition = "MSO";
47 @JsonProperty("cambria.partition")
48 private String cambriaPartition = defaultCambriaPartition;
50 @JsonProperty("rpc-name")
51 private String rpcName;
56 public DmaapOutgoingMessage() {
59 public String getType() {
63 public void setType(String type) {
67 public String getCorrelationID() {
71 public void setCorrelationID(String correlationID) {
72 this.correlationID = correlationID;
75 public String getCambriaPartition() {
76 return cambriaPartition;
79 public void setCambriaPartition(String cambriaPartition) {
80 this.cambriaPartition = cambriaPartition;
83 public String getRpcName() {
87 public void setRpcName(String rpcName) {
88 this.rpcName = rpcName;
91 public Body getBody() {
95 public void setBody(Body body) {
100 public String toString() {
101 return "DmaapOutgoingMessage{" +
102 "cambriaPartition='" + cambriaPartition + '\'' +
103 ", rpcName='" + rpcName + '\'' +
108 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
109 @JsonIgnoreProperties(ignoreUnknown = true)
110 public static class Body {
114 public Body(Object output) {
115 this.output = output;
118 @JsonProperty("output")
119 private Object output;
121 public Object getOutput() {
125 public void setOutput(Object body) {
130 public String toString() {