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.requesthandler.impl;
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 represened in org.openecomp.appc.listener.LCM.domainmodel.DmaapOutgoingMessage
36 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
37 @JsonIgnoreProperties(ignoreUnknown = true)
38 public class DmaapOutgoingMessage {
40 @JsonProperty("version")
41 private String version;
46 @JsonProperty("correlation-id")
47 private String correlationID;
49 private final static String defaultCambriaPartition = "MSO";
50 @JsonProperty("cambria.partition")
51 private String cambriaPartition = defaultCambriaPartition;
53 @JsonProperty("rpc-name")
54 private String rpcName;
59 public DmaapOutgoingMessage() {
62 public String getVersion() {
66 public void setVersion(String version) {
67 this.version = version;
70 public String getType() {
74 public void setType(String type) {
78 public String getCorrelationID() {
82 public void setCorrelationID(String correlationID) {
83 this.correlationID = correlationID;
86 public String getCambriaPartition() {
87 return cambriaPartition;
90 public void setCambriaPartition(String cambriaPartition) {
91 this.cambriaPartition = cambriaPartition;
94 public String getRpcName() {
98 public void setRpcName(String rpcName) {
99 this.rpcName = rpcName;
102 public Body getBody() {
106 public void setBody(Body body) {
111 public String toString() {
112 return "DmaapOutgoingMessage{" +
113 "cambriaPartition='" + cambriaPartition + '\'' +
114 ", rpcName='" + rpcName + '\'' +
119 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
120 @JsonIgnoreProperties(ignoreUnknown = true)
121 public static class Body {
125 public Body(Object output) {
126 this.output = output;
129 @JsonProperty("output")
130 private Object output;
132 public Object getOutput() {
136 public void setOutput(Object body) {
141 public String toString() {