1 package org.itracker.web.actions.admin.configuration; 2 3 import org.apache.struts.action.ActionForm; 4 import org.apache.struts.action.ActionForward; 5 import org.apache.struts.action.ActionMapping; 6 import org.itracker.model.Configuration; 7 import org.itracker.model.CustomField; 8 import org.itracker.model.util.SystemConfigurationUtilities; 9 import org.itracker.services.ConfigurationService; 10 import org.itracker.web.actions.base.ItrackerBaseAction; 11 import org.itracker.web.util.LoginUtilities; 12 import org.itracker.web.util.ServletContextUtils; 13 14 import javax.servlet.http.HttpServletRequest; 15 import javax.servlet.http.HttpServletResponse; 16 import java.util.List; 17 18 19 public class ListConfigurationAction extends ItrackerBaseAction { 20 21 22 public ActionForward execute(ActionMapping mapping, ActionForm form, 23 HttpServletRequest request, HttpServletResponse response) 24 throws Exception { 25 26 ConfigurationService configurationService = ServletContextUtils.getItrackerServices().getConfigurationService(); 27 28 List<Configuration> resolutions = configurationService.getConfigurationItemsByType(Configuration.Type.resolution); 29 List<Configuration> severities = configurationService.getConfigurationItemsByType(Configuration.Type.severity); 30 List<Configuration> statuses = configurationService.getConfigurationItemsByType(Configuration.Type.status); 31 List<CustomField> customfields = configurationService.getCustomFields(); 32 33 request.setAttribute("resolutions", resolutions); 34 request.setAttribute("severities", severities); 35 request.setAttribute("statuses", statuses); 36 request.setAttribute("customfields", customfields); 37 request.setAttribute("pageLocale", LoginUtilities.getCurrentLocale(request)); 38 39 request.setAttribute("pageTitleKey", "itracker.web.admin.listconfiguration.title"); 40 request.setAttribute("pageTitleArg", ""); 41 42 return mapping.findForward("listconfiguration"); 43 } 44 }