use of org.wso2.carbon.identity.application.mgt.dao.impl.ApplicationTemplateDAOImpl in project carbon-identity-framework by wso2.
the class ApplicationMgtSystemConfig method getApplicationTemplateDAO.
/**
* Return an instance of the ApplicationDAO
*
* @return
*/
public ApplicationTemplateDAO getApplicationTemplateDAO() {
ApplicationTemplateDAO applicationTemplateDAO = null;
if (appTemplateDAOClassName != 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(appTemplateDAOClassName);
applicationTemplateDAO = (ApplicationTemplateDAO) clazz.newInstance();
} catch (ClassNotFoundException e) {
log.error("Error while instantiating the ApplicationTemplateDAO ", e);
} catch (InstantiationException e) {
log.error("Error while instantiating the ApplicationTemplateDAO ", e);
} catch (IllegalAccessException e) {
log.error("Error while instantiating the ApplicationTemplateDAO ", e);
}
} else {
applicationTemplateDAO = new ApplicationTemplateDAOImpl();
}
return applicationTemplateDAO;
}
Aggregations