* @return
*/
public ClaimConfigurationDTO[] getProfileConfiguration(String dialect, String profileConfig)
throws ProfileManagementException {
UserRealm realm = null;
ProfileConfigurationManager profileManager = null;
ClaimManager claimManager = null;
ProfileConfiguration profileConfiguration = null;
ClaimConfigurationDTO claim = null;
List<ClaimConfigurationDTO> claimList = null;
List<String> hiddenClaims = null;
List<String> overriddenClaims = null;
List<String> inheritedClaims = null;
Claim[] definedClaims = null;
List<String> definedClaimsList = null;
validateInputParameters(new String[] { dialect, profileConfig });
try {
realm = getRealm();
profileManager = realm.getProfileConfigurationManager();
if (profileManager == null) {
String message = "No profile configurations defined";
if (log.isDebugEnabled()) {
log.debug(message);
}
return null;
}
claimManager = realm.getClaimManager();
if (claimManager == null) {
String message = "No claim configurations defined";
if (log.isDebugEnabled()) {
log.debug(message);
}
throw new ProfileManagementException(message);
}
definedClaimsList = new ArrayList<String>();
definedClaims = (Claim[]) claimManager.getAllClaims(dialect);
for (int i = 0; i < definedClaims.length; i++) {
definedClaimsList.add(definedClaims[i].getClaimUri());
}
profileConfiguration = (ProfileConfiguration) profileManager.getProfileConfig(profileConfig);
// A container for all the claims applicable to the current profile
// configuration.
claimList = new ArrayList<ClaimConfigurationDTO>();
hiddenClaims = profileConfiguration.getHiddenClaims();