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