use of com.agiletec.aps.system.services.group.GroupUtilizer in project entando-core by entando.
the class AuthorizationService method getGroupUtilizer.
@Override
public List<UserDto> getGroupUtilizer(String groupCode) {
try {
List<String> usernames = ((GroupUtilizer<String>) this.getAuthorizationManager()).getGroupUtilizers(groupCode);
List<UserDto> dtoList = new ArrayList<>();
if (null != usernames) {
usernames.stream().forEach(i -> {
try {
dtoList.add(this.getDtoBuilder().convert(this.getUserManager().getUser(i)));
} catch (ApsSystemException e) {
logger.error("error loading {}", i, e);
}
});
}
return dtoList;
} catch (ApsSystemException ex) {
logger.error("Error loading user references for group {}", groupCode, ex);
throw new RestServerError("Error loading user references by group", ex);
}
}
Aggregations