Search in sources :

Example 1 with SystemInformationDto

use of org.mifos.application.admin.servicefacade.SystemInformationDto in project head by mifos.

the class SystemInformationController method viewSystemInformation.

@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "NP_UNWRITTEN_FIELD", justification = "request is not null")
@RequestMapping(method = RequestMethod.GET)
public ModelAndView viewSystemInformation(HttpServletRequest request) {
    ServletContext context = request.getSession().getServletContext();
    RequestContext requestContext = new RequestContext(request);
    Locale locale = requestContext.getLocale();
    SystemInformationDto systemInformationDto = systemInformationServiceFacade.getSystemInformation(context, locale);
    Map<String, Object> model = new HashMap<String, Object>();
    model.put("request", request);
    model.put("systemInformationDto", systemInformationDto);
    Map<String, Object> status = new HashMap<String, Object>();
    List<String> errorMessages = new ArrayList<String>();
    status.put("errorMessages", errorMessages);
    ModelAndView modelAndView = new ModelAndView("systemInformation", "model", model);
    modelAndView.addObject("status", status);
    return modelAndView;
}
Also used : Locale(java.util.Locale) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ModelAndView(org.springframework.web.servlet.ModelAndView) ServletContext(javax.servlet.ServletContext) RequestContext(org.springframework.web.servlet.support.RequestContext) SystemInformationDto(org.mifos.application.admin.servicefacade.SystemInformationDto) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Locale (java.util.Locale)1 ServletContext (javax.servlet.ServletContext)1 SystemInformationDto (org.mifos.application.admin.servicefacade.SystemInformationDto)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1 RequestContext (org.springframework.web.servlet.support.RequestContext)1