use of com.sun.identity.policy.ResponseProviderTypeManager in project OpenAM by OpenRock.
the class PolicyModelImpl method getResponseProviderViewBeanURL.
/**
* Returns properties view bean URL of a response provider.
*
* @param realmName Name of realm.
* @param typeName Name of response provider Type.
* @return properties view bean URL of a response provider.
*/
public String getResponseProviderViewBeanURL(String realmName, String typeName) {
String url = null;
try {
PolicyManager policyMgr = getPolicyManager(realmName);
if (policyMgr != null) {
ResponseProviderTypeManager mgr = policyMgr.getResponseProviderTypeManager();
ResponseProvider provider = mgr.getResponseProvider(typeName);
url = mgr.getViewBeanURL(provider);
}
} catch (AMConsoleException e) {
debug.warning("PolicyModelImpl.getResponseProviderViewBeanURL", e);
} catch (NameNotFoundException e) {
debug.warning("PolicyModelImpl.getResponseProviderViewBeanURL", e);
} catch (PolicyException e) {
debug.warning("PolicyModelImpl.getResponseProviderViewBeanURL", e);
}
return url;
}
use of com.sun.identity.policy.ResponseProviderTypeManager in project OpenAM by OpenRock.
the class PolicyModelImpl method getResponseProviderViewBeanURL.
/**
* Returns properties view bean URL of a response provider.
*
* @param realmName Name of realm.
* @param provider response provider Object.
* @return properties view bean URL of a response provider.
*/
public String getResponseProviderViewBeanURL(String realmName, ResponseProvider provider) {
String url = null;
try {
PolicyManager policyMgr = getPolicyManager(realmName);
if (policyMgr != null) {
ResponseProviderTypeManager ResponseProviderTypeMgr = policyMgr.getResponseProviderTypeManager();
url = ResponseProviderTypeMgr.getViewBeanURL(provider);
}
} catch (AMConsoleException e) {
debug.warning("PolicyModelImpl.getResponseProviderViewBeanURL", e);
}
return url;
}
use of com.sun.identity.policy.ResponseProviderTypeManager in project OpenAM by OpenRock.
the class PolicyModelImpl method createResponseProvider.
/**
* Returns a response provider object.
*
* @param realmName Name of Realm.
* @param providerType Name of response provider type.
* @param values Values of the response provider.
* @return response provider object.
* @throws AMConsoleException if response provider cannot be created.
*/
public ResponseProvider createResponseProvider(String realmName, String providerType, Map values) throws AMConsoleException {
ResponseProvider provider = null;
try {
PolicyManager policyMgr = getPolicyManager(realmName);
if (policyMgr != null) {
ResponseProviderTypeManager mgr = policyMgr.getResponseProviderTypeManager();
provider = mgr.getResponseProvider(providerType);
provider.setProperties(values);
}
} catch (NameNotFoundException e) {
throw new AMConsoleException(getErrorString(e));
} catch (PolicyException e) {
throw new AMConsoleException(getErrorString(e));
}
return provider;
}
use of com.sun.identity.policy.ResponseProviderTypeManager in project OpenAM by OpenRock.
the class PolicyModelImpl method getResponseProviderTypeName.
/**
* Returns response provider type name of a response provider.
*
* @param realmName Name of realm.
* @param provider response provider instance.
* @return response provider type name of a response provider.
*/
public String getResponseProviderTypeName(String realmName, ResponseProvider provider) {
String typeName = null;
try {
PolicyManager policyMgr = getPolicyManager(realmName);
if (policyMgr != null) {
ResponseProviderTypeManager mgr = policyMgr.getResponseProviderTypeManager();
typeName = mgr.getResponseProviderTypeName(provider);
}
} catch (AMConsoleException e) {
debug.warning("PolicyModelImpl.getResponseProviderTypeName", e);
}
return typeName;
}
use of com.sun.identity.policy.ResponseProviderTypeManager in project OpenAM by OpenRock.
the class PolicyModelImpl method getResponseProviderInstance.
private ResponseProvider getResponseProviderInstance(String realmName, String typeName) {
ResponseProvider provider = null;
try {
PolicyManager policyMgr = getPolicyManager(realmName);
if (policyMgr != null) {
ResponseProviderTypeManager mgr = policyMgr.getResponseProviderTypeManager();
provider = mgr.getResponseProvider(typeName);
}
} catch (AMConsoleException e) {
debug.warning("PolicyModelImpl.getResponseProviderInstance", e);
} catch (NameNotFoundException e) {
debug.warning("PolicyModelImpl.getResponseProviderInstance", e);
} catch (PolicyException e) {
debug.warning("PolicyModelImpl.getResponseProviderInstance", e);
}
return provider;
}
Aggregations