use of com.centurylink.mdw.model.value.user.UserRoleVO in project mdw-designer by CenturyLinkCloud.
the class UserDataAccessRest method getRoleNames.
public List<String> getRoleNames() throws DataAccessException {
try {
String pathWithArgs = "Roles?format=json";
String response = invokeResourceService(pathWithArgs);
RoleList roleList = new RoleList(response);
List<String> roleNames = new ArrayList<String>();
for (UserRoleVO role : roleList.getItems()) {
roleNames.add(role.getName());
}
return roleNames;
} catch (IOException ex) {
throw new DataAccessOfflineException(ex.getMessage(), ex);
} catch (Exception ex) {
throw new DataAccessException(ex.getMessage(), ex);
}
}
Aggregations