View Javadoc
1   package org.itracker.web.actions.report;
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.services.IssueService;
7   import org.itracker.services.ProjectService;
8   import org.itracker.services.ReportService;
9   import org.itracker.web.actions.base.ItrackerBaseAction;
10  import org.itracker.web.util.ServletContextUtils;
11  
12  import javax.servlet.http.HttpServletRequest;
13  import javax.servlet.http.HttpServletResponse;
14  
15  
16  public class ListReportsAction extends ItrackerBaseAction {
17  
18  
19      public ActionForward execute(ActionMapping mapping, ActionForm form,
20                                   HttpServletRequest request, HttpServletResponse response)
21              throws Exception {
22          IssueService issueService = ServletContextUtils.getItrackerServices().getIssueService();
23          ProjectService projectService = ServletContextUtils.getItrackerServices().getProjectService();
24          ReportService reportService = ServletContextUtils.getItrackerServices().getReportService();
25          request.setAttribute("ih", issueService);
26          request.setAttribute("ph", projectService);
27          request.setAttribute("rh", reportService);
28  
29          String pageTitleKey = "itracker.web.listreports.title";
30          String pageTitleArg = "";
31          request.setAttribute("pageTitleKey", pageTitleKey);
32          request.setAttribute("pageTitleArg", pageTitleArg);
33  
34          return mapping.findForward("list_reports");
35      }
36  
37      public ListReportsAction() {
38          super();
39      }
40  
41  }