1
22
23 package com.liferay.portal.kernel.bi.reporting;
24
25 import java.io.Serializable;
26
27 import java.util.HashMap;
28 import java.util.Map;
29
30
36 public class ReportRequest implements Serializable {
37
38 public ReportRequest(
39 ReportDesignRetriever reportDesignRetriever, String reportFormat,
40 String imageStorageLocation, String imagePath) {
41
42 _reportDesignRetriever = reportDesignRetriever;
43 _reportFormat = ReportFormat.parse(reportFormat);
44 _imageStorageLocation = imageStorageLocation;
45 _imagePath = imagePath;
46 _reportParameters = new HashMap<String, String>();
47 }
48
49 public String getAlternateDataSource() {
50 return _alternateDataSource;
51 }
52
53 public ReportFormat getFormat() {
54 return _reportFormat;
55 }
56
57 public String getImagePath() {
58 return _imagePath;
59 }
60
61 public String getImageStorageLocation() {
62 return _imageStorageLocation;
63 }
64
65 public String getReportName() {
66 return _reportDesignRetriever.getReportName();
67 }
68
69 public Map<String, String> getReportParameters() {
70 return _reportParameters;
71 }
72
73 public ReportDesignRetriever getRetriever() {
74 return _reportDesignRetriever;
75 }
76
77 public void setAlternateDataSource(String alternateDataSourceName) {
78 _alternateDataSource = alternateDataSourceName;
79 }
80
81 public void setReportParameters(Map<String, String> reportParameters) {
82 _reportParameters.putAll(reportParameters);
83 }
84
85 public String toString() {
86 StringBuilder sb = new StringBuilder();
87
88 sb.append("{imageStorageLocation=");
89 sb.append(_imageStorageLocation);
90 sb.append(", imagePath=");
91 sb.append(_imagePath);
92 sb.append(", reportName=");
93 sb.append(getReportName());
94 sb.append(", reportFormat=");
95 sb.append(_reportFormat);
96 sb.append("}");
97
98 return sb.toString();
99 }
100
101 private String _alternateDataSource;
102 private String _imagePath;
103 private String _imageStorageLocation;
104 private ReportDesignRetriever _reportDesignRetriever;
105 private ReportFormat _reportFormat;
106 private Map<String, String> _reportParameters;
107
108 }