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