1 18 19 package cowsultants.itracker.web.reports; 20 21 import java.io.*; 22 import java.net.*; 23 import java.util.*; 24 import javax.servlet.ServletOutputStream ; 25 import javax.servlet.http.HttpServletRequest ; 26 import javax.servlet.http.HttpServletResponse ; 27 import javax.servlet.http.HttpSession ; 28 29 import org.apache.struts.action.ActionMapping; 30 import org.apache.struts.util.RequestUtils; 31 32 import cowsultants.itracker.ejb.client.exceptions.*; 33 import cowsultants.itracker.ejb.client.models.*; 34 import cowsultants.itracker.ejb.client.resources.*; 35 import cowsultants.itracker.ejb.client.util.*; 36 37 42 public abstract class AbstractITrackerReport implements ITrackerReport { 43 protected IssueModel[] issues = null; 44 protected ReportModel report = null; 45 protected Locale locale = null; 46 protected String reportOutput = null; 47 protected HttpSession session = null; 48 49 public AbstractITrackerReport() { 50 } 51 52 56 public void initializeReport(IssueModel[] issues, ReportModel report, Locale locale, String reportOutput, HttpSession session) throws ReportException { 57 storeInputs(issues, report, locale, reportOutput, session); 58 } 59 60 64 public abstract void augmentReport() throws ReportException; 65 66 74 public abstract void outputPDF(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws ReportException; 75 76 84 public abstract void outputHTML(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws ReportException; 85 86 94 public abstract void outputXLS(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws ReportException; 95 96 104 public abstract void outputCSV(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws ReportException; 105 106 111 public abstract Object getReport() throws ReportException; 112 113 protected void storeInputs(IssueModel[] issues, ReportModel report, Locale locale, String reportOutput, HttpSession session) { 114 this.issues = issues; 115 this.report = report; 116 this.locale = locale; 117 this.reportOutput = reportOutput; 118 this.session = session; 119 } 120 } 121 | Popular Tags |