use of com.iplanet.am.sdk.common.IDirectoryServicesProvider in project OpenAM by OpenRock.
the class AMDirectoryAccessFactory method instantiateImpls.
private static void instantiateImpls(String packageName, String className, boolean isCriticalErrorIfClassNotFound) {
String providerClass = packageName + PACKAGE_SEPARATOR + className;
try {
IDirectoryServicesProvider dsServicesProvider = (IDirectoryServicesProvider) Class.forName(providerClass).newInstance();
dsServicesImpl = dsServicesProvider.getDirectoryServicesImpl();
dcTreeServicesImpl = dsServicesProvider.getDCTreeServicesImpl();
complianceServicesImpl = dsServicesProvider.getComplianceServicesImpl();
// Add the listener
initListener();
} catch (InstantiationException e) {
debug.error("AMDirectoryAccessFactory.instantiateImpls()- " + "Initializing Impls from package: " + packageName + " FAILED!", e);
throw new ProviderException(AMSDKBundle.getString("300"));
} catch (IllegalAccessException e) {
debug.error("AMDirectoryAccessFactory.instantiateImpls()- " + "Initializing Impls from package: " + packageName + " FAILED!", e);
throw new ProviderException(AMSDKBundle.getString("300"));
} catch (ClassNotFoundException e) {
String message = "AMDirectoryAccessFactory." + "instantiateImpls()- Initializing Impls from " + "package: " + packageName + " FAILED!";
if (isCriticalErrorIfClassNotFound) {
debug.error(message, e);
} else {
debug.warning(message, e);
}
throw new ProviderException(AMSDKBundle.getString("300"));
} catch (AMEventManagerException ame) {
debug.error("AMDirectoryAccessFactory.instantiateImpls()- " + "Initializing Impls from package: " + packageName + "FAILED!", ame);
throw new ProviderException(AMSDKBundle.getString("300"));
}
if (debug.messageEnabled()) {
debug.message("AMDirectoryAccessFactory.instantiateImpls() - " + "Successfully initialized Impls Using Impl Package: " + packageName + " for accessing Directory Services");
}
}
Aggregations