001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.bi.reporting;
016    
017    import java.io.Serializable;
018    
019    import java.util.Map;
020    
021    /**
022     * @author Michael C. Han
023     * @author Gavin Wan
024     */
025    public class ReportRequest implements Serializable {
026    
027            public ReportRequest(
028                    ReportRequestContext reportRequestContext,
029                    ReportDesignRetriever reportDesignRetriever,
030                    Map<String, String> reportParameters, String reportFormat) {
031    
032                    _reportRequestContext = reportRequestContext;
033                    _reportDesignRetriever = reportDesignRetriever;
034                    _reportParameters = reportParameters;
035                    _reportFormat = ReportFormat.parse(reportFormat);
036            }
037    
038            public ReportDesignRetriever getReportDesignRetriever() {
039                    return _reportDesignRetriever;
040            }
041    
042            public ReportFormat getReportFormat() {
043                    return _reportFormat;
044            }
045    
046            public Map<String, String> getReportParameters() {
047                    return _reportParameters;
048            }
049    
050            public ReportRequestContext getReportRequestContext() {
051                    return _reportRequestContext;
052            }
053    
054            public void setReportDesignRetriever(
055                    ReportDesignRetriever reportDesignRetriever) {
056    
057                    _reportDesignRetriever = reportDesignRetriever;
058            }
059    
060            public void setReportFormat(ReportFormat reportFormat) {
061                    _reportFormat = reportFormat;
062            }
063    
064            public void setReportParameters(Map<String, String> reportParameters) {
065                    _reportParameters.putAll(reportParameters);
066            }
067    
068            public void setReportRequestContext(
069                    ReportRequestContext reportRequestContext) {
070    
071                    _reportRequestContext = reportRequestContext;
072            }
073    
074            private ReportDesignRetriever _reportDesignRetriever;
075            private ReportFormat _reportFormat;
076            private Map<String, String> _reportParameters;
077            private ReportRequestContext _reportRequestContext;
078    
079    }