Search in sources :

Example 1 with CustomerSearchServiceImpl

use of org.mifos.customers.business.service.CustomerSearchServiceImpl in project head by mifos.

the class PluginManager method loadImportPlugins.

/**
     * Returns list of import plugins. Note that {@link ServiceLoader} caches
     * loads, so multiple invocations should not incur extra overhead.
     */
public List<TransactionImport> loadImportPlugins() {
    List<TransactionImport> plugins = new ArrayList<TransactionImport>();
    ClassLoader pluginClassLoader = initializePluginClassLoader();
    ServiceLoader<TransactionImport> loader = ServiceLoader.load(TransactionImport.class, pluginClassLoader);
    for (TransactionImport ti : loader) {
        ti.setAccountService(new StandardAccountService(ApplicationContextProvider.getBean(LegacyAccountDao.class), ApplicationContextProvider.getBean(LegacyLoanDao.class), ApplicationContextProvider.getBean(LegacyAcceptedPaymentTypeDao.class), new PersonnelDaoHibernate(new GenericDaoHibernate()), new CustomerDaoHibernate(new GenericDaoHibernate()), ApplicationContextProvider.getBean(LoanBusinessService.class), new HibernateTransactionHelperForStaticHibernateUtil(), ApplicationContextProvider.getBean(LegacyMasterDao.class), ApplicationContextProvider.getBean(MonthClosingServiceFacade.class), ApplicationContextProvider.getBean(SavingsServiceFacade.class), ApplicationContextProvider.getBean(GroupLoanAccountServiceFacade.class)));
        ti.setCustomerSearchService(new CustomerSearchServiceImpl(new CustomerDaoHibernate(new GenericDaoHibernate())));
        plugins.add(ti);
    }
    return plugins;
}
Also used : PersonnelDaoHibernate(org.mifos.customers.personnel.persistence.PersonnelDaoHibernate) GenericDaoHibernate(org.mifos.accounts.savings.persistence.GenericDaoHibernate) HibernateTransactionHelperForStaticHibernateUtil(org.mifos.framework.hibernate.helper.HibernateTransactionHelperForStaticHibernateUtil) ArrayList(java.util.ArrayList) URLClassLoader(java.net.URLClassLoader) StandardAccountService(org.mifos.accounts.api.StandardAccountService) CustomerSearchServiceImpl(org.mifos.customers.business.service.CustomerSearchServiceImpl) TransactionImport(org.mifos.accounts.api.TransactionImport) CustomerDaoHibernate(org.mifos.customers.persistence.CustomerDaoHibernate)

Aggregations

URLClassLoader (java.net.URLClassLoader)1 ArrayList (java.util.ArrayList)1 StandardAccountService (org.mifos.accounts.api.StandardAccountService)1 TransactionImport (org.mifos.accounts.api.TransactionImport)1 GenericDaoHibernate (org.mifos.accounts.savings.persistence.GenericDaoHibernate)1 CustomerSearchServiceImpl (org.mifos.customers.business.service.CustomerSearchServiceImpl)1 CustomerDaoHibernate (org.mifos.customers.persistence.CustomerDaoHibernate)1 PersonnelDaoHibernate (org.mifos.customers.personnel.persistence.PersonnelDaoHibernate)1 HibernateTransactionHelperForStaticHibernateUtil (org.mifos.framework.hibernate.helper.HibernateTransactionHelperForStaticHibernateUtil)1