Add fix for SQL injection.
[policy/engine.git] / POLICY-SDK-APP / src / main / java / org / onap / policy / controller / PolicyController.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
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.onap.policy.controller;
22
23
24 import java.io.File;
25 import java.io.FileInputStream;
26 import java.io.IOException;
27 import java.io.InputStream;
28 import java.util.ArrayList;
29 import java.util.HashMap;
30 import java.util.List;
31 import java.util.Map;
32 import java.util.Properties;
33
34 import javax.annotation.PostConstruct;
35 import javax.mail.MessagingException;
36 import javax.script.SimpleBindings;
37 import javax.servlet.http.HttpServletRequest;
38 import javax.servlet.http.HttpServletResponse;
39
40 import org.json.JSONObject;
41 import org.onap.policy.admin.PolicyNotificationMail;
42 import org.onap.policy.admin.RESTfulPAPEngine;
43 import org.onap.policy.model.PDPGroupContainer;
44 import org.onap.policy.rest.XACMLRestProperties;
45 import org.onap.policy.rest.XacmlAdminAuthorization;
46 import org.onap.policy.rest.dao.CommonClassDao;
47 import org.onap.policy.rest.jpa.Datatype;
48 import org.onap.policy.rest.jpa.FunctionDefinition;
49 import org.onap.policy.rest.jpa.PolicyEntity;
50 import org.onap.policy.rest.jpa.PolicyVersion;
51 import org.onap.policy.rest.jpa.UserInfo;
52 import org.openecomp.policy.model.Roles;
53 import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
54 import org.openecomp.portalsdk.core.web.support.JsonMessage;
55 import org.openecomp.portalsdk.core.web.support.UserUtils;
56 import org.springframework.beans.factory.annotation.Autowired;
57 import org.springframework.http.MediaType;
58 import org.springframework.stereotype.Controller;
59 import org.springframework.web.bind.annotation.RequestMapping;
60 import org.springframework.web.bind.annotation.RequestMethod;
61 import org.springframework.web.servlet.ModelAndView;
62
63 import org.onap.policy.xacml.api.XACMLErrorConstants;
64 import org.onap.policy.xacml.api.pap.PAPPolicyEngine;
65
66 import com.att.research.xacml.util.XACMLProperties;
67 import com.fasterxml.jackson.databind.ObjectMapper;
68
69 import org.onap.policy.common.logging.flexlogger.FlexLogger;
70 import org.onap.policy.common.logging.flexlogger.Logger;
71
72
73 @Controller
74 @RequestMapping("/")
75 public class PolicyController extends RestrictedBaseController {
76         private static final Logger     policyLogger    = FlexLogger.getLogger(PolicyController.class);
77
78         private static CommonClassDao commonClassDao;
79
80         // Our authorization object
81         //
82         XacmlAdminAuthorization authorizer = new XacmlAdminAuthorization();
83         //
84         // The PAP Engine
85         //
86         private static PAPPolicyEngine papEngine;
87
88         private static String logTableLimit;
89         private static String systemAlertTableLimit;
90         protected static Map<String, String> dropDownMap = new HashMap<>();
91         public static Map<String, String> getDropDownMap() {
92                 return dropDownMap;
93         }
94
95         public static void setDropDownMap(Map<String, String> dropDownMap) {
96                 PolicyController.dropDownMap = dropDownMap;
97         }
98
99         public static String getDomain() {
100                 return XACMLProperties.getProperty(XACMLRestProperties.PROP_ADMIN_DOMAIN, "urn");
101         }
102
103         private static final Object mapAccess = new Object();
104         private static Map<Datatype, List<FunctionDefinition>> mapDatatype2Function = null;
105         private static Map<String, FunctionDefinition> mapID2Function = null;
106
107         //Constant variables used across Policy-sdk
108         private static final String policyData = "policyData";
109         private static final String characterEncoding = "UTF-8";
110         private static final String contentType = "application/json";
111         private static final String file = "file";
112
113         //Smtp Java Mail Properties
114         private static String smtpHost = null;
115         private static String smtpPort = null;
116         private static String smtpUsername = null;
117         private static String smtpPassword = null;
118         private static String smtpApplicationName = null;
119         private static String smtpEmailExtension = null;
120         //log db Properties
121         private static String logdbDriver = null;
122         private static String logdbUrl = null;
123         private static String logdbUserName = null;
124         private static String logdbPassword = null;
125         private static String logdbDialect = null;
126         //Xacml db properties
127         private static String xacmldbUrl = null;
128         private static String xacmldbUserName = null;
129         private static String xacmldbPassword = null;
130
131         //AutoPush feature.
132         private static String autoPushAvailable;
133         private static String autoPushDSClosedLoop;
134         private static String autoPushDSFirewall;
135         private static String autoPushDSMicroservice;
136         private static String autoPushPDPGroup;
137
138         //papURL
139         private static String papUrl;
140
141         //MicroService Model Properties
142         private static String msOnapName;
143         private static String msPolicyName;
144
145         //WebApp directories
146         private static String configHome;
147         private static String actionHome;
148
149         @Autowired
150         private PolicyController(CommonClassDao commonClassDao){
151                 PolicyController.commonClassDao = commonClassDao;
152         }
153
154         public PolicyController() {
155         }
156
157         @PostConstruct
158         public void init(){
159                 Properties prop = new Properties();
160                 InputStream input = null;
161                 try {
162                         input = new FileInputStream("xacml.admin.properties");
163                         // load a properties file
164                         prop.load(input);
165                         //pap url
166                         setPapUrl(prop.getProperty("xacml.rest.pap.url"));
167                         // get the property values
168                         setSmtpHost(prop.getProperty("onap.smtp.host"));
169                         setSmtpPort(prop.getProperty("onap.smtp.port"));
170                         setSmtpUsername(prop.getProperty("onap.smtp.userName"));
171                         setSmtpPassword(prop.getProperty("onap.smtp.password"));
172                         setSmtpApplicationName(prop.getProperty("onap.application.name"));
173                         setSmtpEmailExtension(prop.getProperty("onap.smtp.emailExtension"));
174                         //Log Database Properties
175                         setLogdbDriver(prop.getProperty("xacml.log.db.driver"));
176                         setLogdbUrl(prop.getProperty("xacml.log.db.url"));
177                         setLogdbUserName(prop.getProperty("xacml.log.db.user"));
178                         setLogdbPassword(prop.getProperty("xacml.log.db.password"));
179                         setLogdbDialect(prop.getProperty("onap.dialect"));
180                         //Xacml Database Properties
181                         setXacmldbUrl(prop.getProperty("javax.persistence.jdbc.url"));
182                         setXacmldbUserName(prop.getProperty("javax.persistence.jdbc.user"));
183                         setXacmldbPassword(prop.getProperty("javax.persistence.jdbc.password"));
184                         //AutoPuh
185                         setAutoPushAvailable(prop.getProperty("xacml.automatic.push"));
186                         setAutoPushDSClosedLoop(prop.getProperty("xacml.autopush.closedloop"));
187                         setAutoPushDSFirewall(prop.getProperty("xacml.autopush.firewall"));
188                         setAutoPushDSMicroservice(prop.getProperty("xacml.autopush.microservice"));
189                         setAutoPushPDPGroup(prop.getProperty("xacml.autopush.pdpGroup"));
190                         //Micro Service Properties
191                         setMsOnapName(prop.getProperty("xacml.policy.msOnapName"));
192                         setMsPolicyName(prop.getProperty("xacml.policy.msPolicyName"));
193                         //WebApp directories
194                         setConfigHome(prop.getProperty("xacml.rest.config.webapps") + "Config");
195                         setActionHome(prop.getProperty("xacml.rest.config.webapps") + "Action");
196                         //Get the Property Values for Dashboard tab Limit
197                         try{
198                                 setLogTableLimit(prop.getProperty("xacml.onap.dashboard.logTableLimit"));
199                                 setSystemAlertTableLimit(prop.getProperty("xacml.onap.dashboard.systemAlertTableLimit"));
200                         }catch(Exception e){
201                                 policyLogger.error(XACMLErrorConstants.ERROR_DATA_ISSUE+"Dashboard tab Property fields are missing" +e);
202                                 setLogTableLimit("5000");
203                                 setSystemAlertTableLimit("2000");
204                         }
205                         System.setProperty(XACMLProperties.XACML_PROPERTIES_NAME, "xacml.admin.properties");
206                 } catch (IOException ex) {
207                         policyLogger.error(XACMLErrorConstants.ERROR_DATA_ISSUE+"Exception Occured while reading the Smtp properties from xacml.admin.properties file" +ex);
208                 } finally {
209                         if (input != null) {
210                                 try {
211                                         input.close();
212                                 } catch (IOException e) {
213                                         policyLogger.error(XACMLErrorConstants.ERROR_DATA_ISSUE+"Exception Occured while Closing the xacml.admin.properties file" +e);
214                                 }
215                         }
216                 }
217
218                 //Initialize the FunctionDefinition table at Server Start up
219                 Map<Datatype, List<FunctionDefinition>> functionMap = getFunctionDatatypeMap();
220                 for (Datatype id : functionMap.keySet()) {
221                         List<FunctionDefinition> functionDefinations = functionMap.get(id);
222                         for (FunctionDefinition functionDef : functionDefinations) {
223                                 dropDownMap.put(functionDef.getShortname(),functionDef.getXacmlid());
224                         }
225                 }
226
227         }
228
229         public static  Map<Datatype, List<FunctionDefinition>>  getFunctionDatatypeMap() {
230                 synchronized(mapAccess) {
231                         if (mapDatatype2Function == null) {
232                                 buildFunctionMaps();
233                         }
234                 }
235                 return mapDatatype2Function;
236         }
237
238         public static Map<String, FunctionDefinition> getFunctionIDMap() {
239                 synchronized(mapAccess) {
240                         if (mapID2Function == null) {
241                                 buildFunctionMaps();
242                         }
243                 }
244                 return mapID2Function;
245         }
246
247         private static  void buildFunctionMaps() {
248                 mapDatatype2Function = new HashMap<>();
249                 mapID2Function = new  HashMap<>();
250                 List<Object> functiondefinitions = commonClassDao.getData(FunctionDefinition.class);
251                 for (int i = 0; i < functiondefinitions.size(); i ++) {
252                         FunctionDefinition value = (FunctionDefinition) functiondefinitions.get(i);
253                         mapID2Function.put(value.getXacmlid(), value);
254                         if (!mapDatatype2Function.containsKey(value.getDatatypeBean())) {
255                                 mapDatatype2Function.put(value.getDatatypeBean(), new ArrayList<FunctionDefinition>());
256                         }
257                         mapDatatype2Function.get(value.getDatatypeBean()).add(value);
258                 }
259         }
260
261         @RequestMapping(value={"/get_FunctionDefinitionDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
262         public void getFunctionDefinitionData(HttpServletRequest request, HttpServletResponse response){
263                 try{
264                         Map<String, Object> model = new HashMap<>();
265                         ObjectMapper mapper = new ObjectMapper();
266                         model.put("functionDefinitionDatas", mapper.writeValueAsString(commonClassDao.getDataByColumn(FunctionDefinition.class, "shortname")));
267                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
268                         JSONObject j = new JSONObject(msg);
269                         response.getWriter().write(j.toString());
270                 }
271                 catch (Exception e){
272                         policyLogger.error(XACMLErrorConstants.ERROR_DATA_ISSUE +"Error while retriving the Function Definition data"+e);
273                 }
274         }
275
276         public PolicyEntity getPolicyEntityData(String scope, String policyName){
277                 String key = scope + ":" + policyName;
278                 List<Object> data = commonClassDao.getDataById(PolicyEntity.class, "scope:policyName", key);
279                 return (PolicyEntity) data.get(0);
280         }
281
282         public static Map<String, Roles> getUserRoles(String userId) {
283                 Map<String, Roles> scopes = new HashMap<>();
284                 List<Object> roles = commonClassDao.getDataById(Roles.class, "loginId", userId);
285                 if (roles != null && !roles.isEmpty()) {
286                         for (Object role : roles) {
287                                 scopes.put(((Roles) role).getScope(), (Roles) role);
288                         }
289                 }
290                 return scopes;
291         }
292
293         public List<String> getRolesOfUser(String userId) {
294                 List<String> rolesList = new ArrayList<>();
295                 List<Object> roles = commonClassDao.getDataById(Roles.class, "loginId", userId);
296                 for (Object role: roles) {
297                         rolesList.add(((Roles) role).getRole());
298                 }
299                 return rolesList;
300         }
301
302         public List<Object> getRoles(String userId) {
303                 return commonClassDao.getDataById(Roles.class, "loginId", userId);
304         }
305
306         //Get List of User Roles
307         @RequestMapping(value={"/get_UserRolesData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
308         public void getUserRolesEntityData(HttpServletRequest request, HttpServletResponse response){
309                 try{
310                         String userId = UserUtils.getUserSession(request).getOrgUserId();
311                         Map<String, Object> model = new HashMap<>();
312                         ObjectMapper mapper = new ObjectMapper();
313                         model.put("userRolesDatas", mapper.writeValueAsString(getRolesOfUser(userId)));
314                         JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
315                         JSONObject j = new JSONObject(msg);
316                         response.getWriter().write(j.toString());
317                 }
318                 catch (Exception e){
319                         policyLogger.error("Exception Occured"+e);
320                 }
321         }
322
323         //Policy tabs Model and View
324         @RequestMapping(value= {"/policy", "/policy/Editor" } , method = RequestMethod.GET)
325         public ModelAndView view(HttpServletRequest request){
326                 String myRequestURL = request.getRequestURL().toString();
327                 try {
328                         //
329                         // Set the URL for the RESTful PAP Engine
330                         //
331                         setPapEngine((PAPPolicyEngine) new RESTfulPAPEngine(myRequestURL));
332                         new PDPGroupContainer((PAPPolicyEngine) new RESTfulPAPEngine(myRequestURL));
333                 } catch (Exception e) {
334                         policyLogger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR+"Exception Occured while loading PAP"+e);
335                 }
336                 Map<String, Object> model = new HashMap<>();
337                 return new ModelAndView("policy_Editor","model", model);
338         }
339
340         public PAPPolicyEngine getPapEngine() {
341                 return papEngine;
342         }
343
344         public void setPapEngine(PAPPolicyEngine papEngine) {
345                 PolicyController.papEngine = papEngine;
346         }
347
348         public String getUserName(String createdBy) {
349                 String loginId = createdBy;
350                 List<Object> data = commonClassDao.getDataById(UserInfo.class, "loginId", loginId);
351                 return data.get(0).toString();
352         }
353
354         public static boolean getActivePolicy(String query) {
355                 if(commonClassDao.getDataByQuery(query, new SimpleBindings()).size() > 0){
356                         return true;
357                 }else{
358                         return false;
359                 }
360         }
361
362         public void executeQuery(String query) {
363                 commonClassDao.updateQuery(query);
364         }
365
366         public void saveData(Object cloneEntity) {
367                 commonClassDao.save(cloneEntity);
368         }
369
370         public void updateData(Object entity) {
371                 commonClassDao.update(entity);
372         }
373
374         public void deleteData(Object entity) {
375                 commonClassDao.delete(entity);
376         }
377
378         public List<Object> getData(@SuppressWarnings("rawtypes") Class className){
379                 return commonClassDao.getData(className);
380         }
381
382         public PolicyVersion getPolicyEntityFromPolicyVersion(String query){
383                 return (PolicyVersion) commonClassDao.getEntityItem(PolicyVersion.class, "policyName", query);
384         }
385
386         public List<Object> getDataByQuery(String query, SimpleBindings params){
387                 return commonClassDao.getDataByQuery(query, params);
388         }
389
390
391         @SuppressWarnings("rawtypes")
392         public Object getEntityItem(Class className, String columname, String key){
393                 return commonClassDao.getEntityItem(className, columname, key);
394         }
395
396
397         public void watchPolicyFunction(PolicyVersion entity, String policyName, String mode){
398                 PolicyNotificationMail email = new PolicyNotificationMail();
399                 try {
400                         email.sendMail(entity, policyName, mode, commonClassDao);
401                 } catch (MessagingException e) {
402                         policyLogger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + "Excepton Occured while Renaming/Deleting a Policy or Scope" + e);
403                 }
404         }
405
406         //Switch Version
407         public JSONObject switchVersionPolicyContent(String policyName) {
408                 String dbCheckName = policyName.replace("/", ".");
409                 if(dbCheckName.contains("Config_")){
410                         dbCheckName = dbCheckName.replace(".Config_", ":Config_");
411                 }else if(dbCheckName.contains("Action_")){
412                         dbCheckName = dbCheckName.replace(".Action_", ":Action_");
413                 }else if(dbCheckName.contains("Decision_")){
414                         dbCheckName = dbCheckName.replace(".Decision_", ":Decision_");
415                 }
416                 String[] splitDBCheckName = dbCheckName.split(":");
417                 String query =   "FROM PolicyEntity where policyName like :splitDBCheckName1 and scope = :splitDBCheckName0";
418                 SimpleBindings params = new SimpleBindings();
419                 params.put("splitDBCheckName1", splitDBCheckName[1] + "%");
420                 params.put("splitDBCheckName0", splitDBCheckName[0]);
421                 List<Object> policyEntity = commonClassDao.getDataByQuery(query, params);
422                 List<String> av = new ArrayList<>();
423                 for(Object entity : policyEntity){
424                         PolicyEntity pEntity = (PolicyEntity) entity;
425                         String removeExtension = pEntity.getPolicyName().replace(".xml", "");
426                         String version = removeExtension.substring(removeExtension.lastIndexOf(".")+1);
427                         av.add(version);
428                 }
429                 if(policyName.contains("/")){
430                         policyName = policyName.replace("/", File.separator);
431                 }
432                 PolicyVersion entity = (PolicyVersion) commonClassDao.getEntityItem(PolicyVersion.class, "policyName", policyName);
433                 JSONObject el = new JSONObject();
434                 el.put("activeVersion", entity.getActiveVersion());
435                 el.put("availableVersions", av);
436                 el.put("highestVersion", entity.getHigherVersion());
437                 return el;
438         }
439
440         public static String getLogTableLimit() {
441                 return logTableLimit;
442         }
443
444         public static void setLogTableLimit(String logTableLimit) {
445                 PolicyController.logTableLimit = logTableLimit;
446         }
447
448         public static String getSystemAlertTableLimit() {
449                 return systemAlertTableLimit;
450         }
451
452         public static void setSystemAlertTableLimit(String systemAlertTableLimit) {
453                 PolicyController.systemAlertTableLimit = systemAlertTableLimit;
454         }
455
456         public static CommonClassDao getCommonClassDao() {
457                 return commonClassDao;
458         }
459
460         public static void setCommonClassDao(CommonClassDao commonClassDao) {
461                 PolicyController.commonClassDao = commonClassDao;
462         }
463
464         public XacmlAdminAuthorization getAuthorizer() {
465                 return authorizer;
466         }
467
468         public void setAuthorizer(XacmlAdminAuthorization authorizer) {
469                 this.authorizer = authorizer;
470         }
471
472         public static Map<Datatype, List<FunctionDefinition>> getMapDatatype2Function() {
473                 return mapDatatype2Function;
474         }
475
476         public static void setMapDatatype2Function(Map<Datatype, List<FunctionDefinition>> mapDatatype2Function) {
477                 PolicyController.mapDatatype2Function = mapDatatype2Function;
478         }
479
480         public static Map<String, FunctionDefinition> getMapID2Function() {
481                 return mapID2Function;
482         }
483
484         public static void setMapID2Function(Map<String, FunctionDefinition> mapID2Function) {
485                 PolicyController.mapID2Function = mapID2Function;
486         }
487
488         public static String getSmtpHost() {
489                 return smtpHost;
490         }
491
492         public static void setSmtpHost(String smtpHost) {
493                 PolicyController.smtpHost = smtpHost;
494         }
495
496         public static String getSmtpPort() {
497                 return smtpPort;
498         }
499
500         public static void setSmtpPort(String smtpPort) {
501                 PolicyController.smtpPort = smtpPort;
502         }
503
504         public static String getSmtpUsername() {
505                 return smtpUsername;
506         }
507
508         public static void setSmtpUsername(String smtpUsername) {
509                 PolicyController.smtpUsername = smtpUsername;
510         }
511
512         public static String getSmtpPassword() {
513                 return smtpPassword;
514         }
515
516         public static void setSmtpPassword(String smtpPassword) {
517                 PolicyController.smtpPassword = smtpPassword;
518         }
519
520         public static String getSmtpApplicationName() {
521                 return smtpApplicationName;
522         }
523
524         public static void setSmtpApplicationName(String smtpApplicationName) {
525                 PolicyController.smtpApplicationName = smtpApplicationName;
526         }
527
528         public static String getSmtpEmailExtension() {
529                 return smtpEmailExtension;
530         }
531
532         public static void setSmtpEmailExtension(String smtpEmailExtension) {
533                 PolicyController.smtpEmailExtension = smtpEmailExtension;
534         }
535
536         public static String getLogdbDriver() {
537                 return logdbDriver;
538         }
539
540         public static void setLogdbDriver(String logdbDriver) {
541                 PolicyController.logdbDriver = logdbDriver;
542         }
543
544         public static String getLogdbUrl() {
545                 return logdbUrl;
546         }
547
548         public static void setLogdbUrl(String logdbUrl) {
549                 PolicyController.logdbUrl = logdbUrl;
550         }
551
552         public static String getLogdbUserName() {
553                 return logdbUserName;
554         }
555
556         public static void setLogdbUserName(String logdbUserName) {
557                 PolicyController.logdbUserName = logdbUserName;
558         }
559
560         public static String getLogdbPassword() {
561                 return logdbPassword;
562         }
563
564         public static void setLogdbPassword(String logdbPassword) {
565                 PolicyController.logdbPassword = logdbPassword;
566         }
567
568         public static String getLogdbDialect() {
569                 return logdbDialect;
570         }
571
572         public static void setLogdbDialect(String logdbDialect) {
573                 PolicyController.logdbDialect = logdbDialect;
574         }
575
576         public static String getXacmldbUrl() {
577                 return xacmldbUrl;
578         }
579
580         public static void setXacmldbUrl(String xacmldbUrl) {
581                 PolicyController.xacmldbUrl = xacmldbUrl;
582         }
583
584         public static String getXacmldbUserName() {
585                 return xacmldbUserName;
586         }
587
588         public static void setXacmldbUserName(String xacmldbUserName) {
589                 PolicyController.xacmldbUserName = xacmldbUserName;
590         }
591
592         public static String getXacmldbPassword() {
593                 return xacmldbPassword;
594         }
595
596         public static void setXacmldbPassword(String xacmldbPassword) {
597                 PolicyController.xacmldbPassword = xacmldbPassword;
598         }
599
600         public static String getAutoPushAvailable() {
601                 return autoPushAvailable;
602         }
603
604         public static void setAutoPushAvailable(String autoPushAvailable) {
605                 PolicyController.autoPushAvailable = autoPushAvailable;
606         }
607
608         public static String getAutoPushDSClosedLoop() {
609                 return autoPushDSClosedLoop;
610         }
611
612         public static void setAutoPushDSClosedLoop(String autoPushDSClosedLoop) {
613                 PolicyController.autoPushDSClosedLoop = autoPushDSClosedLoop;
614         }
615
616         public static String getAutoPushDSFirewall() {
617                 return autoPushDSFirewall;
618         }
619
620         public static void setAutoPushDSFirewall(String autoPushDSFirewall) {
621                 PolicyController.autoPushDSFirewall = autoPushDSFirewall;
622         }
623
624         public static String getAutoPushDSMicroservice() {
625                 return autoPushDSMicroservice;
626         }
627
628         public static void setAutoPushDSMicroservice(String autoPushDSMicroservice) {
629                 PolicyController.autoPushDSMicroservice = autoPushDSMicroservice;
630         }
631
632         public static String getAutoPushPDPGroup() {
633                 return autoPushPDPGroup;
634         }
635
636         public static void setAutoPushPDPGroup(String autoPushPDPGroup) {
637                 PolicyController.autoPushPDPGroup = autoPushPDPGroup;
638         }
639
640         public static String getPapUrl() {
641                 return papUrl;
642         }
643
644         public static void setPapUrl(String papUrl) {
645                 PolicyController.papUrl = papUrl;
646         }
647
648         public static String getMsOnapName() {
649                 return msOnapName;
650         }
651
652         public static void setMsOnapName(String msOnapName) {
653                 PolicyController.msOnapName = msOnapName;
654         }
655
656         public static String getMsPolicyName() {
657                 return msPolicyName;
658         }
659
660         public static void setMsPolicyName(String msPolicyName) {
661                 PolicyController.msPolicyName = msPolicyName;
662         }
663
664         public static String getConfigHome() {
665                 return configHome;
666         }
667
668         public static void setConfigHome(String configHome) {
669                 PolicyController.configHome = configHome;
670         }
671
672         public static String getActionHome() {
673                 return actionHome;
674         }
675
676         public static void setActionHome(String actionHome) {
677                 PolicyController.actionHome = actionHome;
678         }
679
680         public static Object getMapaccess() {
681                 return mapAccess;
682         }
683
684         public static String getPolicydata() {
685                 return policyData;
686         }
687
688         public static String getCharacterencoding() {
689                 return characterEncoding;
690         }
691
692         public static String getContenttype() {
693                 return contentType;
694         }
695
696         public static String getFile() {
697                 return file;
698         }
699 }