2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 package org.openecomp.policy.pap.xacml.rest.elk.client;
22 import java.util.ArrayList;
23 import java.util.LinkedHashMap;
24 import java.util.List;
27 import org.openecomp.policy.rest.adapter.PolicyRestAdapter;
28 import org.openecomp.policy.rest.adapter.YAMLParams;
30 public class PolicyElasticData {
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;
44 private LinkedHashMap<?, ?> serviceTypePolicyName;
45 private LinkedHashMap<?, ?> verticaMetrics;
46 private LinkedHashMap<?, ?> description;
47 private LinkedHashMap<?, ?> attributeFields;
50 private String policyScope;
51 private String providerComboBox;
52 private String riskType;
53 private String riskLevel;
55 private String ttlDate;
56 private Map<String,String> matching;
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;
66 private String serviceType;
68 private String location;
69 private String priority;
70 private String msLocation;
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;
82 private String clearTimeOut;
83 private String trapMaxAge;
84 private String verificationclearTimeOut;
85 public Map<String , String> dynamicLayoutMap;
88 private String fwPolicyType;
89 private ArrayList<Object> fwattributes;
90 private String parentForChild;
91 private String securityZone;
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;
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 if(configPolicyType.startsWith("ClosedLoop")){
127 this.jsonBodyData = jsonBody;
129 this.jsonBodyData = policyData.getJsonBodyData();
132 this.serviceTypePolicyName = policyData.getServiceTypePolicyName();
133 this.verticaMetrics = policyData.getVerticaMetrics();
134 this.description = policyData.getDescription();
135 this.attributeFields = policyData.getAttributeFields();
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();
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();
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();
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();
170 this.clearTimeOut = policyData.getClearTimeOut();
171 this.trapMaxAge = policyData.getTrapMaxAge();
172 this.verificationclearTimeOut = policyData.getVerificationclearTimeOut();
173 this.dynamicLayoutMap = policyData.getDynamicLayoutMap();
176 this.fwPolicyType = policyData.getFwPolicyType();
177 this.fwattributes = policyData.getFwattributes();
178 this.parentForChild = policyData.getParentForChild();
179 this.securityZone = policyData.getSecurityZone();
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();
204 public String getScope() {
207 public void setScope(String scope) {
210 public String getPolicyType() {
213 public void setPolicyType(String policyType) {
214 this.policyType = policyType;
216 public String getConfigPolicyType() {
217 return configPolicyType;
219 public void setConfigPolicyType(String configPolicyType) {
220 this.configPolicyType = configPolicyType;
222 public String getConfigBodyData() {
223 return configBodyData;
226 public void setConfigBodyData(String configBodyData) {
227 this.configBodyData = configBodyData;
229 public String getPolicyName() {
232 public void setPolicyName(String policyName) {
233 this.policyName = policyName;
235 public String getPolicyDescription() {
236 return policyDescription;
238 public void setPolicyDescription(String policyDescription) {
239 this.policyDescription = policyDescription;
241 public String getEcompName() {
244 public void setEcompName(String ecompName) {
245 this.ecompName = ecompName;
247 public String getConfigName() {
250 public void setConfigName(String configName) {
251 this.configName = configName;
253 public String getConfigType() {
256 public void setConfigType(String configType) {
257 this.configType = configType;
259 public String getJsonBody() {
262 public void setJsonBody(String jsonBody) {
263 this.jsonBody = jsonBody;
265 public LinkedHashMap<?, ?> getServiceTypePolicyName() {
266 return serviceTypePolicyName;
269 public void setServiceTypePolicyName(LinkedHashMap<?, ?> serviceTypePolicyName) {
270 this.serviceTypePolicyName = serviceTypePolicyName;
273 public LinkedHashMap<?, ?> getVerticaMetrics() {
274 return verticaMetrics;
277 public void setVerticaMetrics(LinkedHashMap<?, ?> verticaMetrics) {
278 this.verticaMetrics = verticaMetrics;
281 public LinkedHashMap<?, ?> getDescription() {
285 public void setDescription(LinkedHashMap<?, ?> description) {
286 this.description = description;
289 public LinkedHashMap<?, ?> getAttributeFields() {
290 return attributeFields;
293 public void setAttributeFields(LinkedHashMap<?, ?> attributeFields) {
294 this.attributeFields = attributeFields;
296 public String getPolicyScope() {
299 public void setPolicyScope(String policyScope) {
300 this.policyScope = policyScope;
302 public String getProviderComboBox() {
303 return providerComboBox;
305 public void setProviderComboBox(String providerComboBox) {
306 this.providerComboBox = providerComboBox;
308 public String getRiskType() {
311 public void setRiskType(String riskType) {
312 this.riskType = riskType;
314 public String getRiskLevel() {
317 public void setRiskLevel(String riskLevel) {
318 this.riskLevel = riskLevel;
320 public String getGuard() {
323 public void setGuard(String guard) {
326 public String getTtlDate() {
329 public void setTtlDate(String ttlDate) {
330 this.ttlDate = ttlDate;
332 public Map<String, String> getMatching() {
335 public void setMatching(Map<String, String> matching) {
336 this.matching = matching;
338 public ArrayList<Object> getTriggerSignatures() {
339 return triggerSignatures;
341 public void setTriggerSignatures(ArrayList<Object> triggerSignatures) {
342 this.triggerSignatures = triggerSignatures;
344 public ArrayList<Object> getSymptomSignatures() {
345 return symptomSignatures;
347 public void setSymptomSignatures(ArrayList<Object> symptomSignatures) {
348 this.symptomSignatures = symptomSignatures;
350 public String getLogicalConnector() {
351 return logicalConnector;
353 public void setLogicalConnector(String logicalConnector) {
354 this.logicalConnector = logicalConnector;
356 public String getPolicyStatus() {
359 public void setPolicyStatus(String policyStatus) {
360 this.policyStatus = policyStatus;
362 public String getGocServerScope() {
363 return gocServerScope;
365 public void setGocServerScope(String gocServerScope) {
366 this.gocServerScope = gocServerScope;
368 public String getSupressionType() {
369 return supressionType;
371 public void setSupressionType(String supressionType) {
372 this.supressionType = supressionType;
374 public String getServiceType() {
377 public void setServiceType(String serviceType) {
378 this.serviceType = serviceType;
380 public String getUuid() {
383 public void setUuid(String uuid) {
386 public String getLocation() {
389 public void setLocation(String location) {
390 this.location = location;
392 public String getPriority() {
395 public void setPriority(String priority) {
396 this.priority = priority;
398 public String getMsLocation() {
401 public void setMsLocation(String msLocation) {
402 this.msLocation = msLocation;
404 public String getRuleName() {
407 public void setRuleName(String ruleName) {
408 this.ruleName = ruleName;
410 public Map<String, String> getBrmsParamBody() {
411 return brmsParamBody;
413 public void setBrmsParamBody(Map<String, String> brmsParamBody) {
414 this.brmsParamBody = brmsParamBody;
416 public String getBrmsController() {
417 return brmsController;
419 public void setBrmsController(String brmsController) {
420 this.brmsController = brmsController;
422 public ArrayList<String> getBrmsDependency() {
423 return brmsDependency;
425 public void setBrmsDependency(ArrayList<String> brmsDependency) {
426 this.brmsDependency = brmsDependency;
428 public LinkedHashMap<?, ?> getRuleData() {
431 public void setRuleData(LinkedHashMap<?, ?> ruleData) {
432 this.ruleData = ruleData;
434 public LinkedHashMap<?, ?> getRuleListData() {
437 public void setRuleListData(LinkedHashMap<?, ?> ruleListData) {
438 this.ruleListData = ruleListData;
440 public Map<String, String> getDrlRuleAndUIParams() {
441 return drlRuleAndUIParams;
443 public void setDrlRuleAndUIParams(Map<String, String> drlRuleAndUIParams) {
444 this.drlRuleAndUIParams = drlRuleAndUIParams;
446 public String getClearTimeOut() {
449 public void setClearTimeOut(String clearTimeOut) {
450 this.clearTimeOut = clearTimeOut;
452 public String getTrapMaxAge() {
455 public void setTrapMaxAge(String trapMaxAge) {
456 this.trapMaxAge = trapMaxAge;
458 public String getVerificationclearTimeOut() {
459 return verificationclearTimeOut;
461 public void setVerificationclearTimeOut(String verificationclearTimeOut) {
462 this.verificationclearTimeOut = verificationclearTimeOut;
464 public Map<String, String> getDynamicLayoutMap() {
465 return dynamicLayoutMap;
467 public void setDynamicLayoutMap(Map<String, String> dynamicLayoutMap) {
468 this.dynamicLayoutMap = dynamicLayoutMap;
470 public String getFwPolicyType() {
473 public void setFwPolicyType(String fwPolicyType) {
474 this.fwPolicyType = fwPolicyType;
476 public ArrayList<Object> getFwattributes() {
479 public void setFwattributes(ArrayList<Object> fwattributes) {
480 this.fwattributes = fwattributes;
482 public String getParentForChild() {
483 return parentForChild;
485 public void setParentForChild(String parentForChild) {
486 this.parentForChild = parentForChild;
488 public String getSecurityZone() {
491 public void setSecurityZone(String securityZone) {
492 this.securityZone = securityZone;
494 public String getRuleCombiningAlgId() {
495 return ruleCombiningAlgId;
497 public void setRuleCombiningAlgId(String ruleCombiningAlgId) {
498 this.ruleCombiningAlgId = ruleCombiningAlgId;
500 public Map<String, String> getDynamicFieldConfigAttributes() {
501 return dynamicFieldConfigAttributes;
503 public void setDynamicFieldConfigAttributes(Map<String, String> dynamicFieldConfigAttributes) {
504 this.dynamicFieldConfigAttributes = dynamicFieldConfigAttributes;
506 public Map<String, String> getDynamicSettingsMap() {
507 return dynamicSettingsMap;
509 public void setDynamicSettingsMap(Map<String, String> dynamicSettingsMap) {
510 this.dynamicSettingsMap = dynamicSettingsMap;
512 public Map<String, String> getDropDownMap() {
515 public void setDropDownMap(Map<String, String> dropDownMap) {
516 this.dropDownMap = dropDownMap;
518 public String getActionPerformer() {
519 return actionPerformer;
521 public void setActionPerformer(String actionPerformer) {
522 this.actionPerformer = actionPerformer;
524 public String getActionAttribute() {
525 return actionAttribute;
527 public void setActionAttribute(String actionAttribute) {
528 this.actionAttribute = actionAttribute;
530 public List<String> getDynamicRuleAlgorithmLabels() {
531 return dynamicRuleAlgorithmLabels;
533 public void setDynamicRuleAlgorithmLabels(List<String> dynamicRuleAlgorithmLabels) {
534 this.dynamicRuleAlgorithmLabels = dynamicRuleAlgorithmLabels;
536 public List<String> getDynamicRuleAlgorithmCombo() {
537 return dynamicRuleAlgorithmCombo;
539 public void setDynamicRuleAlgorithmCombo(List<String> dynamicRuleAlgorithmCombo) {
540 this.dynamicRuleAlgorithmCombo = dynamicRuleAlgorithmCombo;
542 public List<String> getDynamicRuleAlgorithmField1() {
543 return dynamicRuleAlgorithmField1;
545 public void setDynamicRuleAlgorithmField1(List<String> dynamicRuleAlgorithmField1) {
546 this.dynamicRuleAlgorithmField1 = dynamicRuleAlgorithmField1;
548 public List<String> getDynamicRuleAlgorithmField2() {
549 return dynamicRuleAlgorithmField2;
551 public void setDynamicRuleAlgorithmField2(List<String> dynamicRuleAlgorithmField2) {
552 this.dynamicRuleAlgorithmField2 = dynamicRuleAlgorithmField2;
554 public List<Object> getDynamicVariableList() {
555 return dynamicVariableList;
557 public void setDynamicVariableList(List<Object> dynamicVariableList) {
558 this.dynamicVariableList = dynamicVariableList;
560 public List<String> getDataTypeList() {
563 public void setDataTypeList(List<String> dataTypeList) {
564 this.dataTypeList = dataTypeList;
566 public String getActionAttributeValue() {
567 return actionAttributeValue;
569 public void setActionAttributeValue(String actionAttributeValue) {
570 this.actionAttributeValue = actionAttributeValue;
572 public String getRuleProvider() {
575 public void setRuleProvider(String ruleProvider) {
576 this.ruleProvider = ruleProvider;
578 public String getActionBody() {
581 public void setActionBody(String actionBody) {
582 this.actionBody = actionBody;
584 public String getActionDictHeader() {
585 return actionDictHeader;
587 public void setActionDictHeader(String actionDictHeader) {
588 this.actionDictHeader = actionDictHeader;
590 public String getActionDictType() {
591 return actionDictType;
593 public void setActionDictType(String actionDictType) {
594 this.actionDictType = actionDictType;
596 public String getActionDictUrl() {
597 return actionDictUrl;
599 public void setActionDictUrl(String actionDictUrl) {
600 this.actionDictUrl = actionDictUrl;
602 public String getActionDictMethod() {
603 return actionDictMethod;
605 public void setActionDictMethod(String actionDictMethod) {
606 this.actionDictMethod = actionDictMethod;
608 public YAMLParams getYamlparams() {
612 public void setYamlparams(YAMLParams yamlparams) {
613 this.yamlparams = yamlparams;
616 public Object getJsonBodyData() {
620 public void setJsonBodyData(Object jsonBodyData) {
621 this.jsonBodyData = jsonBodyData;