use of io.hops.hopsworks.exceptions.InvalidQueryException in project hopsworks by logicalclocks.
the class UserFacade method getGroups.
private List<BbcGroup> getGroups(String field, String values) {
String[] groups = values.split(",");
BbcGroup role;
List<BbcGroup> roles = new ArrayList<>();
for (String group : groups) {
role = groupFacade.findByGroupName(group.trim());
if (role != null) {
roles.add(role);
}
}
if (roles.isEmpty()) {
throw new InvalidQueryException("Filter value for " + field + " needs to set valid roles, but found: " + values);
}
return roles;
}
Aggregations