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.sdnc.impl;
25 import org.onap.so.logger.MsoLogger;
26 public class RequestTunables {
29 private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,RequestTunables.class);
31 public static final String GENERATED_KEY = "Generated key: ";
34 private String reqId = "";
35 private String msoAction = "";
36 private String operation = "";
37 private String action = "";
40 private String reqMethod = "POST";
41 private String sdncUrl = null;
42 private String timeout = "60000";
43 private String headerName = "sdnc-request-header";
44 private String namespace = "";
45 private String asyncInd = "N"; //future use
47 private String sdncaNotificationUrl = null;
49 public RequestTunables(String reqId, String msoAction, String operation, String action) {
54 if (msoAction != null) {
55 this.msoAction = msoAction;
57 if (operation != null) {
58 this.operation = operation;
65 public RequestTunables(RequestTunables original) {
66 this.reqId = original.reqId;
67 this.action = original.action;
68 this.msoAction = original.msoAction;
69 this.operation = original.operation;
70 this.reqMethod = original.reqMethod;
71 this.sdncUrl = original.sdncUrl;
72 this.timeout = original.timeout;
73 this.headerName = original.headerName;
74 this.namespace = original.namespace;
75 this.asyncInd = original.asyncInd;
76 this.sdncaNotificationUrl = original.sdncaNotificationUrl;
79 public String getReqId() {
82 public void setReqId(String reqId) {
85 public String getReqMethod() {
88 public void setReqMethod(String reqMethod) {
89 this.reqMethod = reqMethod;
91 public String getMsoAction() {
94 public void setMsoAction(String msoAction) {
95 this.msoAction = msoAction;
97 public String getAction() {
100 public void setAction(String action) {
101 this.action = action;
103 public String getOperation() {
106 public void setOperation(String operation) {
107 this.operation = operation;
109 public String getSdncUrl() {
112 public void setSdncUrl(String sdncUrl) {
113 this.sdncUrl = sdncUrl;
115 public String getTimeout() {
118 public void setTimeout(String timeout) {
119 this.timeout = timeout;
121 public String getAsyncInd() {
124 public void setAsyncInd(String asyncInd) {
125 this.asyncInd = asyncInd;
127 public String getHeaderName() {
130 public void setHeaderName(String headerName) {
131 this.headerName = headerName;
135 public String getSdncaNotificationUrl() {
136 return sdncaNotificationUrl;
139 public void setSdncaNotificationUrl(String sdncaNotificationUrl) {
140 this.sdncaNotificationUrl = sdncaNotificationUrl;
143 public String getNamespace() {
147 public void setNamespace(String namespace) {
148 this.namespace = namespace;
152 public String toString() {
153 return "RequestTunables [reqId=" + reqId + ", msoAction=" + msoAction
154 + ", operation=" + operation + ", action=" + action
155 + ", reqMethod=" + reqMethod + ", sdncUrl=" + sdncUrl
156 + ", timeout=" + timeout + ", headerName=" + headerName
157 + ", sdncaNotificationUrl=" + sdncaNotificationUrl
158 + ", namespace=" + namespace + "]";