2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Modifications Copyright (C) 2018 IBM.
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.
20 * ============LICENSE_END=========================================================
23 package org.onap.so.adapters.sdnc.impl;
27 import org.onap.so.logger.MsoLogger;
28 public class RequestTunables {
32 public static final String GENERATED_KEY = "Generated key: ";
35 private String reqId = "";
36 private String msoAction = "";
37 private String operation = "";
38 private String action = "";
41 private String reqMethod = "POST";
42 private String sdncUrl = null;
43 private String timeout = "60000";
44 private String headerName = "sdnc-request-header";
45 private String namespace = "";
46 private String asyncInd = "N"; //future use
48 private String sdncaNotificationUrl = null;
50 public RequestTunables(String reqId, String msoAction, String operation, String action) {
55 if (msoAction != null) {
56 this.msoAction = msoAction;
58 if (operation != null) {
59 this.operation = operation;
66 public RequestTunables(RequestTunables original) {
67 this.reqId = original.reqId;
68 this.action = original.action;
69 this.msoAction = original.msoAction;
70 this.operation = original.operation;
71 this.reqMethod = original.reqMethod;
72 this.sdncUrl = original.sdncUrl;
73 this.timeout = original.timeout;
74 this.headerName = original.headerName;
75 this.namespace = original.namespace;
76 this.asyncInd = original.asyncInd;
77 this.sdncaNotificationUrl = original.sdncaNotificationUrl;
80 public String getReqId() {
83 public void setReqId(String reqId) {
86 public String getReqMethod() {
89 public void setReqMethod(String reqMethod) {
90 this.reqMethod = reqMethod;
92 public String getMsoAction() {
95 public void setMsoAction(String msoAction) {
96 this.msoAction = msoAction;
98 public String getAction() {
101 public void setAction(String action) {
102 this.action = action;
104 public String getOperation() {
107 public void setOperation(String operation) {
108 this.operation = operation;
110 public String getSdncUrl() {
113 public void setSdncUrl(String sdncUrl) {
114 this.sdncUrl = sdncUrl;
116 public String getTimeout() {
119 public void setTimeout(String timeout) {
120 this.timeout = timeout;
122 public String getAsyncInd() {
125 public void setAsyncInd(String asyncInd) {
126 this.asyncInd = asyncInd;
128 public String getHeaderName() {
131 public void setHeaderName(String headerName) {
132 this.headerName = headerName;
136 public String getSdncaNotificationUrl() {
137 return sdncaNotificationUrl;
140 public void setSdncaNotificationUrl(String sdncaNotificationUrl) {
141 this.sdncaNotificationUrl = sdncaNotificationUrl;
144 public String getNamespace() {
148 public void setNamespace(String namespace) {
149 this.namespace = namespace;
153 public String toString() {
154 return "RequestTunables [reqId=" + reqId + ", msoAction=" + msoAction
155 + ", operation=" + operation + ", action=" + action
156 + ", reqMethod=" + reqMethod + ", sdncUrl=" + sdncUrl
157 + ", timeout=" + timeout + ", headerName=" + headerName
158 + ", sdncaNotificationUrl=" + sdncaNotificationUrl
159 + ", namespace=" + namespace + "]";