Policy 1707 commit to LF
[policy/engine.git] / ECOMP-PAP-REST / src / main / java / org / openecomp / policy / pap / xacml / rest / elk / client / PolicyElasticData.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ECOMP-PAP-REST
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 package org.openecomp.policy.pap.xacml.rest.elk.client;
21
22 import java.util.ArrayList;
23 import java.util.LinkedHashMap;
24 import java.util.List;
25 import java.util.Map;
26
27 import org.openecomp.policy.rest.adapter.PolicyRestAdapter;
28
29 public class PolicyElasticData {
30         
31         private String scope;
32         private String policyType;
33         private String configPolicyType;
34         private String policyName;
35         private String policyDescription;
36         private String ecompName;
37         private String configName;
38         private String configType;
39         private String jsonBody;
40
41         //Safe Policy
42         private String policyScope;
43         private String providerComboBox;
44         private String riskType;
45         private String riskLevel;
46         private String guard;
47         private String ttlDate;
48         private  Map<String,String> matching; 
49
50         private ArrayList<Object> triggerSignatures;
51         private ArrayList<Object> symptomSignatures;
52         private String logicalConnector;
53         private String policyStatus;
54         public String gocServerScope;
55         private String supressionType;
56
57         //MicroSerice
58         private String serviceType;
59         private String uuid;
60         private String location;
61         private String priority;
62         private String msLocation;
63
64         //BRMS Policies
65         private String ruleName;
66         private Map<String,String> brmsParamBody;
67         private String brmsController;
68         private ArrayList<String> brmsDependency;
69         private LinkedHashMap<?, ?>  ruleData;
70         private LinkedHashMap<?,?>   ruleListData;
71         private Map<String,String> drlRuleAndUIParams;
72
73         //ClosedLoop
74         private String clearTimeOut;
75         private String trapMaxAge;
76         private String verificationclearTimeOut;
77         public Map<String , String> dynamicLayoutMap;
78
79         //FireWall
80         private String fwPolicyType;
81         private ArrayList<Object> fwattributes;
82         private String parentForChild;
83         private String securityZone;
84
85         //Action & Decision
86         private String ruleCombiningAlgId;
87         private Map<String,String> dynamicFieldConfigAttributes;
88         private Map<String,String> dynamicSettingsMap;
89         private Map<String,String> dropDownMap;
90         private String actionPerformer;
91         private String actionAttribute;
92         private List<String> dynamicRuleAlgorithmLabels;
93         private List<String> dynamicRuleAlgorithmCombo;
94         private List<String> dynamicRuleAlgorithmField1;
95         private List<String> dynamicRuleAlgorithmField2;
96         private List<Object> dynamicVariableList;
97         private List<String> dataTypeList;
98         private String actionAttributeValue;
99         private String ruleProvider;
100         private String actionBody;
101         private String actionDictHeader;
102         private String actionDictType;
103         private String actionDictUrl;
104         private String actionDictMethod;
105
106         public PolicyElasticData(PolicyRestAdapter policyData) {
107                 this.scope = policyData.getDomain();
108                 this.policyType = policyData.getPolicyType();
109                 this.configPolicyType = policyData.getConfigPolicyType();
110                 this.policyName  = policyData.getNewFileName();
111                 this.policyDescription  = policyData.getPolicyDescription();
112                 this.ecompName = policyData.getEcompName();
113                 this.configName = policyData.getConfigName();
114                 this.configType = policyData.getConfigType();
115                 this.jsonBody = policyData.getJsonBody();
116
117                 //Safe Policy
118                 this.policyScope = policyData.getPolicyScope();
119                 this.providerComboBox = policyData.getProviderComboBox();
120                 this.riskType = policyData.getRiskType();
121                 this.riskLevel = policyData.getRiskLevel();
122                 this.guard  = policyData.getGuard();
123                 this.ttlDate = policyData.getTtlDate();
124                 this.matching = policyData.getMatching(); 
125
126                 this.triggerSignatures = policyData.getTriggerSignatures();
127                 this.symptomSignatures = policyData.getSymptomSignatures();
128                 this.logicalConnector = policyData.getLogicalConnector();
129                 this.policyStatus = policyData.getPolicyStatus();
130                 this.gocServerScope = policyData.getGocServerScope();
131                 this.supressionType = policyData.getSupressionType();
132
133                 //MicroSerice
134                 this.serviceType = policyData.getServiceType();
135                 this.uuid = policyData.getUuid();
136                 this.location = policyData.getLocation();
137                 this.priority = policyData.getPriority();
138                 this.msLocation = policyData.getMsLocation();
139
140                 //BRMS Policies
141                 this.ruleName = policyData.getRuleName();
142                 this.brmsParamBody = policyData.getBrmsParamBody();
143                 this.brmsController = policyData.getBrmsController();
144                 this.brmsDependency = policyData.getBrmsDependency();
145                 this.ruleData = policyData.getRuleData();
146                 this.ruleListData = policyData.getRuleListData();
147                 this.drlRuleAndUIParams = policyData.getDrlRuleAndUIParams();
148
149                 //ClosedLoop
150                 this.clearTimeOut = policyData.getClearTimeOut();
151                 this.trapMaxAge = policyData.getTrapMaxAge();
152                 this.verificationclearTimeOut = policyData.getVerificationclearTimeOut();
153                 this.dynamicLayoutMap = policyData.getDynamicLayoutMap();
154
155                 //FireWall
156                 this.fwPolicyType = policyData.getFwPolicyType();
157                 this.fwattributes = policyData.getFwattributes();
158                 this.parentForChild = policyData.getParentForChild();
159                 this.securityZone = policyData.getSecurityZone();
160
161                 //Action & Decision
162                 this.ruleCombiningAlgId = policyData.getRuleCombiningAlgId();
163                 this.dynamicFieldConfigAttributes = policyData.getDynamicFieldConfigAttributes();
164                 this.dynamicSettingsMap = policyData.getDynamicSettingsMap();
165                 this.dropDownMap = policyData.getDropDownMap();
166                 this.actionPerformer = policyData.getActionPerformer();
167                 this.actionAttribute = policyData.getActionAttribute();
168                 this.dynamicRuleAlgorithmLabels = policyData.getDynamicRuleAlgorithmLabels();
169                 this.dynamicRuleAlgorithmCombo = policyData.getDynamicRuleAlgorithmCombo();
170                 this.dynamicRuleAlgorithmField1 = policyData.getDynamicRuleAlgorithmField1();
171                 this.dynamicRuleAlgorithmField2 = policyData.getDynamicRuleAlgorithmField2();
172                 this.dynamicVariableList = policyData.getDynamicVariableList();
173                 this.dataTypeList = policyData.getDataTypeList();
174                 this.actionAttributeValue = policyData.getActionAttributeValue();
175                 this.ruleProvider = policyData.getRuleProvider();
176                 this.actionBody = policyData.getActionBody();
177                 this.actionDictHeader = policyData.getActionDictHeader();
178                 this.actionDictType = policyData.getActionDictType();
179                 this.actionDictUrl = policyData.getActionDictUrl();
180                 this.actionDictMethod = policyData.getActionDictMethod();
181         }
182         
183         public String getScope() {
184                 return scope;
185         }
186         public void setScope(String scope) {
187                 this.scope = scope;
188         }
189         public String getPolicyType() {
190                 return policyType;
191         }
192         public void setPolicyType(String policyType) {
193                 this.policyType = policyType;
194         }
195         public String getConfigPolicyType() {
196                 return configPolicyType;
197         }
198         public void setConfigPolicyType(String configPolicyType) {
199                 this.configPolicyType = configPolicyType;
200         }
201         public String getPolicyName() {
202                 return policyName;
203         }
204         public void setPolicyName(String policyName) {
205                 this.policyName = policyName;
206         }
207         public String getPolicyDescription() {
208                 return policyDescription;
209         }
210         public void setPolicyDescription(String policyDescription) {
211                 this.policyDescription = policyDescription;
212         }
213         public String getEcompName() {
214                 return ecompName;
215         }
216         public void setEcompName(String ecompName) {
217                 this.ecompName = ecompName;
218         }
219         public String getConfigName() {
220                 return configName;
221         }
222         public void setConfigName(String configName) {
223                 this.configName = configName;
224         }
225         public String getConfigType() {
226                 return configType;
227         }
228         public void setConfigType(String configType) {
229                 this.configType = configType;
230         }
231         public String getJsonBody() {
232                 return jsonBody;
233         }
234         public void setJsonBody(String jsonBody) {
235                 this.jsonBody = jsonBody;
236         }
237         public String getPolicyScope() {
238                 return policyScope;
239         }
240         public void setPolicyScope(String policyScope) {
241                 this.policyScope = policyScope;
242         }
243         public String getProviderComboBox() {
244                 return providerComboBox;
245         }
246         public void setProviderComboBox(String providerComboBox) {
247                 this.providerComboBox = providerComboBox;
248         }
249         public String getRiskType() {
250                 return riskType;
251         }
252         public void setRiskType(String riskType) {
253                 this.riskType = riskType;
254         }
255         public String getRiskLevel() {
256                 return riskLevel;
257         }
258         public void setRiskLevel(String riskLevel) {
259                 this.riskLevel = riskLevel;
260         }
261         public String getGuard() {
262                 return guard;
263         }
264         public void setGuard(String guard) {
265                 this.guard = guard;
266         }
267         public String getTtlDate() {
268                 return ttlDate;
269         }
270         public void setTtlDate(String ttlDate) {
271                 this.ttlDate = ttlDate;
272         }
273         public Map<String, String> getMatching() {
274                 return matching;
275         }
276         public void setMatching(Map<String, String> matching) {
277                 this.matching = matching;
278         }
279         public ArrayList<Object> getTriggerSignatures() {
280                 return triggerSignatures;
281         }
282         public void setTriggerSignatures(ArrayList<Object> triggerSignatures) {
283                 this.triggerSignatures = triggerSignatures;
284         }
285         public ArrayList<Object> getSymptomSignatures() {
286                 return symptomSignatures;
287         }
288         public void setSymptomSignatures(ArrayList<Object> symptomSignatures) {
289                 this.symptomSignatures = symptomSignatures;
290         }
291         public String getLogicalConnector() {
292                 return logicalConnector;
293         }
294         public void setLogicalConnector(String logicalConnector) {
295                 this.logicalConnector = logicalConnector;
296         }
297         public String getPolicyStatus() {
298                 return policyStatus;
299         }
300         public void setPolicyStatus(String policyStatus) {
301                 this.policyStatus = policyStatus;
302         }
303         public String getGocServerScope() {
304                 return gocServerScope;
305         }
306         public void setGocServerScope(String gocServerScope) {
307                 this.gocServerScope = gocServerScope;
308         }
309         public String getSupressionType() {
310                 return supressionType;
311         }
312         public void setSupressionType(String supressionType) {
313                 this.supressionType = supressionType;
314         }
315         public String getServiceType() {
316                 return serviceType;
317         }
318         public void setServiceType(String serviceType) {
319                 this.serviceType = serviceType;
320         }
321         public String getUuid() {
322                 return uuid;
323         }
324         public void setUuid(String uuid) {
325                 this.uuid = uuid;
326         }
327         public String getLocation() {
328                 return location;
329         }
330         public void setLocation(String location) {
331                 this.location = location;
332         }
333         public String getPriority() {
334                 return priority;
335         }
336         public void setPriority(String priority) {
337                 this.priority = priority;
338         }
339         public String getMsLocation() {
340                 return msLocation;
341         }
342         public void setMsLocation(String msLocation) {
343                 this.msLocation = msLocation;
344         }
345         public String getRuleName() {
346                 return ruleName;
347         }
348         public void setRuleName(String ruleName) {
349                 this.ruleName = ruleName;
350         }
351         public Map<String, String> getBrmsParamBody() {
352                 return brmsParamBody;
353         }
354         public void setBrmsParamBody(Map<String, String> brmsParamBody) {
355                 this.brmsParamBody = brmsParamBody;
356         }
357         public String getBrmsController() {
358                 return brmsController;
359         }
360         public void setBrmsController(String brmsController) {
361                 this.brmsController = brmsController;
362         }
363         public ArrayList<String> getBrmsDependency() {
364                 return brmsDependency;
365         }
366         public void setBrmsDependency(ArrayList<String> brmsDependency) {
367                 this.brmsDependency = brmsDependency;
368         }
369         public LinkedHashMap<?, ?> getRuleData() {
370                 return ruleData;
371         }
372         public void setRuleData(LinkedHashMap<?, ?> ruleData) {
373                 this.ruleData = ruleData;
374         }
375         public LinkedHashMap<?, ?> getRuleListData() {
376                 return ruleListData;
377         }
378         public void setRuleListData(LinkedHashMap<?, ?> ruleListData) {
379                 this.ruleListData = ruleListData;
380         }
381         public Map<String, String> getDrlRuleAndUIParams() {
382                 return drlRuleAndUIParams;
383         }
384         public void setDrlRuleAndUIParams(Map<String, String> drlRuleAndUIParams) {
385                 this.drlRuleAndUIParams = drlRuleAndUIParams;
386         }
387         public String getClearTimeOut() {
388                 return clearTimeOut;
389         }
390         public void setClearTimeOut(String clearTimeOut) {
391                 this.clearTimeOut = clearTimeOut;
392         }
393         public String getTrapMaxAge() {
394                 return trapMaxAge;
395         }
396         public void setTrapMaxAge(String trapMaxAge) {
397                 this.trapMaxAge = trapMaxAge;
398         }
399         public String getVerificationclearTimeOut() {
400                 return verificationclearTimeOut;
401         }
402         public void setVerificationclearTimeOut(String verificationclearTimeOut) {
403                 this.verificationclearTimeOut = verificationclearTimeOut;
404         }
405         public Map<String, String> getDynamicLayoutMap() {
406                 return dynamicLayoutMap;
407         }
408         public void setDynamicLayoutMap(Map<String, String> dynamicLayoutMap) {
409                 this.dynamicLayoutMap = dynamicLayoutMap;
410         }
411         public String getFwPolicyType() {
412                 return fwPolicyType;
413         }
414         public void setFwPolicyType(String fwPolicyType) {
415                 this.fwPolicyType = fwPolicyType;
416         }
417         public ArrayList<Object> getFwattributes() {
418                 return fwattributes;
419         }
420         public void setFwattributes(ArrayList<Object> fwattributes) {
421                 this.fwattributes = fwattributes;
422         }
423         public String getParentForChild() {
424                 return parentForChild;
425         }
426         public void setParentForChild(String parentForChild) {
427                 this.parentForChild = parentForChild;
428         }
429         public String getSecurityZone() {
430                 return securityZone;
431         }
432         public void setSecurityZone(String securityZone) {
433                 this.securityZone = securityZone;
434         }
435         public String getRuleCombiningAlgId() {
436                 return ruleCombiningAlgId;
437         }
438         public void setRuleCombiningAlgId(String ruleCombiningAlgId) {
439                 this.ruleCombiningAlgId = ruleCombiningAlgId;
440         }
441         public Map<String, String> getDynamicFieldConfigAttributes() {
442                 return dynamicFieldConfigAttributes;
443         }
444         public void setDynamicFieldConfigAttributes(Map<String, String> dynamicFieldConfigAttributes) {
445                 this.dynamicFieldConfigAttributes = dynamicFieldConfigAttributes;
446         }
447         public Map<String, String> getDynamicSettingsMap() {
448                 return dynamicSettingsMap;
449         }
450         public void setDynamicSettingsMap(Map<String, String> dynamicSettingsMap) {
451                 this.dynamicSettingsMap = dynamicSettingsMap;
452         }
453         public Map<String, String> getDropDownMap() {
454                 return dropDownMap;
455         }
456         public void setDropDownMap(Map<String, String> dropDownMap) {
457                 this.dropDownMap = dropDownMap;
458         }
459         public String getActionPerformer() {
460                 return actionPerformer;
461         }
462         public void setActionPerformer(String actionPerformer) {
463                 this.actionPerformer = actionPerformer;
464         }
465         public String getActionAttribute() {
466                 return actionAttribute;
467         }
468         public void setActionAttribute(String actionAttribute) {
469                 this.actionAttribute = actionAttribute;
470         }
471         public List<String> getDynamicRuleAlgorithmLabels() {
472                 return dynamicRuleAlgorithmLabels;
473         }
474         public void setDynamicRuleAlgorithmLabels(List<String> dynamicRuleAlgorithmLabels) {
475                 this.dynamicRuleAlgorithmLabels = dynamicRuleAlgorithmLabels;
476         }
477         public List<String> getDynamicRuleAlgorithmCombo() {
478                 return dynamicRuleAlgorithmCombo;
479         }
480         public void setDynamicRuleAlgorithmCombo(List<String> dynamicRuleAlgorithmCombo) {
481                 this.dynamicRuleAlgorithmCombo = dynamicRuleAlgorithmCombo;
482         }
483         public List<String> getDynamicRuleAlgorithmField1() {
484                 return dynamicRuleAlgorithmField1;
485         }
486         public void setDynamicRuleAlgorithmField1(List<String> dynamicRuleAlgorithmField1) {
487                 this.dynamicRuleAlgorithmField1 = dynamicRuleAlgorithmField1;
488         }
489         public List<String> getDynamicRuleAlgorithmField2() {
490                 return dynamicRuleAlgorithmField2;
491         }
492         public void setDynamicRuleAlgorithmField2(List<String> dynamicRuleAlgorithmField2) {
493                 this.dynamicRuleAlgorithmField2 = dynamicRuleAlgorithmField2;
494         }
495         public List<Object> getDynamicVariableList() {
496                 return dynamicVariableList;
497         }
498         public void setDynamicVariableList(List<Object> dynamicVariableList) {
499                 this.dynamicVariableList = dynamicVariableList;
500         }
501         public List<String> getDataTypeList() {
502                 return dataTypeList;
503         }
504         public void setDataTypeList(List<String> dataTypeList) {
505                 this.dataTypeList = dataTypeList;
506         }
507         public String getActionAttributeValue() {
508                 return actionAttributeValue;
509         }
510         public void setActionAttributeValue(String actionAttributeValue) {
511                 this.actionAttributeValue = actionAttributeValue;
512         }
513         public String getRuleProvider() {
514                 return ruleProvider;
515         }
516         public void setRuleProvider(String ruleProvider) {
517                 this.ruleProvider = ruleProvider;
518         }
519         public String getActionBody() {
520                 return actionBody;
521         }
522         public void setActionBody(String actionBody) {
523                 this.actionBody = actionBody;
524         }
525         public String getActionDictHeader() {
526                 return actionDictHeader;
527         }
528         public void setActionDictHeader(String actionDictHeader) {
529                 this.actionDictHeader = actionDictHeader;
530         }
531         public String getActionDictType() {
532                 return actionDictType;
533         }
534         public void setActionDictType(String actionDictType) {
535                 this.actionDictType = actionDictType;
536         }
537         public String getActionDictUrl() {
538                 return actionDictUrl;
539         }
540         public void setActionDictUrl(String actionDictUrl) {
541                 this.actionDictUrl = actionDictUrl;
542         }
543         public String getActionDictMethod() {
544                 return actionDictMethod;
545         }
546         public void setActionDictMethod(String actionDictMethod) {
547                 this.actionDictMethod = actionDictMethod;
548         }
549
550 }