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);
}
}
Aggregations