protected List<String> getRoleNames() { SortedSet<String> resultSet = new TreeSet<String>(); try { for (GeoServerRole role : securityManager().getRolesForAccessControl()) { resultSet.add(role.getAuthority()); } } catch (IOException e) { LOGGER.log(Level.WARNING, e.getLocalizedMessage(), e); } return new ArrayList<String>(resultSet); }
protected List<String> getRoleNames() { SortedSet<String> resultSet = new TreeSet<>(); try { for (GeoServerRole role : securityManager().getRolesForAccessControl()) { resultSet.add(role.getAuthority()); } } catch (IOException e) { LOGGER.log(Level.WARNING, e.getLocalizedMessage(), e); } return new ArrayList<>(resultSet); }
@Override protected List<GeoServerRole> load() { Map<String,GeoServerRole> roleMap; roleMap=new HashMap<String,GeoServerRole>(); try { for (GeoServerRole role : GeoServerApplication.get().getSecurityManager().getRolesForAccessControl()) roleMap.put(role.getAuthority(), role); } catch (IOException e) { throw new RuntimeException(e); } List<GeoServerRole> roles = new ArrayList<GeoServerRole>(); for (String roleName : roleNamesModel.getObject()) { GeoServerRole role = roleMap.get(roleName); if (role!=null) roles.add(role); } return roles; }
@Override protected List<GeoServerRole> load() { Map<String, GeoServerRole> roleMap; roleMap = new HashMap<String, GeoServerRole>(); try { for (GeoServerRole role : GeoServerApplication.get().getSecurityManager().getRolesForAccessControl()) roleMap.put(role.getAuthority(), role); } catch (IOException e) { throw new RuntimeException(e); } List<GeoServerRole> roles = new ArrayList<GeoServerRole>(); for (String roleName : roleNamesModel.getObject()) { GeoServerRole role = roleMap.get(roleName); if (role != null) roles.add(role); } return roles; }
@Override protected List<GeoServerRole> load() { Map<String,GeoServerRole> roleMap; roleMap=new HashMap<String,GeoServerRole>(); try { for (GeoServerRole role : GeoServerApplication.get().getSecurityManager().getRolesForAccessControl()) roleMap.put(role.getAuthority(), role); } catch (IOException e) { throw new RuntimeException(e); } List<GeoServerRole> roles = new ArrayList<GeoServerRole>(); for (String roleName : roleNamesModel.getObject()) { GeoServerRole role = roleMap.get(roleName); if (role!=null) roles.add(role); } return roles; }
@Override protected Collection<GeoServerRole> load() { GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager(); try { return new ArrayList(secMgr.getRolesForAccessControl()); } catch(IOException e) { throw new WicketRuntimeException(e); } }
@Override protected Collection<GeoServerRole> load() { GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager(); try { return new ArrayList(secMgr.getRolesForAccessControl()); } catch (IOException e) { throw new WicketRuntimeException(e); } } }
@Override protected Collection<GeoServerRole> load() { GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager(); try { return new ArrayList(secMgr.getRolesForAccessControl()); } catch(IOException e) { throw new WicketRuntimeException(e); } }