01: package com.technoetic.xplanner.actions;
02:
03: import com.technoetic.xplanner.metrics.IterationMetrics;
04: import org.apache.struts.action.ActionForm;
05: import org.apache.struts.action.ActionForward;
06: import org.apache.struts.action.ActionMapping;
07:
08: import javax.servlet.http.HttpServletRequest;
09: import javax.servlet.http.HttpServletResponse;
10:
11: public class ViewIterationMetricsAction extends ViewObjectAction {
12: private IterationMetrics iterationMetrics;
13:
14: protected ActionForward doExecute(ActionMapping actionMapping,
15: ActionForm form, HttpServletRequest request,
16: HttpServletResponse reply) throws Exception {
17: //DEBT(SPRING) Should have been injected directly from the spring context file
18: iterationMetrics.setIterationRepository(getRepository(
19: actionMapping, request));
20: iterationMetrics.analyze(Integer.parseInt(request
21: .getParameter("oid")));
22: request.setAttribute("metrics", iterationMetrics);
23: return super .doExecute(actionMapping, form, request, reply);
24: }
25:
26: public void setIterationMetrics(IterationMetrics iterationMetrics) {
27: this.iterationMetrics = iterationMetrics;
28: }
29: }
|