aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSRINIVAS V <srinivasa.mohan@huawei.com>2018-01-08 12:07:39 +0530
committerSRINIVAS V <srinivasa.mohan@huawei.com>2018-01-08 06:40:03 +0000
commitf99b843890966768267a05e2f4e237bad7c386f0 (patch)
tree59749b0d36a94f93f5d71660df97efa923541cf0
parent989ae85e3a25e059cb963a9bc293526be51273ca (diff)
Fixed as per Java Code Conventions
*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>
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java20
-rw-r--r--PolicyEngineClient/src/test/java/org/onap/policyengine/ConfigBasePolicyClient.java5
2 files changed, 13 insertions, 12 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java
index f38f3e266..64b88134b 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java
@@ -84,23 +84,25 @@ public class PolicyRestController extends RestrictedBaseController{
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;
}
- 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();
@@ -492,4 +494,4 @@ public class PolicyRestController extends RestrictedBaseController{
callPAP(null, "POST", uri.trim());
}
-} \ No newline at end of file
+}
diff --git a/PolicyEngineClient/src/test/java/org/onap/policyengine/ConfigBasePolicyClient.java b/PolicyEngineClient/src/test/java/org/onap/policyengine/ConfigBasePolicyClient.java
index b8dfdc1f6..cfcc1460b 100644
--- a/PolicyEngineClient/src/test/java/org/onap/policyengine/ConfigBasePolicyClient.java
+++ b/PolicyEngineClient/src/test/java/org/onap/policyengine/ConfigBasePolicyClient.java
@@ -1,4 +1,4 @@
-/*-
+ /*-
* ============LICENSE_START=======================================================
* PolicyEngineClient
* ================================================================================
@@ -47,8 +47,7 @@ public class ConfigBasePolicyClient{
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");