CADI AAF Integration and merging the code
[portal.git] / ecomp-portal-BE-os / src / main / java / org / onap / portalapp / conf / ExternalAppConfig.java
index 862bf39..43449b3 100644 (file)
@@ -164,15 +164,15 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
                        MDC.put(MDC_ALERT_SEVERITY, AlarmSeverityEnum.INFORMATIONAL.severity());
                        MDC.put(MDC_INSTANCE_UUID, SystemProperties.getProperty(SystemProperties.INSTANCE_UUID));
                        
-                       if("true".equalsIgnoreCase(remotecentralizedsystemaccess)){
-                               importFromExternalAuth();
-                       }                       
+                                               if("true".equalsIgnoreCase(remotecentralizedsystemaccess)){
+                                                       importFromExternalAuth();
+                                               }                       
                } catch (Exception e) {
                        logger.error(EELFLoggerDelegate.errorLogger, "init failed", e);
                }
        }
 
-       
+
        private void importFromExternalAuth() throws Exception {
                JSONArray aafAppRoles = new JSONArray();
                JSONArray aafUserList = new JSONArray();
@@ -189,8 +189,8 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
                                        for(int j = 0; j < aafAppRoles.length(); j++){
                                                ObjectMapper mapper = new ObjectMapper();
                                                String name = aafAppRoles.getJSONObject(j).getString("name");
-                                               //String desc = aafAppRoles.getJSONObject(j).getString("description");
-                                               //ExternalRoleDescription externalRoleDescription = mapper.readValue(desc, ExternalRoleDescription.class);
+//                                             String desc = aafAppRoles.getJSONObject(j).getString("description");
+//                                             ExternalRoleDescription externalRoleDescription = mapper.readValue(desc, ExternalRoleDescription.class);
                                                aafUserList = externalAccessRolesService.getAllUsersByRole(name);       
                                                if(aafUserList != null && aafUserList.length() > 0){
                                                        for(int k = 0; k < aafUserList.length(); k++){
@@ -222,6 +222,10 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
                }
        }
 
+       public DataAccessService dataAccessService() {
+               return super.dataAccessService();
+       }
+
        @Override
        public String[] tileDefinitions() {
                return super.tileDefinitions();