1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.bi.reporting;
16  
17  import java.io.Serializable;
18  
19  import java.util.Map;
20  
21  /**
22   * <a href="ReportRequest.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Michael C. Han
25   * @author Gavin Wan
26   */
27  public class ReportRequest implements Serializable {
28  
29      public ReportRequest(
30          ReportRequestContext reportRequestContext,
31          ReportDesignRetriever reportDesignRetriever,
32          Map<String, String> reportParameters, String reportFormat) {
33  
34          _reportRequestContext = reportRequestContext;
35          _reportDesignRetriever = reportDesignRetriever;
36          _reportParameters = reportParameters;
37          _reportFormat = ReportFormat.parse(reportFormat);
38      }
39  
40      public ReportDesignRetriever getReportDesignRetriever() {
41          return _reportDesignRetriever;
42      }
43  
44      public ReportFormat getReportFormat() {
45          return _reportFormat;
46      }
47  
48      public Map<String, String> getReportParameters() {
49          return _reportParameters;
50      }
51  
52      public ReportRequestContext getReportRequestContext() {
53          return _reportRequestContext;
54      }
55  
56      public void setReportDesignRetriever(
57          ReportDesignRetriever reportDesignRetriever) {
58  
59          _reportDesignRetriever = reportDesignRetriever;
60      }
61  
62      public void setReportFormat(ReportFormat reportFormat) {
63          _reportFormat = reportFormat;
64      }
65  
66      public void setReportParameters(Map<String, String> reportParameters) {
67          _reportParameters.putAll(reportParameters);
68      }
69  
70      public void setReportRequestContext(
71          ReportRequestContext reportRequestContext) {
72          _reportRequestContext = reportRequestContext;
73      }
74  
75      private ReportDesignRetriever _reportDesignRetriever;
76      private ReportFormat _reportFormat;
77      private Map<String, String> _reportParameters;
78      private ReportRequestContext _reportRequestContext;
79  
80  }