@Api
	public void setRoles(Map<String, List<AuthorizationInfo>> roles) {
		Map<String, List<NamedRoleInfo>> namedRoles = new HashMap<String, List<NamedRoleInfo>>();
		for (String ldapRole : roles.keySet()) {
			DN dn;
			List<AuthorizationInfo> auth = roles.get(ldapRole);
			NamedRoleInfo role = new NamedRoleInfo();
			role.setAuthorizations(auth);
			try {
				dn = new DN(ldapRole);
				role.setName(dn.getRDN().getAttributeValues()[0]);
			} catch (LDAPException e) {
				role.setName(ldapRole);
			}
			namedRoles.put(ldapRole, Collections.singletonList(role));
		}
		setNamedRoles(namedRoles);
	}
@ Api public void setRoles ( Map < String , List < AuthorizationInfo > > roles ) { Map < String , List < NamedRoleInfo > > namedRoles = new HashMap < String , List < NamedRoleInfo > > ( ) ; for ( String ldapRole : roles . keySet ( ) ) { DN dn ; List < AuthorizationInfo > auth = roles . get ( ldapRole ) ; NamedRoleInfo role = new NamedRoleInfo ( ) ; role . setAuthorizations ( auth ) ; try { dn = new DN ( ldapRole ) ; role . setName ( dn . getRDN ( ) . getAttributeValues ( ) [ 0 ] ) ; } catch ( LDAPException e ) { role . setName ( ldapRole ) ; } namedRoles . put ( ldapRole , Collections . singletonList ( role ) ) ; } setNamedRoles ( namedRoles ) ; }
Set the authorizations for the roles which may be defined. If the keys are DN values, the application role names
are taken from the leftmost RDN value. Use {@link LdapAuthenticationService#setNamedRoles(Map)} instead of this
method to explicitly define application role names.

@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values
@since 1.10.0 (actually already from 1.9.0 but annotations was missing)