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.xml.bind.annotation.XmlElement;
26 import javax.xml.bind.annotation.XmlRootElement;
28 import com.fasterxml.jackson.annotation.JsonInclude;
29 import com.fasterxml.jackson.annotation.JsonInclude.Include;
30 import com.fasterxml.jackson.annotation.JsonProperty;
31 import com.fasterxml.jackson.annotation.JsonRootName;
33 // NOTE: the JAXB (XML) annotations are required with JBoss AS7 and RESTEasy,
34 // even though we are using JSON exclusively. The @NoJackson annotation
35 // is also required in this environment.
38 * SDNC adapter request for "agnostic" API services.
39 * The target action is determined by a service type and an operation.
41 @JsonRootName("SDNCServiceRequest")
42 @JsonInclude(Include.NON_NULL)
43 @XmlRootElement(name = "SDNCServiceRequest")
44 public class SDNCServiceRequest extends SDNCRequestCommon implements Serializable {
45 private static final long serialVersionUID = 1L;
47 // Request Information specified by SDNC "agnostic" API
48 private RequestInformation requestInformation;
50 // Service Information specified by: SDNC "agnostic" API
51 private ServiceInformation serviceInformation;
53 // The SDNC service type specified by SDNC "agnostic" API
54 private String sdncService;
56 // The SDNC operation specified by SDNC "agnostic" API
57 private String sdncOperation;
59 // The SDNC service data type specified by SDNC "agnostic" API
60 private String sdncServiceDataType;
62 // The SDNC service data specified by SDNC "agnostic" API
63 private String sdncServiceData;
65 public SDNCServiceRequest() {
68 public SDNCServiceRequest(String bpNotificationUrl, String bpTimeout,
69 String sdncRequestId, String sdncService, String sdncOperation,
70 RequestInformation requestInformation,
71 ServiceInformation serviceInformation, String sdncServiceDataType,
72 String sndcServiceData) {
73 super(bpNotificationUrl, bpTimeout, sdncRequestId);
74 this.requestInformation = requestInformation;
75 this.serviceInformation = serviceInformation;
76 this.sdncService = sdncService;
77 this.sdncOperation = sdncOperation;
78 this.sdncServiceDataType = sdncServiceDataType;
79 this.sdncServiceData = sndcServiceData;
82 @JsonProperty("requestInformation")
83 @XmlElement(name = "requestInformation")
84 public RequestInformation getRequestInformation() {
85 return requestInformation;
88 @JsonProperty("requestInformation")
89 public void setRequestInformation(RequestInformation requestInformation) {
90 this.requestInformation = requestInformation;
93 @JsonProperty("serviceInformation")
94 @XmlElement(name = "serviceInformation")
95 public ServiceInformation getServiceInformation() {
96 return serviceInformation;
99 @JsonProperty("serviceInformation")
100 public void setServiceInformation(ServiceInformation serviceInformation) {
101 this.serviceInformation = serviceInformation;
104 @JsonProperty("sdncService")
105 @XmlElement(name = "sdncService")
106 public String getSdncService() {
110 @JsonProperty("sdncService")
111 public void setSdncService(String sdncService) {
112 this.sdncService = sdncService;
115 @JsonProperty("sdncOperation")
116 @XmlElement(name = "sdncOperation")
117 public String getSdncOperation() {
118 return sdncOperation;
121 @JsonProperty("sdncOperation")
122 public void setSdncOperation(String sdncOperation) {
123 this.sdncOperation = sdncOperation;
126 @JsonProperty("sdncServiceDataType")
127 @XmlElement(name = "sdncServiceDataType")
128 public String getSdncServiceDataType() {
129 return sdncServiceDataType;
132 @JsonProperty("sdncServiceDataType")
133 public void setSdncServiceDataType(String sdncServiceDataType) {
134 this.sdncServiceDataType = sdncServiceDataType;
137 @JsonProperty("sdncServiceData")
138 @XmlElement(name = "sdncServiceData")
139 public String getSdncServiceData() {
140 return sdncServiceData;
143 @JsonProperty("sdncServiceData")
144 public void setSdncServiceData(String sndcServiceData) {
145 this.sdncServiceData = sndcServiceData;