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