Search in sources :

Example 1 with IdentityProviderDAOImpl

use of org.wso2.carbon.identity.application.mgt.dao.impl.IdentityProviderDAOImpl in project carbon-identity-framework by wso2.

the class ApplicationMgtSystemConfig method getIdentityProviderDAO.

/**
 * Return an instance of the SystemIDPDAO
 *
 * @return
 */
public IdentityProviderDAO getIdentityProviderDAO() {
    IdentityProviderDAO idpDAO = null;
    if (systemIDPDAPClassName != null) {
        try {
            // Bundle class loader will cache the loaded class and returned
            // the already loaded instance, hence calling this method
            // multiple times doesn't cost.
            Class clazz = Class.forName(systemIDPDAPClassName);
            idpDAO = (IdentityProviderDAO) clazz.newInstance();
        } catch (ClassNotFoundException e) {
            log.error("Error while instantiating the SAMLClientDAO ", e);
        } catch (InstantiationException e) {
            log.error("Error while instantiating the SAMLClientDAO ", e);
        } catch (IllegalAccessException e) {
            log.error("Error while instantiating the SAMLClientDAO ", e);
        }
    } else {
        idpDAO = new IdentityProviderDAOImpl();
    }
    return idpDAO;
}
Also used : IdentityProviderDAOImpl(org.wso2.carbon.identity.application.mgt.dao.impl.IdentityProviderDAOImpl) IdentityProviderDAO(org.wso2.carbon.identity.application.mgt.dao.IdentityProviderDAO)

Aggregations

IdentityProviderDAO (org.wso2.carbon.identity.application.mgt.dao.IdentityProviderDAO)1 IdentityProviderDAOImpl (org.wso2.carbon.identity.application.mgt.dao.impl.IdentityProviderDAOImpl)1