Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[Policy-17] Removed the sql scripts from sdk app
[policy/engine.git]
/
POLICY-SDK-APP
/
src
/
main
/
java
/
org
/
openecomp
/
policy
/
controller
/
PolicyExportAndImportController.java
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
68a65fc
..
bf2a148
100644
(file)
--- 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 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){
@Autowired
private PolicyExportAndImportController(CommonClassDao commonClassDao){
@@
-190,12
+199,12
@@
public class PolicyExportAndImportController extends RestrictedBaseController {
String configName = null;
String scope = null;
boolean finalColumn = false;
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.
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 =
PolicyC
ontroller.getRoles(userId);
+ List<Object> userRoles =
c
ontroller.getRoles(userId);
roles = new ArrayList<>();
scopes = new HashSet<>();
for(Object role: userRoles){
roles = new ArrayList<>();
scopes = new HashSet<>();
for(Object role: userRoles){