1
14
15 package com.liferay.portal.kernel.bi.reporting.servlet;
16
17 import com.liferay.portal.kernel.bi.reporting.ReportDesignRetriever;
18
19 import java.io.InputStream;
20
21 import java.util.Date;
22
23 import javax.servlet.ServletContext;
24
25
31 public class ServletContextReportDesignRetriever
32 implements ReportDesignRetriever {
33
34 public ServletContextReportDesignRetriever(
35 ServletContext servletContext, String reportName, String prefix,
36 String postfix) {
37
38 _servletContext = servletContext;
39 _reportName = reportName;
40 _prefix = prefix;
41 _postfix = postfix;
42 }
43
44 public InputStream getInputStream() {
45 return _servletContext.getResourceAsStream(
46 _prefix + _reportName + _postfix);
47 }
48
49 public Date getModifiedDate() {
50 return new Date();
51 }
52
53 public String getReportName() {
54 return _reportName;
55 }
56
57 private String _postfix;
58 private String _prefix;
59 private String _reportName;
60 private ServletContext _servletContext;
61
62 }