StringBuffer rolesBuffer = new StringBuffer();
boolean isFirstRole = true;
IApsAuthority[] auths = currentUser.getAuthorities();
for (int i=0; i<auths.length; i++) {
if (auths[i] instanceof Role) {
Role role = (Role) auths[i];
if (!isFirstRole) rolesBuffer.append(" - ");
rolesBuffer.append(role.getName());
isFirstRole = false;
}
}
statsRecord.setRole(rolesBuffer.toString());
NumberFormat formato = NumberFormat.getIntegerInstance(java.util.Locale.ITALIAN);