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=========================================================
21 package org.openecomp.policy.pap.xacml.rest.adapters;
23 import java.util.List;
26 import javax.persistence.EntityManagerFactory;
28 //import org.openecomp.policy.pap.xacml.rest.model.GitRepositoryContainer;
30 public class PolicyRestAdapter {
33 private String policyName = null;
34 private String configBodyData = null;
35 private String configType = null;
36 private String policyID = null;
37 private String policyType = null;
38 private String configPolicyType = null;
39 private String policyDescription = null;
40 private String ecompName = null;
41 private String configName = null;
42 private String ruleID = null;
43 private String ruleCombiningAlgId = null;
44 private Map<String,String> dynamicFieldConfigAttributes;
45 private Map<String,String> dynamicSettingsMap;
46 private Map<String,String> dropDownMap;
47 private String actionPerformer = null;
48 private String actionAttribute = null;
49 private List<String> dynamicRuleAlgorithmLabels;
50 private List<String> dynamicRuleAlgorithmCombo;
51 private List<String> dynamicRuleAlgorithmField1;
52 private List<String> dynamicRuleAlgorithmField2;
53 private List<Object> dynamicVariableList;
54 private List<String> dataTypeList;
55 private String parentPath;
56 private boolean isValidData = false;
57 private String adminNotification = null;
58 private boolean isEditPolicy = false;
59 private boolean isViewPolicy = false;
60 private boolean isDraft = false;
61 private Object policyData = null;
62 private String gitPath;
63 private boolean readOnly;
64 private String configHome;
65 private String configUrl;
66 private String finalPolicyPath;
67 private String version;
68 private String jsonBody;
69 private String apiflag;
70 private String prevJsonBody;
71 private Integer highestVersion;
72 // private String actionDictHeader = null;
73 // private String actionDictType = null;
74 // private String actionDictUrl = null;
75 // private String actionDictMethod = null;
76 private String serviceType = null;
77 private String uuid = null;
78 private String location = null;
79 private String priority = null;
80 private Map<String,String> brmsParamBody=null;
81 private EntityManagerFactory entityManagerFactory = null;
82 private Boolean policyExists = false;
83 private String policyScope;
84 private String providerComboBox = null;
85 private String riskType;
87 private String riskLevel;
88 private String ttlDate;
91 public Integer getHighestVersion() {
92 return highestVersion;
94 public void setHighestVersion(Integer highestVersion) {
95 this.highestVersion = highestVersion;
97 public Object getData() {
100 public void setData(Object data) {
103 public String getPolicyName() {
106 public void setPolicyName(String policyName) {
107 this.policyName = policyName;
109 public String getConfigBodyData() {
110 return configBodyData;
112 public void setConfigBodyData(String configBodyData) {
113 this.configBodyData = configBodyData;
115 public String getConfigType() {
118 public void setConfigType(String configType) {
119 this.configType = configType;
121 public String getPolicyID() {
124 public void setPolicyID(String policyID) {
125 this.policyID = policyID;
127 public String getPolicyType() {
130 public void setPolicyType(String policyType) {
131 this.policyType = policyType;
133 public String getPolicyDescription() {
134 return policyDescription;
136 public void setPolicyDescription(String policyDescription) {
137 this.policyDescription = policyDescription;
139 public String getEcompName() {
142 public void setEcompName(String ecompName) {
143 this.ecompName = ecompName;
145 public String getConfigName() {
148 public void setConfigName(String configName) {
149 this.configName = configName;
151 public String getRuleID() {
154 public void setRuleID(String ruleID) {
155 this.ruleID = ruleID;
157 public String getRuleCombiningAlgId() {
158 return ruleCombiningAlgId;
160 public void setRuleCombiningAlgId(String ruleCombiningAlgId) {
161 this.ruleCombiningAlgId = ruleCombiningAlgId;
163 public Map<String,String> getDynamicFieldConfigAttributes() {
164 return dynamicFieldConfigAttributes;
166 public void setDynamicFieldConfigAttributes(
167 Map<String,String> dynamicFieldConfigAttributes) {
168 this.dynamicFieldConfigAttributes = dynamicFieldConfigAttributes;
170 public String getParentPath() {
173 public void setParentPath(String parentPath) {
174 this.parentPath = parentPath;
176 public boolean isEditPolicy() {
179 public void setEditPolicy(boolean isEditPolicy) {
180 this.isEditPolicy = isEditPolicy;
182 public boolean isViewPolicy() {
185 public void setViewPolicy(boolean isViewPolicy) {
186 this.isViewPolicy = isViewPolicy;
188 public Object getPolicyData() {
191 public void setPolicyData(Object policyData) {
192 this.policyData = policyData;
194 public boolean isReadOnly() {
197 public void setReadOnly(boolean readOnly) {
198 this.readOnly = readOnly;
200 public String getUserGitPath() {
203 public void setUserGitPath(String gitPath) {
204 this.gitPath = gitPath;
206 public boolean isValidData() {
209 public void setValidData(boolean isValidData) {
210 this.isValidData = isValidData;
212 public String getAdminNotification() {
213 return adminNotification;
215 public void setAdminNotification(String adminNotification) {
216 this.adminNotification = adminNotification;
218 public String getConfigHome() {
221 public void setConfigHome(String configHome) {
222 this.configHome = configHome;
224 public String getConfigUrl() {
227 public void setConfigUrl(String configUrl) {
228 this.configUrl = configUrl;
230 public String getFinalPolicyPath() {
231 return finalPolicyPath;
233 public void setFinalPolicyPath(String finalPolicyPath) {
234 this.finalPolicyPath = finalPolicyPath;
236 public String getVersion() {
239 public void setVersion(String version) {
240 this.version = version;
242 public String getJsonBody() {
245 public void setJsonBody(String jsonBody) {
246 this.jsonBody = jsonBody;
248 public String getPrevJsonBody() {
251 public void setPrevJsonBody(String prevJsonBody) {
252 this.prevJsonBody = prevJsonBody;
254 public String getApiflag() {
257 public void setApiflag(String apiflag) {
258 this.apiflag = apiflag;
261 * @return the actionPerformer
263 public String getActionPerformer() {
264 return actionPerformer;
267 * @param actionPerformer the actionPerformer to set
269 public void setActionPerformer(String actionPerformer) {
270 this.actionPerformer = actionPerformer;
273 * @return the actionAttribute
275 public String getActionAttribute() {
276 return actionAttribute;
279 * @param actionAttribute the actionAttribute to set
281 public void setActionAttribute(String actionAttribute) {
282 this.actionAttribute = actionAttribute;
285 * @return the dynamicRuleAlgorithmLabels
287 public List<String> getDynamicRuleAlgorithmLabels() {
288 return dynamicRuleAlgorithmLabels;
291 * @param dynamicRuleAlgorithmLabels the dynamicRuleAlgorithmLabels to set
293 public void setDynamicRuleAlgorithmLabels(
294 List<String> dynamicRuleAlgorithmLabels) {
295 this.dynamicRuleAlgorithmLabels = dynamicRuleAlgorithmLabels;
298 * @return the dynamicRuleAlgorithmCombo
300 public List<String> getDynamicRuleAlgorithmCombo() {
301 return dynamicRuleAlgorithmCombo;
304 * @param dynamicRuleAlgorithmCombo the dynamicRuleAlgorithmCombo to set
306 public void setDynamicRuleAlgorithmCombo(List<String> dynamicRuleAlgorithmCombo) {
307 this.dynamicRuleAlgorithmCombo = dynamicRuleAlgorithmCombo;
310 * @return the dynamicRuleAlgorithmField1
312 public List<String> getDynamicRuleAlgorithmField1() {
313 return dynamicRuleAlgorithmField1;
316 * @param dynamicRuleAlgorithmField1 the dynamicRuleAlgorithmField1 to set
318 public void setDynamicRuleAlgorithmField1(
319 List<String> dynamicRuleAlgorithmField1) {
320 this.dynamicRuleAlgorithmField1 = dynamicRuleAlgorithmField1;
323 * @return the dynamicRuleAlgorithmField2
325 public List<String> getDynamicRuleAlgorithmField2() {
326 return dynamicRuleAlgorithmField2;
329 * @param dynamicRuleAlgorithmField2 the dynamicRuleAlgorithmField2 to set
331 public void setDynamicRuleAlgorithmField2(
332 List<String> dynamicRuleAlgorithmField2) {
333 this.dynamicRuleAlgorithmField2 = dynamicRuleAlgorithmField2;
335 public Map<String,String> getDropDownMap() {
338 public void setDropDownMap(Map<String,String> dropDownMap) {
339 this.dropDownMap = dropDownMap;
341 /* public String getActionDictHeader() {
342 return actionDictHeader;
344 public void setActionDictHeader(String actionDictHeader) {
345 this.actionDictHeader = actionDictHeader;
347 public String getActionDictType() {
348 return actionDictType;
350 public void setActionDictType(String actionDictType) {
351 this.actionDictType = actionDictType;
353 public String getActionDictUrl() {
354 return actionDictUrl;
356 public void setActionDictUrl(String actionDictUrl) {
357 this.actionDictUrl = actionDictUrl;
359 public String getActionDictMethod() {
360 return actionDictMethod;
362 public void setActionDictMethod(String actionDictMethod) {
363 this.actionDictMethod = actionDictMethod;
365 public Map<String,String> getDynamicSettingsMap() {
366 return dynamicSettingsMap;
368 public void setDynamicSettingsMap(Map<String,String> dynamicSettingsMap) {
369 this.dynamicSettingsMap = dynamicSettingsMap;
371 public List<Object> getDynamicVariableList() {
372 return dynamicVariableList;
374 public void setDynamicVariableList(List<Object> dynamicVariableList) {
375 this.dynamicVariableList = dynamicVariableList;
377 public List<String> getDataTypeList() {
380 public void setDataTypeList(List<String> dataTypeList) {
381 this.dataTypeList = dataTypeList;
383 public boolean isDraft() {
386 public void setDraft(boolean isDraft) {
387 this.isDraft = isDraft;
389 public String getConfigPolicyType() {
390 return configPolicyType;
392 public void setConfigPolicyType(String configPolicyType) {
393 this.configPolicyType = configPolicyType;
395 public String getServiceType() {
398 public void setServiceType(String serviceType) {
399 this.serviceType = serviceType;
401 public String getUuid() {
404 public void setUuid(String uuid) {
407 public String getLocation() {
410 public void setLocation(String location) {
411 this.location = location;
413 public String getPriority() {
416 public void setPriority(String priority) {
417 this.priority = priority;
419 public Map<String, String> getBrmsParamBody() {
420 return brmsParamBody;
422 public void setBrmsParamBody(Map<String, String> brmsParamBody) {
423 this.brmsParamBody = brmsParamBody;
425 public EntityManagerFactory getEntityManagerFactory() {
426 return entityManagerFactory;
428 public void setEntityManagerFactory(EntityManagerFactory entityManagerFactory) {
429 this.entityManagerFactory = entityManagerFactory;
432 * @return the policyExists
434 public Boolean getPolicyExists() {
438 * @param policyExists the policyExists to set
440 public void setPolicyExists(Boolean policyExists) {
441 this.policyExists = policyExists;
443 public String getPolicyScope() {
447 public void setPolicyScope(String domainDir) {
448 this. policyScope=domainDir;
450 public String getProviderComboBox() {
451 return providerComboBox;
453 public void setProviderComboBox(String providerComboBox) {
454 this.providerComboBox = providerComboBox;
456 public String getRiskType() {
459 public void setRiskType(String riskType) {
460 this.riskType = riskType;
462 public String getGuard() {
465 public void setGuard(String guard) {
468 public String getRiskLevel() {
471 public void setRiskLevel(String riskLevel) {
472 this.riskLevel = riskLevel;
474 public String getTtlDate() {
477 public void setTtlDate(String ttlDate) {
478 this.ttlDate = ttlDate;