001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     * 
008     * http://www.opensource.org/licenses/ecl2.php
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.kfs.sys.report;
017    
018    import java.util.Locale;
019    import java.util.Map;
020    import java.util.ResourceBundle;
021    
022    public class ReportInfoHolder implements ReportInfo {
023        private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(ReportInfoHolder.class);
024    
025        private String reportFileName;
026        private String reportsDirectory;
027        private String reportTemplateClassPath;
028        private String reportTemplateName;
029        private String reportTitle;
030        private String resourceBundleBaseName;
031        private Map<String, String> subReports;
032        private String subReportTemplateClassPath;
033    
034        /**
035         * @see org.kuali.kfs.sys.report.ReportInfo#getReportFileName()
036         */
037        public String getReportFileName() {
038            return reportFileName;
039        }
040    
041        /**
042         * @see org.kuali.kfs.sys.report.ReportInfo#getReportsDirectory()
043         */
044        public String getReportsDirectory() {
045            return reportsDirectory;
046        }
047    
048        /**
049         * @see org.kuali.kfs.sys.report.ReportInfo#getReportTemplateClassPath()
050         */
051        public String getReportTemplateClassPath() {
052            return reportTemplateClassPath;
053        }
054    
055        /**
056         * @see org.kuali.kfs.sys.report.ReportInfo#getReportTemplateName()
057         */
058        public String getReportTemplateName() {
059            return reportTemplateName;
060        }
061    
062        /**
063         * @see org.kuali.kfs.sys.report.ReportInfo#getReportTitle()
064         */
065        public String getReportTitle() {
066            return reportTitle;
067        }
068    
069        /**
070         * @see org.kuali.kfs.sys.report.ReportInfo#getResourceBundle()
071         */
072        public ResourceBundle getResourceBundle() {
073            return ResourceBundle.getBundle(resourceBundleBaseName, Locale.getDefault());
074        }
075    
076        /**
077         * @see org.kuali.kfs.sys.report.ReportInfo#getResourceBundleBaseName()
078         */
079        public String getResourceBundleBaseName() {
080            return resourceBundleBaseName;
081        }
082    
083        /**
084         * @see org.kuali.kfs.sys.report.ReportInfo#getSubReports()
085         */
086        public Map<String, String> getSubReports() {
087            return subReports;
088        }
089    
090        /**
091         * @see org.kuali.kfs.sys.report.ReportInfo#getSubReportTemplateClassPath()
092         */
093        public String getSubReportTemplateClassPath() {
094            return subReportTemplateClassPath;
095        }
096    
097        /**
098         * Sets the reportFilename attribute value.
099         * 
100         * @param reportFilename The reportFilename to set.
101         */
102        public void setReportFileName(String reportFileName) {
103            this.reportFileName = reportFileName;
104        }
105    
106        /**
107         * Sets the reportsDirectory attribute value.
108         * 
109         * @param reportsDirectory The reportsDirectory to set.
110         */
111        public void setReportsDirectory(String reportsDirectory) {
112            this.reportsDirectory = reportsDirectory;
113        }
114    
115        /**
116         * Sets the reportTemplateClassPath attribute value.
117         * 
118         * @param reportTemplateClassPath The reportTemplateClassPath to set.
119         */
120        public void setReportTemplateClassPath(String reportTemplateClassPath) {
121            this.reportTemplateClassPath = reportTemplateClassPath;
122        }
123    
124        /**
125         * Sets the reportTemplateName attribute value.
126         * 
127         * @param reportTemplateName The reportTemplateName to set.
128         */
129        public void setReportTemplateName(String reportTemplateName) {
130            this.reportTemplateName = reportTemplateName;
131        }
132    
133        /**
134         * Sets the reportTitle attribute value.
135         * 
136         * @param reportTitle The reportTitle to set.
137         */
138        public void setReportTitle(String reportTitle) {
139            this.reportTitle = reportTitle;
140        }
141    
142        /**
143         * Sets the resourceBundleBaseName attribute value.
144         * 
145         * @param resourceBundleBaseName The resourceBundleBaseName to set.
146         */
147        public void setResourceBundleBaseName(String resourceBundleBaseName) {
148            this.resourceBundleBaseName = resourceBundleBaseName;
149        }
150    
151        /**
152         * Sets the subReports attribute value.
153         * 
154         * @param subReports The subReports to set.
155         */
156        public void setSubReports(Map<String, String> subReports) {
157            this.subReports = subReports;
158        }
159    
160        /**
161         * Sets the subReportTemplateClassPath attribute value.
162         * 
163         * @param subReportTemplateClassPath The subReportTemplateClassPath to set.
164         */
165        public void setSubReportTemplateClassPath(String subReportTemplateClassPath) {
166            this.subReportTemplateClassPath = subReportTemplateClassPath;
167        }
168    }