Search in sources :

Example 1 with UserLocale

use of org.mifos.config.UserLocale in project head by mifos.

the class ApplicationInitializer method setAttributesOnContext.

public void setAttributesOnContext(ServletContext servletContext) throws TaskSystemException {
    // FIXME: replace with Spring-managed beans
    final MifosScheduler mifosScheduler = new MifosScheduler();
    final ShutdownManager shutdownManager = new ShutdownManager();
    Configuration.getInstance();
    configureAuditLogValues(Localization.getInstance().getConfiguredLocale());
    LocaleSetting configLocale = new LocaleSetting();
    @SuppressWarnings("deprecation") final UserLocale userLocale = new UserLocale(ApplicationContextProvider.getBean(PersonnelServiceFacade.class));
    if (servletContext != null) {
        mifosScheduler.initialize();
        servletContext.setAttribute(MifosScheduler.class.getName(), mifosScheduler);
        servletContext.setAttribute(ShutdownManager.class.getName(), shutdownManager);
        servletContext.setAttribute(LocaleSetting.class.getSimpleName(), configLocale);
        servletContext.setAttribute(UserLocale.class.getSimpleName(), userLocale);
    }
}
Also used : LocaleSetting(org.mifos.config.LocaleSetting) ShutdownManager(org.mifos.application.admin.system.ShutdownManager) PersonnelServiceFacade(org.mifos.application.admin.servicefacade.PersonnelServiceFacade) MifosScheduler(org.mifos.framework.components.batchjobs.MifosScheduler) UserLocale(org.mifos.config.UserLocale)

Aggregations

PersonnelServiceFacade (org.mifos.application.admin.servicefacade.PersonnelServiceFacade)1 ShutdownManager (org.mifos.application.admin.system.ShutdownManager)1 LocaleSetting (org.mifos.config.LocaleSetting)1 UserLocale (org.mifos.config.UserLocale)1 MifosScheduler (org.mifos.framework.components.batchjobs.MifosScheduler)1