ClaimMapping claimMapping = null;
Claim[] claims = null;
ClaimManager claimManager = null;
try {
UserRealm realm = getRealm();
claimManager = realm.getClaimManager();
if (claimManager == null) {
// There can be cases - we get a request for an external user store - where we don'
// have a claims administrator.
return new ClaimMapping[0];
}
claims = (Claim[]) claimManager.getAllSupportClaimsByDefault();
if (claims != null) {
claimMappings = new ClaimMapping[claims.length];
for (int i = 0; i < claims.length; i++) {
claimMapping = new ClaimMapping(null, null);
claimMapping.setClaim(claims[i]);
claimMapping.setMappedAttribute(realm.getClaimManager().getAttributeName(
claims[i].getClaimUri()));
claimMappings[i] = claimMapping;
}
}