2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights
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=========================================================
22 package org.openecomp.appc.requesthandler.impl;
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
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 represened in org.openecomp.appc.listener.LCM.domainmodel.DmaapOutgoingMessage
35 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
36 @JsonIgnoreProperties(ignoreUnknown = true)
37 public class DmaapOutgoingMessage {
39 @JsonProperty("version")
40 private String version;
45 @JsonProperty("correlation-id")
46 private String correlationID;
48 private final static String defaultCambriaPartition = "MSO";
49 @JsonProperty("cambria.partition")
50 private String cambriaPartition = defaultCambriaPartition;
52 @JsonProperty("rpc-name")
53 private String rpcName;
58 public DmaapOutgoingMessage() {
61 public String getVersion() {
65 public void setVersion(String version) {
66 this.version = version;
69 public String getType() {
73 public void setType(String type) {
77 public String getCorrelationID() {
81 public void setCorrelationID(String correlationID) {
82 this.correlationID = correlationID;
85 public String getCambriaPartition() {
86 return cambriaPartition;
89 public void setCambriaPartition(String cambriaPartition) {
90 this.cambriaPartition = cambriaPartition;
93 public String getRpcName() {
97 public void setRpcName(String rpcName) {
98 this.rpcName = rpcName;
101 public Body getBody() {
105 public void setBody(Body body) {
110 public String toString() {
111 return "DmaapOutgoingMessage{" +
112 "cambriaPartition='" + cambriaPartition + '\'' +
113 ", rpcName='" + rpcName + '\'' +
118 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
119 @JsonIgnoreProperties(ignoreUnknown = true)
120 public static class Body {
124 public Body(Object output) {
125 this.output = output;
128 @JsonProperty("output")
129 private Object output;
131 public Object getOutput() {
135 public void setOutput(Object body) {
140 public String toString() {