Initial OpenECOMP policy/engine commit
[policy/engine.git] / ECOMP-PAP-REST / src / main / java / org / openecomp / policy / pap / xacml / rest / adapters / PolicyRestAdapter.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
21 package org.openecomp.policy.pap.xacml.rest.adapters;
22
23 import java.util.List;
24 import java.util.Map;
25
26 import javax.persistence.EntityManagerFactory;
27
28 //import org.openecomp.policy.pap.xacml.rest.model.GitRepositoryContainer;
29
30 public class PolicyRestAdapter {
31         
32         private Object data;
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;
86         private String guard;
87         private String riskLevel;
88         private String ttlDate;
89         
90
91         public Integer getHighestVersion() {
92                 return highestVersion;
93         }
94         public void setHighestVersion(Integer highestVersion) {
95                 this.highestVersion = highestVersion;
96         }
97         public Object getData() {
98                 return data;
99         }
100         public void setData(Object data) {
101                 this.data = data;
102         }
103         public String getPolicyName() {
104                 return policyName;
105         }
106         public void setPolicyName(String policyName) {
107                 this.policyName = policyName;
108         }
109         public String getConfigBodyData() {
110                 return configBodyData;
111         }
112         public void setConfigBodyData(String configBodyData) {
113                 this.configBodyData = configBodyData;
114         }
115         public String getConfigType() {
116                 return configType;
117         }
118         public void setConfigType(String configType) {
119                 this.configType = configType;
120         }
121         public String getPolicyID() {
122                 return policyID;
123         }
124         public void setPolicyID(String policyID) {
125                 this.policyID = policyID;
126         }
127         public String getPolicyType() {
128                 return policyType;
129         }
130         public void setPolicyType(String policyType) {
131                 this.policyType = policyType;
132         }
133         public String getPolicyDescription() {
134                 return policyDescription;
135         }
136         public void setPolicyDescription(String policyDescription) {
137                 this.policyDescription = policyDescription;
138         }
139         public String getEcompName() {
140                 return ecompName;
141         }
142         public void setEcompName(String ecompName) {
143                 this.ecompName = ecompName;
144         }
145         public String getConfigName() {
146                 return configName;
147         }
148         public void setConfigName(String configName) {
149                 this.configName = configName;
150         }
151         public String getRuleID() {
152                 return ruleID;
153         }
154         public void setRuleID(String ruleID) {
155                 this.ruleID = ruleID;
156         }
157         public String getRuleCombiningAlgId() {
158                 return ruleCombiningAlgId;
159         }
160         public void setRuleCombiningAlgId(String ruleCombiningAlgId) {
161                 this.ruleCombiningAlgId = ruleCombiningAlgId;
162         }
163         public Map<String,String> getDynamicFieldConfigAttributes() {
164                 return dynamicFieldConfigAttributes;
165         }
166         public void setDynamicFieldConfigAttributes(
167                         Map<String,String> dynamicFieldConfigAttributes) {
168                 this.dynamicFieldConfigAttributes = dynamicFieldConfigAttributes;
169         }
170         public String getParentPath() {
171                 return parentPath;
172         }
173         public void setParentPath(String parentPath) {
174                 this.parentPath = parentPath;
175         }
176         public boolean isEditPolicy() {
177                 return isEditPolicy;
178         }
179         public void setEditPolicy(boolean isEditPolicy) {
180                 this.isEditPolicy = isEditPolicy;
181         }
182         public boolean isViewPolicy() {
183                 return isViewPolicy;
184         }
185         public void setViewPolicy(boolean isViewPolicy) {
186                 this.isViewPolicy = isViewPolicy;
187         }
188         public Object getPolicyData() {
189                 return policyData;
190         }
191         public void setPolicyData(Object policyData) {
192                 this.policyData = policyData;
193         }
194         public boolean isReadOnly() {
195                 return readOnly;
196         }
197         public void setReadOnly(boolean readOnly) {
198                 this.readOnly = readOnly;
199         }
200         public String getUserGitPath() {
201                 return gitPath;
202         }
203         public void setUserGitPath(String gitPath) {
204                 this.gitPath = gitPath;
205         }
206         public boolean isValidData() {
207                 return isValidData;
208         }
209         public void setValidData(boolean isValidData) {
210                 this.isValidData = isValidData;
211         }
212         public String getAdminNotification() {
213                 return adminNotification;
214         }
215         public void setAdminNotification(String adminNotification) {
216                 this.adminNotification = adminNotification;
217         }
218         public String getConfigHome() {
219                 return configHome;
220         }
221         public void setConfigHome(String configHome) {
222                 this.configHome = configHome;
223         }
224         public String getConfigUrl() {
225                 return configUrl;
226         }
227         public void setConfigUrl(String configUrl) {
228                 this.configUrl = configUrl;
229         }
230         public String getFinalPolicyPath() {
231                 return finalPolicyPath;
232         }
233         public void setFinalPolicyPath(String finalPolicyPath) {
234                 this.finalPolicyPath = finalPolicyPath;
235         }
236         public String getVersion() {
237                 return version;
238         }
239         public void setVersion(String version) {
240                 this.version = version;
241         }
242         public String getJsonBody() {
243                 return jsonBody;
244         }
245         public void setJsonBody(String jsonBody) {
246                 this.jsonBody = jsonBody;
247         }
248         public String getPrevJsonBody() {
249                 return prevJsonBody;
250         }
251         public void setPrevJsonBody(String prevJsonBody) {
252                 this.prevJsonBody = prevJsonBody;
253         }
254         public String getApiflag() {
255                 return apiflag;
256         }
257         public void setApiflag(String apiflag) {
258                 this.apiflag = apiflag;
259         }
260         /**
261          * @return the actionPerformer
262          */
263         public String getActionPerformer() {
264                 return actionPerformer;
265         }
266         /**
267          * @param actionPerformer the actionPerformer to set
268          */
269         public void setActionPerformer(String actionPerformer) {
270                 this.actionPerformer = actionPerformer;
271         }
272         /**
273          * @return the actionAttribute
274          */
275         public String getActionAttribute() {
276                 return actionAttribute;
277         }
278         /**
279          * @param actionAttribute the actionAttribute to set
280          */
281         public void setActionAttribute(String actionAttribute) {
282                 this.actionAttribute = actionAttribute;
283         }
284         /**
285          * @return the dynamicRuleAlgorithmLabels
286          */
287         public List<String> getDynamicRuleAlgorithmLabels() {
288                 return dynamicRuleAlgorithmLabels;
289         }
290         /**
291          * @param dynamicRuleAlgorithmLabels the dynamicRuleAlgorithmLabels to set
292          */
293         public void setDynamicRuleAlgorithmLabels(
294                         List<String> dynamicRuleAlgorithmLabels) {
295                 this.dynamicRuleAlgorithmLabels = dynamicRuleAlgorithmLabels;
296         }
297         /**
298          * @return the dynamicRuleAlgorithmCombo
299          */
300         public List<String> getDynamicRuleAlgorithmCombo() {
301                 return dynamicRuleAlgorithmCombo;
302         }
303         /**
304          * @param dynamicRuleAlgorithmCombo the dynamicRuleAlgorithmCombo to set
305          */
306         public void setDynamicRuleAlgorithmCombo(List<String> dynamicRuleAlgorithmCombo) {
307                 this.dynamicRuleAlgorithmCombo = dynamicRuleAlgorithmCombo;
308         }
309         /**
310          * @return the dynamicRuleAlgorithmField1
311          */
312         public List<String> getDynamicRuleAlgorithmField1() {
313                 return dynamicRuleAlgorithmField1;
314         }
315         /**
316          * @param dynamicRuleAlgorithmField1 the dynamicRuleAlgorithmField1 to set
317          */
318         public void setDynamicRuleAlgorithmField1(
319                         List<String> dynamicRuleAlgorithmField1) {
320                 this.dynamicRuleAlgorithmField1 = dynamicRuleAlgorithmField1;
321         }
322         /**
323          * @return the dynamicRuleAlgorithmField2
324          */
325         public List<String> getDynamicRuleAlgorithmField2() {
326                 return dynamicRuleAlgorithmField2;
327         }
328         /**
329          * @param dynamicRuleAlgorithmField2 the dynamicRuleAlgorithmField2 to set
330          */
331         public void setDynamicRuleAlgorithmField2(
332                         List<String> dynamicRuleAlgorithmField2) {
333                 this.dynamicRuleAlgorithmField2 = dynamicRuleAlgorithmField2;
334         }
335         public Map<String,String> getDropDownMap() {
336                 return dropDownMap;
337         }
338         public void setDropDownMap(Map<String,String> dropDownMap) {
339                 this.dropDownMap = dropDownMap;
340         }
341 /*      public String getActionDictHeader() {
342                 return actionDictHeader;
343         }
344         public void setActionDictHeader(String actionDictHeader) {
345                 this.actionDictHeader = actionDictHeader;
346         }
347         public String getActionDictType() {
348                 return actionDictType;
349         }
350         public void setActionDictType(String actionDictType) {
351                 this.actionDictType = actionDictType;
352         }
353         public String getActionDictUrl() {
354                 return actionDictUrl;
355         }
356         public void setActionDictUrl(String actionDictUrl) {
357                 this.actionDictUrl = actionDictUrl;
358         }
359         public String getActionDictMethod() {
360                 return actionDictMethod;
361         }
362         public void setActionDictMethod(String actionDictMethod) {
363                 this.actionDictMethod = actionDictMethod;
364         }*/
365         public Map<String,String> getDynamicSettingsMap() {
366                 return dynamicSettingsMap;
367         }
368         public void setDynamicSettingsMap(Map<String,String> dynamicSettingsMap) {
369                 this.dynamicSettingsMap = dynamicSettingsMap;
370         }
371         public List<Object> getDynamicVariableList() {
372                 return dynamicVariableList;
373         }
374         public void setDynamicVariableList(List<Object> dynamicVariableList) {
375                 this.dynamicVariableList = dynamicVariableList;
376         }
377         public List<String> getDataTypeList() {
378                 return dataTypeList;
379         }
380         public void setDataTypeList(List<String> dataTypeList) {
381                 this.dataTypeList = dataTypeList;
382         }
383         public boolean isDraft() {
384                 return isDraft;
385         }
386         public void setDraft(boolean isDraft) {
387                 this.isDraft = isDraft;
388         }
389         public String getConfigPolicyType() {
390                 return configPolicyType;
391         }
392         public void setConfigPolicyType(String configPolicyType) {
393                 this.configPolicyType = configPolicyType;
394         }
395         public String getServiceType() {
396                 return serviceType;
397         }
398         public void setServiceType(String serviceType) {
399                 this.serviceType = serviceType;
400         }
401         public String getUuid() {
402                 return uuid;
403         }
404         public void setUuid(String uuid) {
405                 this.uuid = uuid;
406         }
407         public String getLocation() {
408                 return location;
409         }
410         public void setLocation(String location) {
411                 this.location = location;
412         }
413     public String getPriority() {
414         return priority;
415     }
416     public void setPriority(String priority) {
417         this.priority = priority;
418     }
419         public Map<String, String> getBrmsParamBody() {
420                 return brmsParamBody;
421         }
422         public void setBrmsParamBody(Map<String, String> brmsParamBody) {
423                 this.brmsParamBody = brmsParamBody;
424         }
425         public EntityManagerFactory getEntityManagerFactory() {
426                 return entityManagerFactory;
427         }
428         public void setEntityManagerFactory(EntityManagerFactory entityManagerFactory) {
429                 this.entityManagerFactory = entityManagerFactory;
430         }
431         /**
432          * @return the policyExists
433          */
434         public Boolean getPolicyExists() {
435                 return policyExists;
436         }
437         /**
438          * @param policyExists the policyExists to set
439          */
440         public void setPolicyExists(Boolean policyExists) {
441                 this.policyExists = policyExists;
442         }
443         public String getPolicyScope() {
444                 return policyScope;
445         }
446         
447         public void setPolicyScope(String domainDir) {
448                 this. policyScope=domainDir;
449         }
450         public String getProviderComboBox() {
451                 return providerComboBox;
452         }
453         public void setProviderComboBox(String providerComboBox) {
454                 this.providerComboBox = providerComboBox;
455         }
456         public String getRiskType() {
457                 return riskType;
458         }
459         public void setRiskType(String riskType) {
460                 this.riskType = riskType;
461         }
462         public String getGuard() {
463                 return guard;
464         }
465         public void setGuard(String guard) {
466                 this.guard = guard;
467         }
468         public String getRiskLevel() {
469                 return riskLevel;
470         }
471         public void setRiskLevel(String riskLevel) {
472                 this.riskLevel = riskLevel;
473         }
474         public String getTtlDate() {
475                 return ttlDate;
476         }
477         public void setTtlDate(String ttlDate) {
478                 this.ttlDate = ttlDate;
479         }
480 }