2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.adapters.sdncrest;
23 import java.io.Serializable;
25 import javax.ws.rs.Consumes;
26 import javax.ws.rs.Produces;
27 import javax.ws.rs.core.MediaType;
28 import javax.xml.bind.annotation.XmlElement;
29 import javax.xml.bind.annotation.XmlRootElement;
31 import com.fasterxml.jackson.annotation.JsonInclude;
32 import com.fasterxml.jackson.annotation.JsonInclude.Include;
33 import com.fasterxml.jackson.annotation.JsonProperty;
34 import com.fasterxml.jackson.annotation.JsonRootName;
36 // NOTE: the JAXB (XML) annotations are required with JBoss AS7 and RESTEasy,
37 // even though we are using JSON exclusively. The @NoJackson annotation
38 // is also required in this environment.
41 * SDNC adapter request for "agnostic" API services.
42 * The target action is determined by a service type and an operation.
44 @JsonRootName("SDNCServiceRequest")
45 @JsonInclude(Include.NON_NULL)
46 @XmlRootElement(name = "SDNCServiceRequest")
47 public class SDNCServiceRequest extends SDNCRequestCommon implements Serializable {
48 private static final long serialVersionUID = 1L;
50 // Request Information specified by SDNC "agnostic" API
51 private RequestInformation requestInformation;
53 // Service Information specified by: SDNC "agnostic" API
54 private ServiceInformation serviceInformation;
56 // The SDNC service type specified by SDNC "agnostic" API
57 private String sdncService;
59 // The SDNC operation specified by SDNC "agnostic" API
60 private String sdncOperation;
62 // The SDNC service data type specified by SDNC "agnostic" API
63 private String sdncServiceDataType;
65 // The SDNC service data specified by SDNC "agnostic" API
66 private String sdncServiceData;
68 public SDNCServiceRequest() {
71 public SDNCServiceRequest(String bpNotificationUrl, String bpTimeout,
72 String sdncRequestId, String sdncService, String sdncOperation,
73 RequestInformation requestInformation,
74 ServiceInformation serviceInformation, String sdncServiceDataType,
75 String sndcServiceData) {
76 super(bpNotificationUrl, bpTimeout, sdncRequestId);
77 this.requestInformation = requestInformation;
78 this.serviceInformation = serviceInformation;
79 this.sdncService = sdncService;
80 this.sdncOperation = sdncOperation;
81 this.sdncServiceDataType = sdncServiceDataType;
82 this.sdncServiceData = sndcServiceData;
85 @JsonProperty("requestInformation")
86 @XmlElement(name = "requestInformation")
87 public RequestInformation getRequestInformation() {
88 return requestInformation;
91 @JsonProperty("requestInformation")
92 public void setRequestInformation(RequestInformation requestInformation) {
93 this.requestInformation = requestInformation;
96 @JsonProperty("serviceInformation")
97 @XmlElement(name = "serviceInformation")
98 public ServiceInformation getServiceInformation() {
99 return serviceInformation;
102 @JsonProperty("serviceInformation")
103 public void setServiceInformation(ServiceInformation serviceInformation) {
104 this.serviceInformation = serviceInformation;
107 @JsonProperty("sdncService")
108 @XmlElement(name = "sdncService")
109 public String getSdncService() {
113 @JsonProperty("sdncService")
114 public void setSdncService(String sdncService) {
115 this.sdncService = sdncService;
118 @JsonProperty("sdncOperation")
119 @XmlElement(name = "sdncOperation")
120 public String getSdncOperation() {
121 return sdncOperation;
124 @JsonProperty("sdncOperation")
125 public void setSdncOperation(String sdncOperation) {
126 this.sdncOperation = sdncOperation;
129 @JsonProperty("sdncServiceDataType")
130 @XmlElement(name = "sdncServiceDataType")
131 public String getSdncServiceDataType() {
132 return sdncServiceDataType;
135 @JsonProperty("sdncServiceDataType")
136 public void setSdncServiceDataType(String sdncServiceDataType) {
137 this.sdncServiceDataType = sdncServiceDataType;
140 @JsonProperty("sdncServiceData")
141 @XmlElement(name = "sdncServiceData")
142 public String getSdncServiceData() {
143 return sdncServiceData;
146 @JsonProperty("sdncServiceData")
147 public void setSdncServiceData(String sndcServiceData) {
148 this.sdncServiceData = sndcServiceData;