diff options
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion')
3 files changed, 15 insertions, 15 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java index c934f8d4..354d72bc 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java @@ -107,7 +107,7 @@ public class RaptorAdapter extends FusionAdapter { /** Obtains user name by ID */ public static String getUserName(String userId) { - Map<String, Long> params = new HashMap<String, Long>(); + Map<String, Long> params = new HashMap<>(); params.put(USER_ID, new Long(userId)); List list = getDataAccessService().executeNamedQuery("getUserNameById", params, null); @@ -130,7 +130,7 @@ public class RaptorAdapter extends FusionAdapter { } public static String getUserEmail(String userId) { - Map<String, Long> params = new HashMap<String, Long>(); + Map<String, Long> params = new HashMap<>(); params.put(USER_ID, new Long(userId)); List list = getDataAccessService().executeNamedQuery("getUserEmail", params, null); String email = ""; @@ -205,7 +205,7 @@ public class RaptorAdapter extends FusionAdapter { /** Obtains role name by ID */ public static String getRoleName(String roleId) { - Map<String, Long> params = new HashMap<String, Long>(); + Map<String, Long> params = new HashMap<>(); params.put("role_id", new Long(roleId)); List list = getDataAccessService().executeNamedQuery("getRoleNameById", params, null); @@ -225,7 +225,7 @@ public class RaptorAdapter extends FusionAdapter { public static Map<Long, String> getAllRolesUsingCustomizedQuery(String customizedQuery, String param, boolean isAdmin) { List roles = null; - Map<Long, String> map = new LinkedHashMap<Long, String>(); + Map<Long, String> map = new LinkedHashMap<>(); if(customizedQuery.length()>0 && !isAdmin) { @@ -308,7 +308,7 @@ public class RaptorAdapter extends FusionAdapter { public static Set<Long> getActiveUsersRoleIds(Long userId) { Set<Role> allActiveUserRoles = getActiveUserRoles(userId); Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator(); - Set<Long> allActiveUserRoleIds = new TreeSet<Long>(); + Set<Long> allActiveUserRoleIds = new TreeSet<>(); while(allActiveUserRolesIterator.hasNext()){ Role role = allActiveUserRolesIterator.next(); allActiveUserRoleIds.add(role.getId()); @@ -320,7 +320,7 @@ public class RaptorAdapter extends FusionAdapter { public static Set<Long> getActiveUserRoleIds(Long userId) { Set<Role> allActiveUserRoles = getActiveUserRoles(userId); Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator(); - Set<Long> allActiveUserRoleIds = new TreeSet<Long>(); + Set<Long> allActiveUserRoleIds = new TreeSet<>(); while(allActiveUserRolesIterator.hasNext()){ Role role = allActiveUserRolesIterator.next(); allActiveUserRoleIds.add(role.getId()); @@ -332,7 +332,7 @@ public class RaptorAdapter extends FusionAdapter { public static Set<RoleFunction> getActiveRoleFunctions(Long userId) { Set<Role> allActiveUserRoles = getActiveUserRoles(userId); Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator(); - Set<RoleFunction> allActiveRoleFunctions = new TreeSet<RoleFunction>(); + Set<RoleFunction> allActiveRoleFunctions = new TreeSet<>(); while(allActiveUserRolesIterator.hasNext()){ Role role = allActiveUserRolesIterator.next(); allActiveRoleFunctions.addAll(role.getRoleFunctions()); @@ -343,7 +343,7 @@ public class RaptorAdapter extends FusionAdapter { public static Set<Role> getActiveUserRoles(Long userId) { User user = (User)getDataAccessService().getDomainObject(User.class,userId,null); - Set<Role> allActiveUserRoles = new TreeSet<Role>(); + Set<Role> allActiveUserRoles = new TreeSet<>(); allActiveUserRoles.addAll(user.getRoles()); Iterator<Role> userRolesIterator = user.getRoles().iterator(); while(userRolesIterator.hasNext()){ diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java index a03c9539..444b8afc 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java @@ -131,7 +131,7 @@ public class FileServletController { return null; } catch (Exception e) { logger.error(EELFLoggerDelegate.debugLogger, ("Exception occurred..." + e.getMessage())); - Map<String, Object> errView = new HashMap<String, Object>(); + Map<String, Object> errView = new HashMap<>(); errView.put("error", "The requested resource was not found."); //return new ModelAndView(getExceptionView(), "model", errView); return null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java index 517d2672..bf7ef0bb 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java @@ -1230,7 +1230,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { public @ResponseBody Map<String,String> removeSelectedReportRole( @RequestBody String roleIdToRemove, HttpServletRequest request, HttpServletResponse response) { - Map<String, String> JsonResponse = new HashMap<String, String>(); + Map<String, String> JsonResponse = new HashMap<>(); ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION); try { JsonResponse.put("status","success"); @@ -1303,7 +1303,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { @PathVariable("roleID") String roleId, @RequestBody String readOnly, HttpServletRequest request, HttpServletResponse response) { - Map<String, String> JsonResponse = new HashMap<String, String>(); + Map<String, String> JsonResponse = new HashMap<>(); ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION); try { String action =""; @@ -1396,7 +1396,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { int iCount = 0; for(Iterator iter=reportUsers.iterator(); iter.hasNext(); iCount++) { - Map<String, String> reportUserMap = new HashMap<String,String>(); + Map<String, String> reportUserMap = new HashMap<>(); SecurityEntry rUser = (SecurityEntry) iter.next(); reportUserMapList.add(rUser); } @@ -1487,7 +1487,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { wizardJSON.setDbInfo((rdef != null) ? rdef.getDBInfo() : ""); wizardJSON.setFormHelpText((rdef != null) ? rdef.getFormHelpText() : ""); wizardJSON.setPageSize((rdef != null) ? rdef.getPageSize() : 50); - List<IdNameBooleanJSON> displayArea = new ArrayList<IdNameBooleanJSON>(); + List<IdNameBooleanJSON> displayArea = new ArrayList<>(); IdNameBooleanJSON idNameJSON = new IdNameBooleanJSON(); String qMenu = ""; for (int i = 0; i < AppUtils.getQuickLinksMenuIDs().size(); i++) { @@ -1506,7 +1506,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { wizardJSON.setFrozenColumns((rdef != null) ? rdef.getFrozenColumns() : 0); wizardJSON.setDataGridAlign((rdef != null) ? rdef.getDataGridAlign() : "left"); wizardJSON.setEmptyMessage((rdef != null) ? rdef.getEmptyMessage() : "No records found"); - List<NameBooleanJSON> displayOptions = new ArrayList<NameBooleanJSON>(); + List<NameBooleanJSON> displayOptions = new ArrayList<>(); NameBooleanJSON nameBooleanJSON = new NameBooleanJSON(); nameBooleanJSON.setName("HideFormFields"); nameBooleanJSON.setSelected((rdef != null) ? rdef.isDisplayOptionHideForm() : false); @@ -1542,7 +1542,7 @@ public class RaptorControllerAsync extends RestrictedBaseController { String schemaSql = Globals.getRemoteDbSchemaSql(); DataSet ds = null; - ArrayList<IdNameBooleanJSON> dbInfoList = new ArrayList<IdNameBooleanJSON>(); + ArrayList<IdNameBooleanJSON> dbInfoList = new ArrayList<>(); try { ds = DbUtils.executeQuery(schemaSql); |