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