diff options
author | 2017-05-31 15:54:24 -0400 | |
---|---|---|
committer | 2017-05-31 15:57:02 -0400 | |
commit | d9007d680d19734d5dc106479784c420236cca4b (patch) | |
tree | b3356847c3d6e1543098b447c1df7d49e7118652 /POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/PolicyExportAndImportController.java | |
parent | 6a5e800771311208c66ad79ce1bdf76affd144b2 (diff) |
[Policy-17] Removed the sql scripts from sdk app
Change-Id: I5b017aad569014c7f12eab35e1dbd1c215f90ebe
Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/PolicyExportAndImportController.java')
-rw-r--r-- | POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/PolicyExportAndImportController.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/PolicyExportAndImportController.java b/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/PolicyExportAndImportController.java index 68a65fc5e..bf2a148e6 100644 --- a/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/PolicyExportAndImportController.java +++ b/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/PolicyExportAndImportController.java @@ -89,6 +89,15 @@ public class PolicyExportAndImportController extends RestrictedBaseController { private Workbook workbook; private HSSFWorkbook workBook2; + + private PolicyController policyController; + public PolicyController getPolicyController() { + return policyController; + } + + public void setPolicyController(PolicyController policyController) { + this.policyController = policyController; + } @Autowired private PolicyExportAndImportController(CommonClassDao commonClassDao){ @@ -190,12 +199,12 @@ public class PolicyExportAndImportController extends RestrictedBaseController { String configName = null; String scope = null; boolean finalColumn = false; - PolicyController controller = new PolicyController(); + PolicyController controller = policyController != null ? getPolicyController() : new PolicyController(); String userId = UserUtils.getUserSession(request).getOrgUserId(); UserInfo userInfo = (UserInfo) commonClassDao.getEntityItem(UserInfo.class, "userLoginId", userId); //Check if the Role and Scope Size are Null get the values from db. - List<Object> userRoles = PolicyController.getRoles(userId); + List<Object> userRoles = controller.getRoles(userId); roles = new ArrayList<>(); scopes = new HashSet<>(); for(Object role: userRoles){ |