6947b870d725de230d4f138093f29fa6ad4b8133
[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 public class RequestTunables {
26
27         
28         
29         public static final String GENERATED_KEY = "Generated key: ";
30
31         //criteria
32         private String reqId = "";
33         private String msoAction = "";
34         private String operation = "";
35         private String action = "";
36
37         //tunables
38         private String reqMethod = "POST";
39         private String sdncUrl = null;
40         private String timeout = "60000";
41         private String headerName = "sdnc-request-header";
42         private String namespace = "";
43         private String asyncInd = "N"; //future use
44
45         private String sdncaNotificationUrl = null;
46
47         public RequestTunables(String reqId, String msoAction, String operation, String action) {
48                 super();
49                 if (reqId != null) {
50             this.reqId = reqId;
51         }
52                 if (msoAction != null) {
53             this.msoAction = msoAction;
54         }
55                 if (operation != null) {
56             this.operation = operation;
57         }
58                 if (action != null) {
59             this.action = action;
60         }
61         }
62         
63         public RequestTunables(RequestTunables original) {
64                 this.reqId = original.reqId;
65                 this.action = original.action;
66                 this.msoAction = original.msoAction;
67                 this.operation = original.operation;
68                 this.reqMethod = original.reqMethod;
69                 this.sdncUrl = original.sdncUrl;
70                 this.timeout = original.timeout;
71                 this.headerName = original.headerName;
72                 this.namespace = original.namespace;
73                 this.asyncInd = original.asyncInd;
74                 this.sdncaNotificationUrl = original.sdncaNotificationUrl;              
75         }
76
77         public String getReqId() {
78                 return reqId;
79         }
80         public void setReqId(String reqId) {
81                 this.reqId = reqId;
82         }
83         public String getReqMethod() {
84                 return reqMethod;
85         }
86         public void setReqMethod(String reqMethod) {
87                 this.reqMethod = reqMethod;
88         }
89         public String getMsoAction() {
90                 return msoAction;
91         }
92         public void setMsoAction(String msoAction) {
93                 this.msoAction = msoAction;
94         }
95         public String getAction() {
96                 return action;
97         }
98         public void setAction(String action) {
99                 this.action = action;
100         }
101         public String getOperation() {
102                 return operation;
103         }
104         public void setOperation(String operation) {
105                 this.operation = operation;
106         }
107         public String getSdncUrl() {
108                 return sdncUrl;
109         }
110         public void setSdncUrl(String sdncUrl) {
111                 this.sdncUrl = sdncUrl;
112         }
113         public String getTimeout() {
114                 return timeout;
115         }
116         public void setTimeout(String timeout) {
117                 this.timeout = timeout;
118         }
119         public String getAsyncInd() {
120                 return asyncInd;
121         }
122         public void setAsyncInd(String asyncInd) {
123                 this.asyncInd = asyncInd;
124         }
125         public String getHeaderName() {
126                 return headerName;
127         }
128         public void setHeaderName(String headerName) {
129                 this.headerName = headerName;
130         }
131
132
133         public String getSdncaNotificationUrl() {
134                 return sdncaNotificationUrl;
135         }
136
137         public void setSdncaNotificationUrl(String sdncaNotificationUrl) {
138                 this.sdncaNotificationUrl = sdncaNotificationUrl;
139         }
140
141         public String getNamespace() {
142                 return namespace;
143         }
144
145         public void setNamespace(String namespace) {
146                 this.namespace = namespace;
147         }
148
149         @Override
150         public String toString() {
151                 return "RequestTunables [reqId=" + reqId + ", msoAction=" + msoAction
152                                 + ", operation=" + operation + ", action=" + action
153                                 + ", reqMethod=" + reqMethod + ", sdncUrl=" + sdncUrl
154                                 + ", timeout=" + timeout + ", headerName=" + headerName
155                                 + ", sdncaNotificationUrl=" + sdncaNotificationUrl
156                                 + ", namespace=" + namespace + "]";
157         }
158         
159 }