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