*Moved the constructors after the variables
*Deleted the commented code
Change-Id: I6afa9ae5b04fe5c8280fc9e08352aef699117567
Issue-ID: POLICY-336
Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
private static CommonClassDao commonClassDao;
private static CommonClassDao commonClassDao;
- public static CommonClassDao getCommonClassDao() {
- return commonClassDao;
+ public PolicyRestController(){
+ //default constructor
- public static void setCommonClassDao(CommonClassDao commonClassDao) {
- PolicyRestController.commonClassDao = commonClassDao;
- }
-
@Autowired
private PolicyRestController(CommonClassDao commonClassDao){
PolicyRestController.commonClassDao = commonClassDao;
}
@Autowired
private PolicyRestController(CommonClassDao commonClassDao){
PolicyRestController.commonClassDao = commonClassDao;
}
- public PolicyRestController(){
- //default constructor
+ public static CommonClassDao getCommonClassDao() {
+ return commonClassDao;
+ public static void setCommonClassDao(CommonClassDao commonClassDao) {
+ PolicyRestController.commonClassDao = commonClassDao;
+ }
+
+
+
@RequestMapping(value={"/policycreation/save_policy"}, method={RequestMethod.POST})
public void policyCreationController(HttpServletRequest request, HttpServletResponse response) {
String userId = UserUtils.getUserSession(request).getOrgUserId();
@RequestMapping(value={"/policycreation/save_policy"}, method={RequestMethod.POST})
public void policyCreationController(HttpServletRequest request, HttpServletResponse response) {
String userId = UserUtils.getUserSession(request).getOrgUserId();
callPAP(null, "POST", uri.trim());
}
callPAP(null, "POST", uri.trim());
}
-}
\ No newline at end of file
* ============LICENSE_START=======================================================
* PolicyEngineClient
* ================================================================================
* ============LICENSE_START=======================================================
* PolicyEngineClient
* ================================================================================
policyParameters.setConfigName("testBase"); //required
policyParameters.setConfigBodyType(PolicyType.OTHER); //required
policyParameters.setConfigBody("testing"); //required
policyParameters.setConfigName("testBase"); //required
policyParameters.setConfigBodyType(PolicyType.OTHER); //required
policyParameters.setConfigBody("testing"); //required
- //policyParameters.setPolicyScope("MikeConsole"); //Directory will be created where the Policies are saved... this displays a a subscope on the GUI
-
//Set the Config Attributes... These are Optional
Map<String, String> configAttributes = new HashMap<>();
configAttributes.put("Template", "SampleTemplate");
//Set the Config Attributes... These are Optional
Map<String, String> configAttributes = new HashMap<>();
configAttributes.put("Template", "SampleTemplate");