1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.kernel.bi.reporting;
16  
17  import java.io.Serializable;
18  
19  import java.util.HashMap;
20  import java.util.Map;
21  
22  /**
23   * <a href="ReportRequestContext.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Michael C. Han
26   */
27  public class ReportRequestContext implements Serializable {
28  
29      public static final String DATA_SOURCE_CHARSET = "dataSource.charset";
30  
31      public static final String DATA_SOURCE_COLUMN_NAMES =
32          "dataSource.columnNames";
33  
34      public static final String DATA_SOURCE_FILE = "dataSource.file";
35  
36      public static final String JDBC_DRIVER_CLASS = "jdbc.driverClassName";
37  
38      public static final String JDBC_PASSWORD = "jdbc.password";
39  
40      public static final String JDBC_URL = "jdbc.url";
41  
42      public static final String JDBC_USER_NAME = "jdbc.userName";
43  
44      public ReportRequestContext(ReportDataSourceType reportDataSourceType) {
45          _reportDataSourceType = reportDataSourceType;
46      }
47  
48      public Serializable getAttribute(String key) {
49          return _attributes.get(key);
50      }
51  
52      public ReportDataSourceType getReportDataSourceType() {
53          return _reportDataSourceType;
54      }
55  
56      public void setAttribute(String key, Serializable value) {
57          _attributes.put(key, value);
58      }
59  
60      private Map<String, Serializable> _attributes =
61          new HashMap<String, Serializable>();
62      private ReportDataSourceType _reportDataSourceType;
63  
64  }