use of com.sun.identity.policy.ResponseProviderTypeManager in project OpenAM by OpenRock.
the class PolicyModelImpl method getActiveResponseProviderTypes.
/**
* Returns a map of active response provider types for a realm to its
* display name.
*
* @param realmName Name of Realm.
* @return a map of active response provider types for a realm to its
* display name.
*/
public Map getActiveResponseProviderTypes(String realmName) {
Map providerTypes = null;
try {
PolicyManager policyMgr = getPolicyManager(realmName);
if (policyMgr != null) {
ResponseProviderTypeManager providerTypeMgr = policyMgr.getResponseProviderTypeManager();
if (providerTypeMgr != null) {
Set types = providerTypeMgr.getSelectedResponseProviderTypeNames();
providerTypes = new HashMap(types.size() * 2);
for (Iterator iter = types.iterator(); iter.hasNext(); ) {
String rName = (String) iter.next();
providerTypes.put(rName, providerTypeMgr.getDisplayName(rName));
}
}
}
} catch (AMConsoleException e) {
debug.warning("PolicyModelImpl.getActiveResponseProviderTypes", e);
} catch (SSOException e) {
debug.warning("PolicyModelImpl.getActiveResponseProviderTypes", e);
} catch (NameNotFoundException e) {
debug.warning("PolicyModelImpl.getActiveResponseProviderTypes", e);
} catch (PolicyException e) {
debug.warning("PolicyModelImpl.getActiveResponseProviderTypes", e);
}
return (providerTypes == null) ? Collections.EMPTY_MAP : providerTypes;
}
Aggregations