throw new UserProfileException("You are not authorized to perform this action.");
}
UserRealm realm = getUserRealm();
UserStoreManager ur = realm.getUserStoreManager();
ProfileConfigurationManager profileAdmin = realm
.getProfileConfigurationManager();
if (profileAdmin != null) {
availableProfileConfigurations = getAvailableProfileConfiguration(profileAdmin);
}
String[] profileNames = ur.getProfileNames(username);
profiles = new UserProfileDTO[profileNames.length];
Claim[] claims = getAllSupportedClaims(realm, UserCoreConstants.DEFAULT_CARBON_DIALECT);
String[] claimUris = new String[claims.length + 1];
for (int i = 0; i < claims.length; i++) {
claimUris[i] = claims[i].getClaimUri();
}
claimUris[claims.length] = UserCoreConstants.PROFILE_CONFIGURATION;
for (int i = 0; i < profileNames.length; i++) {
String profile = profileNames[i];
Map<String, String> valueMap = ur.getUserClaimValues(username, claimUris, profile);
ArrayList<UserFieldDTO> userFields = new ArrayList<UserFieldDTO>();
for (int j = 0; j < claims.length; j++) {
UserFieldDTO data = new UserFieldDTO();
Claim claim = claims[j];
String claimUri = claim.getClaimUri();