Merge "Fixed Logger message in MsoNetworkAdapterAsyncImpl"
[so.git] / adapters / mso-sdnc-adapter / src / main / java / org / onap / so / adapters / sdnc / impl / RequestTunables.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
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=========================================================
21  */
22
23 package org.onap.so.adapters.sdnc.impl;
24
25
26
27 import org.onap.so.logger.MsoLogger;
28 public class RequestTunables {
29
30         
31         
32         public static final String GENERATED_KEY = "Generated key: ";
33
34         //criteria
35         private String reqId = "";
36         private String msoAction = "";
37         private String operation = "";
38         private String action = "";
39
40         //tunables
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
47
48         private String sdncaNotificationUrl = null;
49
50         public RequestTunables(String reqId, String msoAction, String operation, String action) {
51                 super();
52                 if (reqId != null) {
53             this.reqId = reqId;
54         }
55                 if (msoAction != null) {
56             this.msoAction = msoAction;
57         }
58                 if (operation != null) {
59             this.operation = operation;
60         }
61                 if (action != null) {
62             this.action = action;
63         }
64         }
65         
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;              
78         }
79
80         public String getReqId() {
81                 return reqId;
82         }
83         public void setReqId(String reqId) {
84                 this.reqId = reqId;
85         }
86         public String getReqMethod() {
87                 return reqMethod;
88         }
89         public void setReqMethod(String reqMethod) {
90                 this.reqMethod = reqMethod;
91         }
92         public String getMsoAction() {
93                 return msoAction;
94         }
95         public void setMsoAction(String msoAction) {
96                 this.msoAction = msoAction;
97         }
98         public String getAction() {
99                 return action;
100         }
101         public void setAction(String action) {
102                 this.action = action;
103         }
104         public String getOperation() {
105                 return operation;
106         }
107         public void setOperation(String operation) {
108                 this.operation = operation;
109         }
110         public String getSdncUrl() {
111                 return sdncUrl;
112         }
113         public void setSdncUrl(String sdncUrl) {
114                 this.sdncUrl = sdncUrl;
115         }
116         public String getTimeout() {
117                 return timeout;
118         }
119         public void setTimeout(String timeout) {
120                 this.timeout = timeout;
121         }
122         public String getAsyncInd() {
123                 return asyncInd;
124         }
125         public void setAsyncInd(String asyncInd) {
126                 this.asyncInd = asyncInd;
127         }
128         public String getHeaderName() {
129                 return headerName;
130         }
131         public void setHeaderName(String headerName) {
132                 this.headerName = headerName;
133         }
134
135
136         public String getSdncaNotificationUrl() {
137                 return sdncaNotificationUrl;
138         }
139
140         public void setSdncaNotificationUrl(String sdncaNotificationUrl) {
141                 this.sdncaNotificationUrl = sdncaNotificationUrl;
142         }
143
144         public String getNamespace() {
145                 return namespace;
146         }
147
148         public void setNamespace(String namespace) {
149                 this.namespace = namespace;
150         }
151
152         @Override
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 + "]";
160         }
161         
162 }