01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.module.labor.util;
17:
18: import org.kuali.core.service.KualiConfigurationService;
19: import org.kuali.kfs.KFSConstants;
20: import org.kuali.kfs.context.SpringContext;
21:
22: /**
23: * This is a registry of the reports. The registry typically holds the key elements of a report: its file name and title.
24: */
25: public enum ReportRegistry {
26: LABOR_POSTER_INPUT("labor_poster_main_ledger",
27: "Main Labor Poster Input Transactions"), LABOR_POSTER_STATISTICS(
28: "labor_poster_main", "Labor Poster Report"), LABOR_POSTER_ERROR(
29: "labor_poster_main_error_list",
30: "Main Labor Poster Error Transaction Listing"), LABOR_POSTER_OUTPUT(
31: "labor_poster_output_summary",
32: "Labor Poster Output Summary"), LABOR_POSTER_OUTPUT_BY_SINGLE_GROUP(
33: "labor_poster_single_group_output_summary",
34: "Labor Poster Output Summary"), LABOR_POSTER_GL_SUMMARY(
35: "labor_poster_gl_summary",
36: "Labor Poster General Ledger Summary"), LABOR_POSTER_GL_SUMMARY_INPUT(
37: "labor_poster_gl_summary_ledger",
38: "Labor Poster General Ledger Summary Input Transactions"),
39:
40: LABOR_ACTUAL_BALANCE_SUMMARY("labor_summary_act",
41: "Labor Actual Balance Summary"), LABOR_BUDGET_BALANCE_SUMMARY(
42: "labor_summary_bud", "Labor Budget Balance Summary"), LABOR_ENCUMBRANCE_SUMMARY(
43: "labor_summary_enc", "Labor Encumbrance Summary"),
44:
45: LABOR_YEAR_END_OUTPUT("labor_year_end_output",
46: "Labor Year-End Output Summary"), LABOR_YEAR_END_STATISTICS(
47: "labor_year_end_main", "Labor Ledger Report"),
48:
49: LABOR_PENDING_ENTRY_REPORT("labor_pending_entry_report",
50: "Labor Pending Ledger Entry Report"), LABOR_PENDING_ENTRY_SUMMARY(
51: "labor_pending_entry_summary",
52: "Labor Pending Ledger Entry Summary"), LABOR_GL_SUMMARY(
53: "labor_gl_summary_ledger", "Labor General Ledger Summary"),
54:
55: PAYROLL_ACCRUAL_REPORT("payroll_accrual_report",
56: "Payroll Accrual Entry Report"), PAYROLL_ACCRUAL_STATISTICS(
57: "payroll_accrual_summary", "Payroll Accrual Summary Report");
58:
59: private String reportFilename;
60: private String reportTitle;
61:
62: /**
63: * Constructs a ReportRegistry.java.
64: *
65: * @param reportFilename the report file name
66: * @param reportTitle the report title
67: */
68: private ReportRegistry(String reportFilename, String reportTitle) {
69: this .reportFilename = reportFilename;
70: this .reportTitle = reportTitle;
71: }
72:
73: /**
74: * @return report file name
75: */
76: public String reportFilename() {
77: return this .reportFilename;
78: }
79:
80: /**
81: * @return report title
82: */
83: public String reportTitle() {
84: return this .reportTitle;
85: }
86:
87: /**
88: * get the directory where the reports can be stored
89: */
90: public static String getReportsDirectory() {
91: return SpringContext.getBean(KualiConfigurationService.class)
92: .getPropertyString(KFSConstants.REPORTS_DIRECTORY_KEY);
93: }
94: }
|