private List<Profile> getProfiles() throws Exception {
ArrayList<Profile> profiles = new ArrayList<Profile>();
for (com.groupon.odo.proxylib.models.Profile sourceProfile : ProfileService.getInstance().findAllProfiles()) {
Profile profile = new Profile();
profile.setName(sourceProfile.getName());
// get paths
profile.setPaths(PathOverrideService.getInstance().getPaths(sourceProfile.getId(), Constants.PROFILE_CLIENT_DEFAULT_ID, null));
// get default servers
profile.setServers(ServerRedirectService.getInstance().tableServers(sourceProfile.getId(), 0));
//get server groups
profile.setServerGroups(ServerRedirectService.getInstance().tableServerGroups(sourceProfile.getId()));
// set active
profile.setActive(ProfileService.getInstance().isActive(sourceProfile.getId()));
profiles.add(profile);
}
return profiles;
}